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: <54F0AC6A.6070707@codeaurora.org>
Date:	Fri, 27 Feb 2015 09:42:02 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Stephen Rothwell <sfr@...b.auug.org.au>,
	Mike Turquette <mturquette@...aro.org>
CC:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the clk tree

On 02/26/15 19:08, Stephen Rothwell wrote:
> Hi Mike,
>
> After merging the clk tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> In file included from include/trace/define_trace.h:90:0,
>                  from include/trace/events/clk.h:198,
>                  from drivers/clk/clk.c:26:
> include/trace/events/clk.h: In function 'ftrace_get_offsets_clk':
> include/trace/events/clk.h:30:40: error: dereferencing pointer to incomplete type
>    __string(        name,           core->name       )
>                                         ^
> include/trace/ftrace.h:465:2: note: in definition of macro 'DECLARE_EVENT_CLASS'
>   tstruct;       \
>   ^
> include/trace/events/clk.h:29:2: note: in expansion of macro 'TP_STRUCT__entry'
>   TP_STRUCT__entry(
>   ^
> include/trace/ftrace.h:430:29: note: in expansion of macro '__dynamic_array'
>  #define __string(item, src) __dynamic_array(char, item,   \
>                              ^
> include/trace/events/clk.h:30:3: note: in expansion of macro '__string'
>    __string(        name,           core->name       )
>    ^
>
> and many more ...
>
> Caused by commit 0742a46667e3 ("clk: Add tracepoints for hardware
> operations").
>
> I have used the version of the clk tree from next-20150225 for today
> (since yesterday's tree had a different build problem).

The problem is the patch was written before struct clk_core moved into
the clk.c file and then applied after it moved. So before the move the
order of includes would cause the struct definition to be before the
place where the tracepoint macros were expanded. The fix is to move the
tracepoint include after the struct clk_core definition:

-----8<----

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9aee501b8284..392477033990 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -22,9 +22,6 @@
 #include <linux/init.h>
 #include <linux/sched.h>
 
-#define CREATE_TRACE_POINTS
-#include <trace/events/clk.h>
-
 #include "clk.h"
 
 static DEFINE_SPINLOCK(enable_lock);
@@ -80,6 +77,9 @@ struct clk_core {
 	struct kref		ref;
 };
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/clk.h>
+
 struct clk {
 	struct clk_core	*core;
 	const char *dev_id;

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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