[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241231210559.GA534233@ax162>
Date: Tue, 31 Dec 2024 14:05:59 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: kernel test robot <lkp@...el.com>, peterz@...radead.org,
jpoimboe@...nel.org
Cc: "Mike Rapoport (IBM)" <rppt@...nel.org>, llvm@...ts.linux.dev,
oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: Re: vmlinux.o: warning: objtool: do_user_addr_fault+0x1052:
__stack_chk_fail() is missing a __noreturn annotation
+ objtool folks
On Tue, Dec 31, 2024 at 10:18:15AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ccb98ccef0e543c2bd4ef1a72270461957f3d8d0
> commit: 7582b7be16d0ba90e3dbd9575a730cabd9eb852a kprobes: remove dependency on CONFIG_MODULES
> date: 8 months ago
> config: x86_64-buildonly-randconfig-006-20241231 (https://download.01.org/0day-ci/archive/20241231/202412311010.rrcATd3z-lkp@intel.com/config)
> compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241231/202412311010.rrcATd3z-lkp@intel.com/reproduce)
>
> 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@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202412311010.rrcATd3z-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> vmlinux.o: warning: objtool: x64_sys_call+0x23b9: __x64_sys_exit() is missing a __noreturn annotation
> >> vmlinux.o: warning: objtool: do_user_addr_fault+0x1052: __stack_chk_fail() is missing a __noreturn annotation
Is the solution to mark __stack_chk_fail() explicitly as __noreturn?
It is my understanding that __stack_chk_fail() should implicitly be
__noreturn, as GCC's documentation states that if a target customizes
the stack protector failure function, it should involve a call to a
noreturn function [1]. Should this warning take into account the
global_noreturn list to avoid warning in these cases? I suspect that
would take care of the other warning in in this configuration.
[1]: https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gccint/Stack-Smashing-Protection.html
Cheers,
Nathan
Powered by blists - more mailing lists