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-next>] [day] [month] [year] [list]
Date:	Fri, 01 Jan 2016 14:42:52 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Michael Turquette <mturquette@...libre.com>,
	Heiko Stuebner <heiko@...ech.de>
Cc:	Stephen Boyd <sboyd@...eaurora.org>, linux-clk@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Sjoerd Simons <sjoerd.simons@...labora.co.uk>
Subject: [PATCH] [BUG] clk: rockchip: don't mark clock names as initconst

The latest changes to the rockchip clk implementation cause
tons of warnings and/or errors (depending on the configuration):

WARNING: vmlinux.o(.data+0x125394): Section mismatch in reference from the variable __compound_literal.125 to the (unknown reference) .init.rodata:(unknown)

The reason is a compount literal in a macro that refers to an
object in the .init.rodata section:

 #define COMPOSITE_FRACMUX(_id, cname, pname, f, mo, df, go, gs, gf, ch) \
        {                                                       \
		...
                .child          = &(struct rockchip_clk_branch)ch, \
        }

'ch' here is placed in .data, and I could find no way to override that
using an attribute or pragma because there is no identifier associated
with it.

This patch avoids the warning by placing the names in .rodata rather than
.init.rodata. However, it is not an ideal solution because we really
want all those data structures to be discarded along with the initdata.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: 8ca1ca8f6039 ("clk: rockchip: handle mux dependency of fractional dividers")

diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 3f71ee5d1bc9..5cadf5e3fb16 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -244,7 +244,7 @@ struct clk *rockchip_clk_register_inverter(const char *name,
 				void __iomem *reg, int shift, int flags,
 				spinlock_t *lock);
 
-#define PNAME(x) static const char *const x[] __initconst
+#define PNAME(x) static const char *const x[]
 
 enum rockchip_clk_branch_type {
 	branch_composite,

--
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