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: <CAErSpo4fS1fdNvur13LZVYomWdmjZnYO49Gc9BJv_BRxAXX3GA@mail.gmail.com>
Date:	Wed, 15 Oct 2014 17:38:02 -0600
From:	Bjorn Helgaas <bhelgaas@...gle.com>
To:	Jason Wessel <jason.wessel@...driver.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Ingo Molnar <mingo@...hat.com>,
	John Stultz <john.stultz@...aro.org>,
	Eric Paris <eparis@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Rashika Kheria <rashika.kheria@...il.com>,
	Nathan Fontenot <nfont@...tin.ibm.com>,
	Anton Blanchard <anton@....ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Yinghai Lu <yinghai@...nel.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>
Subject: Re: [PATCH v1 09/10] memory-hotplug: Remove "weak" from
 memory_block_size_bytes() declaration

[+cc Rashika, Nathan, Anton, Blanchard, Heiko, Yinghai, Martin,
linux-s390; sorry, I botched my "stg mail" so you weren't included the
first time.  s390 and x86 define their own memory_block_size_bytes()
and are at risk for this problem.]

On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> drivers/base/memory.c provides a default memory_block_size_bytes()
> definition explicitly marked "weak".  Several architectures provide their
> own definitions intended to override the default, but the "weak" attribute
> on the declaration applied to the arch definitions as well, so the linker
> chose one based on link order (see 10629d711ed7 ("PCI: Remove __weak
> annotation from pcibios_get_phb_of_node decl")).
>
> Remove the "weak" attribute from the declaration so we always prefer a
> non-weak definition over the weak one, independent of link order.
>
> Fixes: 41f107266b19 ("drivers: base: Add prototype declaration to the header file")
> Signed-off-by: Bjorn Helgaas <bhelgaas@...gle.com>
> CC: Rashika Kheria <rashika.kheria@...il.com>
> CC: Nathan Fontenot <nfont@...tin.ibm.com>
> CC: Anton Blanchard <anton@....ibm.com>
> CC: Heiko Carstens <heiko.carstens@...ibm.com>
> CC: Yinghai Lu <yinghai@...nel.org>
> ---
>  include/linux/memory.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/memory.h b/include/linux/memory.h
> index bb7384e3c3d8..8b8d8d12348e 100644
> --- a/include/linux/memory.h
> +++ b/include/linux/memory.h
> @@ -35,7 +35,7 @@ struct memory_block {
>  };
>
>  int arch_get_memory_phys_device(unsigned long start_pfn);
> -unsigned long __weak memory_block_size_bytes(void);
> +unsigned long memory_block_size_bytes(void);
>
>  /* These states are exposed to userspace as text strings in sysfs */
>  #define        MEM_ONLINE              (1<<0) /* exposed to userspace */
>
--
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