diff for duplicates of <202602160730.QsdCT9Zp-lkp@intel.com> diff --git a/a/1.txt b/N1/1.txt index 16b8fda..4fd010d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,16 +1,6 @@ -BCC: lkp@intel.com -CC: oe-kbuild-all@lists.linux.dev -CC: linux-kernel@vger.kernel.org -TO: Deepak Gupta <debug@rivosinc.com> -CC: Paul Walmsley <pjw@kernel.org> -CC: Andy Chiu <andy.chiu@sifive.com> - tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 26a4cfaff82a2dcb810f6bfd5f4842f9b6046c8a commit: 66c9c713de597f9b40a319ebda4d3466ce2cdff0 riscv/signal: save and restore the shadow stack on a signal -date: 3 weeks ago -:::::: branch date: 5 hours ago -:::::: commit date: 3 weeks ago config: riscv-randconfig-r073-20260216 (https://download.01.org/0day-ci/archive/20260216/202602160730.QsdCT9Zp-lkp@intel.com/config) compiler: riscv64-linux-gcc (GCC) 13.4.0 smatch version: v0.5.0-8994-gd50c5a4c @@ -18,7 +8,7 @@ smatch version: v0.5.0-8994-gd50c5a4c If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> -| Reported-by: Dan Carpenter <error27@gmail.com> +| Reported-by: Dan Carpenter <dan.carpenter@linaro.org> | Closes: https://lore.kernel.org/r/202602160730.QsdCT9Zp-lkp@intel.com/ New smatch warnings: @@ -33,7 +23,6 @@ arch/riscv/kernel/signal.c:228 restore_sigcontext() warn: maybe return -EFAULT i vim +196 arch/riscv/kernel/signal.c -66c9c713de597f Deepak Gupta 2026-01-25 173 66c9c713de597f Deepak Gupta 2026-01-25 174 static long __restore_cfiss_state(struct pt_regs *regs, void __user *sc_cfi) 66c9c713de597f Deepak Gupta 2026-01-25 175 { 66c9c713de597f Deepak Gupta 2026-01-25 176 struct __sc_riscv_cfi_state __user *state = sc_cfi; @@ -57,10 +46,25 @@ vim +196 arch/riscv/kernel/signal.c 66c9c713de597f Deepak Gupta 2026-01-25 194 66c9c713de597f Deepak Gupta 2026-01-25 195 if (unlikely(err)) 66c9c713de597f Deepak Gupta 2026-01-25 @196 return err; + +A lot of code in signal.c used to return nonsense values because it's +highly optimized and the caller handles it. As in: + + return __copy_from_user(); + +But this code doesn't feel very optimized, honestly, and I bet +returning -EFAULT doesn't hurt anything. I think it would be faster +to get rid of the ret variable and do: + + if (__copy_from_user()) + return -EFAULT; + +My brief and bogus testing seems to show a slight speed up +probably based on the smaller stack size. + 66c9c713de597f Deepak Gupta 2026-01-25 197 66c9c713de597f Deepak Gupta 2026-01-25 198 return restore_user_shstk(current, ss_ptr); 66c9c713de597f Deepak Gupta 2026-01-25 199 } -66c9c713de597f Deepak Gupta 2026-01-25 200 -- 0-DAY CI Kernel Test Service diff --git a/a/content_digest b/N1/content_digest index 1a5ba8c..f1fe41d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,24 +1,18 @@ - "From\0kernel test robot <lkp@intel.com>\0" + "From\0Dan Carpenter <dan.carpenter@linaro.org>\0" "Subject\0arch/riscv/kernel/signal.c:196 __restore_cfiss_state() warn: maybe return -EFAULT instead of the bytes remaining?\0" - "Date\0Mon, 16 Feb 2026 07:56:34 +0800\0" - "To\0oe-kbuild@lists.linux.dev\0" + "Date\0Thu, 19 Feb 2026 10:07:22 +0300\0" + "To\0oe-kbuild@lists.linux.dev" + " Deepak Gupta <debug@rivosinc.com>\0" "Cc\0lkp@intel.com" - " Dan Carpenter <error27@gmail.com>\0" + oe-kbuild-all@lists.linux.dev + linux-kernel@vger.kernel.org + Paul Walmsley <pjw@kernel.org> + " Andy Chiu <andy.chiu@sifive.com>\0" "\00:1\0" "b\0" - "BCC: lkp@intel.com\n" - "CC: oe-kbuild-all@lists.linux.dev\n" - "CC: linux-kernel@vger.kernel.org\n" - "TO: Deepak Gupta <debug@rivosinc.com>\n" - "CC: Paul Walmsley <pjw@kernel.org>\n" - "CC: Andy Chiu <andy.chiu@sifive.com>\n" - "\n" "tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master\n" "head: 26a4cfaff82a2dcb810f6bfd5f4842f9b6046c8a\n" "commit: 66c9c713de597f9b40a319ebda4d3466ce2cdff0 riscv/signal: save and restore the shadow stack on a signal\n" - "date: 3 weeks ago\n" - ":::::: branch date: 5 hours ago\n" - ":::::: commit date: 3 weeks ago\n" "config: riscv-randconfig-r073-20260216 (https://download.01.org/0day-ci/archive/20260216/202602160730.QsdCT9Zp-lkp@intel.com/config)\n" "compiler: riscv64-linux-gcc (GCC) 13.4.0\n" "smatch version: v0.5.0-8994-gd50c5a4c\n" @@ -26,7 +20,7 @@ "If you fix the issue in a separate patch/commit (i.e. not just a new version of\n" "the same patch/commit), kindly add following tags\n" "| Reported-by: kernel test robot <lkp@intel.com>\n" - "| Reported-by: Dan Carpenter <error27@gmail.com>\n" + "| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>\n" "| Closes: https://lore.kernel.org/r/202602160730.QsdCT9Zp-lkp@intel.com/\n" "\n" "New smatch warnings:\n" @@ -41,7 +35,6 @@ "\n" "vim +196 arch/riscv/kernel/signal.c\n" "\n" - "66c9c713de597f Deepak Gupta 2026-01-25 173 \n" "66c9c713de597f Deepak Gupta 2026-01-25 174 static long __restore_cfiss_state(struct pt_regs *regs, void __user *sc_cfi)\n" "66c9c713de597f Deepak Gupta 2026-01-25 175 {\n" "66c9c713de597f Deepak Gupta 2026-01-25 176 \tstruct __sc_riscv_cfi_state __user *state = sc_cfi;\n" @@ -65,13 +58,28 @@ "66c9c713de597f Deepak Gupta 2026-01-25 194 \n" "66c9c713de597f Deepak Gupta 2026-01-25 195 \tif (unlikely(err))\n" "66c9c713de597f Deepak Gupta 2026-01-25 @196 \t\treturn err;\n" + "\n" + "A lot of code in signal.c used to return nonsense values because it's\n" + "highly optimized and the caller handles it. As in:\n" + "\n" + "\treturn __copy_from_user();\n" + "\n" + "But this code doesn't feel very optimized, honestly, and I bet\n" + "returning -EFAULT doesn't hurt anything. I think it would be faster\n" + "to get rid of the ret variable and do:\n" + "\n" + "\tif (__copy_from_user())\n" + "\t\treturn -EFAULT;\n" + "\n" + "My brief and bogus testing seems to show a slight speed up\n" + "probably based on the smaller stack size.\n" + "\n" "66c9c713de597f Deepak Gupta 2026-01-25 197 \n" "66c9c713de597f Deepak Gupta 2026-01-25 198 \treturn restore_user_shstk(current, ss_ptr);\n" "66c9c713de597f Deepak Gupta 2026-01-25 199 }\n" - "66c9c713de597f Deepak Gupta 2026-01-25 200 \n" "\n" "-- \n" "0-DAY CI Kernel Test Service\n" https://github.com/intel/lkp-tests/wiki -e6d183006a9458abec55d773f8bf7f7a3c80439b1bee8262c0ad020e0ee2a14d +79335d0b9701c4e96d2cfdd8e109675f7acf63f77e5afc6916fca044d8b28df9
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.