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] [day] [month] [year] [list]
Message-ID: <20090501114617.GB22023@uranus.ravnborg.org>
Date:	Fri, 1 May 2009 13:46:17 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Rakib Mullick <rakib.mullick@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Marcin Slusarz <marcin.slusarz@...il.com>, mingo@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] x86: Fix false positive section mismatch warnings in the apic code

On Mon, Apr 20, 2009 at 10:00:24AM +0600, Rakib Mullick wrote:
> On 4/19/09, Sam Ravnborg <sam@...nborg.org> wrote:
> > If I understand it correct we have the following:
> 
> >  (data) struct apic apic_es7000.acpi_madt_oem_check =>
> >  (function) es7000_acpi_madt_oem_check =>
> >  (function) find_unisys_acpi_oem_table
> >  (__init) early_acpi_os_unmap_memory
> >
> >  So the real fix is to:
> >  1) annotate find_unisys_acpi_oem_table __init
> >  2) annotate es7000_acpi_madt_oem_check __init
> >  3) teach modpost that struct apic apic_es7000 may reference __init
> >
> >  Step 3 is done using __refdata
> >
> >  Based on the above analysis I would assume the best fix
> >  would look like this the following.
> >  [I only looked at the first warning]
> >
> >  Rabik/Marcin - if you agree in the analysis could you produce
> >  a proper patch and send to Ingo - thanks.
> >
> >  You can add my:
> >  Signed-off-by: Sam Ravnborg <sam@...nborg.org>
> >  if the patch is ok.
> >
> >         Sam
> Hi Sam, after applying your suggested three steps, we still have the
> following warning:
> 
> WARNING: arch/x86/kernel/built-in.o(.text+0x36174): Section mismatch
> in reference from the function unmap_unisys_acpi_oem_table() to the
> function .init.text:__acpi_unmap_table()
> The function unmap_unisys_acpi_oem_table() references
> the function __init __acpi_unmap_table().
> This is often because unmap_unisys_acpi_oem_table lacks a __init
> annotation or the annotation of __acpi_unmap_table is wrong.
> 
> So, I think we've to annote unmap_unisys_acpi_oem_table with __init (
> If we apply Sam's suggested steps). If anything else please notice.

Hi guys - I lost track of this so here come a late reply.

What we have is apic_es7000.acpi_madt_oem_check that references es7000_acpi_madt_oem_check

And es7000_acpi_madt_oem_check =>
	unmap_unisys_acpi_oem_table =>
		__acpi_unmap_table

So we may only annotate unmap_unisys_acpi_oem_table if
we know that apic_es7000.acpi_madt_oem_check is only used from __init.

Looking at probe_32.c this seems to be true - but I did not look too closely
on this.

If you can make sure apic_es7000.acpi_madt_oem_check is only used from __init
then the right fix is to annotate the relevant functions with __init.
That is es7000_acpi_madt_oem_check() and unmap_unisys_acpi_oem_table().

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ