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: <YFSfwimq/VLmo1Lw@hirez.programming.kicks-ass.net>
Date:   Fri, 19 Mar 2021 13:57:38 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Josh Poimboeuf <jpoimboe@...hat.com>
Cc:     x86@...nel.org, jbaron@...mai.com, rostedt@...dmis.org,
        ardb@...nel.org, linux-kernel@...r.kernel.org,
        sumit.garg@...aro.org, oliver.sang@...el.com, jarkko@...nel.org,
        jeyu@...nel.org
Subject: Re: [PATCH 3/3] static_call: Fix static_call_update() sanity check

On Thu, Mar 18, 2021 at 05:58:38PM +0100, Peter Zijlstra wrote:

> > For CONFIG_MODULE_UNLOAD, the code ends up in the normal text area, so
> > static_call_is_init() is false and kernel_text_address() is true.
> > 
> > For !CONFIG_MODULE_UNLOAD, the code gets discarded during module load,
> > so static_call_is_init() and kernel_text_address() are both false.  I
> > guess that will trigger a warning?
> 
> Oh gawd, more variants.
> 
> Afaict MODULE_UNLOAD, by virtue of that #ifdef in

!MODULE_UNLOAD (obv)

> rewrite_section_headers() won't even load the .exit sections. Afaict
> that will break: alterative, jump_label and static_call patching all in
> one go.

Jessica, can you explain how !MODULE_UNLOAD is supposed to work?
Alternatives, jump_labels and static_call all can have relocations into
__exit code. Not loading it at all would be BAD.

For alternatives all we really need it to discard it after init, for
jump_label and static_call we additinoally need to the code to identify
as init (ie, within_module_init() must return true for it).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ