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: <YwhloemOnZuVa6xc@kernel.org>
Date:   Fri, 26 Aug 2022 09:18:09 +0300
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        WANG Xuerui <git@...0n.name>,
        Huacai Chen <chenhuacai@...ngson.cn>
Subject: Re: [PATCH 5.10 514/545] tpm: eventlog: Fix section mismatch for
 DEBUG_SECTION_MISMATCH

On Fri, Aug 26, 2022 at 09:17:44AM +0300, Jarkko Sakkinen wrote:
> On Fri, Aug 19, 2022 at 05:44:44PM +0200, Greg Kroah-Hartman wrote:
> > From: Huacai Chen <chenhuacai@...ngson.cn>
> > 
> > commit bed4593645366ad7362a3aa7bc0d100d8d8236a8 upstream.
> > 
> > If DEBUG_SECTION_MISMATCH enabled, __calc_tpm2_event_size() will not be
> > inlined, this cause section mismatch like this:
> > 
> > WARNING: modpost: vmlinux.o(.text.unlikely+0xe30c): Section mismatch in reference from the variable L0 to the function .init.text:early_ioremap()
> > The function L0() references
> > the function __init early_memremap().
> > This is often because L0 lacks a __init
> > annotation or the annotation of early_ioremap is wrong.
> > 
> > Fix it by using __always_inline instead of inline for the called-once
> > function __calc_tpm2_event_size().
> > 
> > Fixes: 44038bc514a2 ("tpm: Abstract crypto agile event size calculations")
> > Cc: stable@...r.kernel.org # v5.3
> > Reported-by: WANG Xuerui <git@...0n.name>
> > Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> > Signed-off-by: Jarkko Sakkinen <jarkko@...nel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > ---
> >  include/linux/tpm_eventlog.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/include/linux/tpm_eventlog.h
> > +++ b/include/linux/tpm_eventlog.h
> > @@ -157,7 +157,7 @@ struct tcg_algorithm_info {
> >   * Return: size of the event on success, 0 on failure
> >   */
> >  
> > -static inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
> > +static __always_inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *event,
> >  					 struct tcg_pcr_event *event_header,
> >  					 bool do_mapping)
> >  {
> > 
> >
> 
> Thank you. I'll pick this.
> 
> Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>
> 
> BR, Jarkko

Uh oh, sorry too many emails in one sit.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ