lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2304141631490.4426@pobox.suse.cz>
Date:   Fri, 14 Apr 2023 16:32:30 +0200 (CEST)
From:   Miroslav Benes <mbenes@...e.cz>
To:     Josh Poimboeuf <jpoimboe@...nel.org>
cc:     x86@...nel.org, linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        linux-btrfs@...r.kernel.org, Mark Rutland <mark.rutland@....com>,
        linux-scsi@...r.kernel.org, linux-hyperv@...r.kernel.org,
        Arnd Bergmann <arnd@...db.de>,
        "Guilherme G . Piccoli" <gpiccoli@...lia.com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <nathan@...nel.org>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2 07/11] objtool: Include weak functions in global_noreturns
 check

On Wed, 12 Apr 2023, Josh Poimboeuf wrote:

> If a global function doesn't return, and its prototype has the
> __noreturn attribute, its weak counterpart must also not return so that
> it matches the prototype and meets call site expectations.
> 
> To properly follow the compiled control flow at the call sites, change
> the global_noreturns check to include both global and weak functions.
> 
> On the other hand, if a weak function isn't in global_noreturns, assume
> the prototype doesn't have __noreturn.  Even if the weak function
> doesn't return, call sites treat it like a returnable function.
> 
> Fixes the following warning:
> 
>   kernel/sched/build_policy.o: warning: objtool: do_idle() falls through to next function play_idle_precise()
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Link: https://lore.kernel.org/oe-kbuild-all/202304090346.erhqxnlt-lkp@intel.com/
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>

Reviewed-by: Miroslav Benes <mbenes@...e.cz>

The rest of the patch set looks good to me too.

M

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ