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: <20070605053502.GB21745@uranus.ravnborg.org>
Date:	Tue, 5 Jun 2007 07:35:02 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Meelis Roos <mroos@...ux.ee>, rth@...ddle.net,
	ink@...assic.park.msu.ru
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: alpha modpost warnings

On Mon, Jun 04, 2007 at 01:11:07PM +0300, Meelis Roos wrote:
> I am building current 2.6.22-rc3+git for my alpha (Eiger) and get these.
> 
>   MODPOST vmlinux
> WARNING: "saved_config" [arch/alpha/kernel/built-in] is COMMON symbol
> WARNING: arch/alpha/kernel/built-in.o(.text+0x7d2c): Section mismatch: reference to .init.text:init_rtc_irq (between 'common_init_rtc' and 'timer_interrupt')
> WARNING: arch/alpha/kernel/built-in.o(.text+0x7d30): Section mismatch: reference to .init.text:init_rtc_irq (between 'common_init_rtc' and 'timer_interrupt')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel+0x990): Section mismatch: reference to .init.text:tsunami_init_arch (between 'eiger_mv' and 'i8259a_irq_type')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel+0x998): Section mismatch: reference to .init.text:eiger_init_irq (between 'eiger_mv' and 'i8259a_irq_type')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel+0x9a8): Section mismatch: reference to .init.text:common_init_pci (between 'eiger_mv' and 'i8259a_irq_type')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel+0x9b8): Section mismatch: reference to .init.text:eiger_swizzle (between 'eiger_mv' and 'i8259a_irq_type')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel+0x9c0): Section mismatch: reference to .init.text:eiger_map_irq (between 'eiger_mv' and 'i8259a_irq_type')
> WARNING: arch/alpha/kernel/built-in.o(.data.rel.local+0x1060): Section mismatch: reference to .init.text:srm_console_setup (between 'srmcons' and 'tsunami_pci_ops')
> WARNING: drivers/built-in.o(.data.rel+0x1a80): Section mismatch: reference to .init.text:serial8250_console_setup (between 'serial8250_console' and '__param_arr_probe_rsa')


A few of the above was easy to fix. See patch below.
But alpha plays strange tricks with WEAK and ALIAS and __initdata for alpha_mv (and the cousins *_mv).
This is the reasons for most of the warnings - and I did not look deep enough to really understand
the logic (and thereby to come up with a fix).
Maybe the ALPHA maintainers can help?

	Sam

Subject: fix section mismatch warings in alpha build

Signed-off-by: Sam Ravnborg <sam@...nborg.org>
---
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 930cedc..783f4e5 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -289,7 +289,7 @@ srm_console_device(struct console *co, int *index)
 	return srmcons_driver;
 }
 
-static int __init
+static int
 srm_console_setup(struct console *co, char *options)
 {
 	return 0;
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index e349f03..acc93ac 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -422,7 +422,7 @@ marvel_init_pci(void)
 		io7_clear_errors(io7);
 }
 
-static void
+static void __init
 marvel_init_rtc(void)
 {
 	init_rtc_irq();
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 4748e14..1dd50d0 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -144,7 +144,7 @@ irqreturn_t timer_interrupt(int irq, void *dev)
 	return IRQ_HANDLED;
 }
 
-void
+void __init
 common_init_rtc(void)
 {
 	unsigned char x;
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c84dab0..6916cb2 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2515,7 +2515,10 @@ static int __init serial8250_console_setup(struct console *co, char *options)
 }
 
 static struct uart_driver serial8250_reg;
-static struct console serial8250_console = {
+
+/* Mark __init_refok so modpost do not warn about reference to
+ * function marked __init (serial8250_console_Setup() */
+static struct console __initdata_refok serial8250_console = {
 	.name		= "ttyS",
 	.write		= serial8250_console_write,
 	.device		= uart_console_device,
-
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