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]
Date:	Tue, 19 May 2015 09:46:36 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	Randy Dunlap <rdunlap@...radead.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	"linux-next@...r.kernel.org" <linux-next@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux MM <linux-mm@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jim Davis <jim.epost@...il.com>,
	Chen Gong <gong.chen@...ux.intel.com>
Subject: Re: linux-next: Tree for May 18 (mm/memory-failure.c)

On Tue, 19 May 2015 02:49:34 +0000
Naoya Horiguchi <n-horiguchi@...jp.nec.com> wrote:

> On Mon, May 18, 2015 at 08:20:07AM -0700, Randy Dunlap wrote:
> > On 05/18/15 01:52, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Changes since 20150515:
> > > 
> > 
> > on i386:
> > 
> > mm/built-in.o: In function `action_result':
> > memory-failure.c:(.text+0x344a5): undefined reference to `__tracepoint_memory_failure_event'
> > memory-failure.c:(.text+0x344d5): undefined reference to `__tracepoint_memory_failure_event'
> > memory-failure.c:(.text+0x3450c): undefined reference to `__tracepoint_memory_failure_event'
> 
> Thanks for the reporting, Randy.
> Here is a patch for this problem, could you try it?
> 
> Thanks,
> Naoya
> ---
> From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> Subject: [PATCH] ras: hwpoison: fix build failure around
>  trace_memory_failure_event
> 
> next-20150515 fails to build on i386 with the following error:
> 
>   mm/built-in.o: In function `action_result':
>   memory-failure.c:(.text+0x344a5): undefined reference to `__tracepoint_memory_failure_event'
>   memory-failure.c:(.text+0x344d5): undefined reference to `__tracepoint_memory_failure_event'
>   memory-failure.c:(.text+0x3450c): undefined reference to `__tracepoint_memory_failure_event'
> 
> Defining CREATE_TRACE_POINTS and TRACE_INCLUDE_PATH fixes it.
> 
> Reported-by: Randy Dunlap <rdunlap@...radead.org>
> Reported-by: Jim Davis <jim.epost@...il.com>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> ---
>  drivers/ras/ras.c       | 1 -
>  include/ras/ras_event.h | 2 ++
>  mm/memory-failure.c     | 1 +
>  3 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
> index b67dd362b7b6..3e2745d8e221 100644
> --- a/drivers/ras/ras.c
> +++ b/drivers/ras/ras.c
> @@ -9,7 +9,6 @@
>  #include <linux/ras.h>
>  
>  #define CREATE_TRACE_POINTS
> -#define TRACE_INCLUDE_PATH ../../include/ras
>  #include <ras/ras_event.h>
>  
>  static int __init ras_init(void)
> diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
> index 1443d79e4fe6..43054c0fcf65 100644
> --- a/include/ras/ras_event.h
> +++ b/include/ras/ras_event.h
> @@ -1,6 +1,8 @@
>  #undef TRACE_SYSTEM
>  #define TRACE_SYSTEM ras
>  #define TRACE_INCLUDE_FILE ras_event
> +#undef TRACE_INCLUDE_PATH
> +#define TRACE_INCLUDE_PATH ../../include/ras

Note, ideally, you want:

#define TRACE_INCLUDE_PATH .

and change the Makefile to have:

CFLAGS_ras.o := -I$(src)

...


>  
>  #if !defined(_TRACE_HW_EVENT_MC_H) || defined(TRACE_HEADER_MULTI_READ)
>  #define _TRACE_HW_EVENT_MC_H
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 8cbe23ac1056..e88e14d87571 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -57,6 +57,7 @@
>  #include <linux/mm_inline.h>
>  #include <linux/kfifo.h>
>  #include "internal.h"
> +#define CREATE_TRACE_POINTS
>  #include "ras/ras_event.h"

Um, you can only define CREATE_TRACE_POINTS for a single instance.
Otherwise you will be making duplicate functions with the same name and
same variables.

That is, you must either pick CREATE_TRACE_POINTS for ras_event.h in
mm/memory-failure.c or drivers/ras/ras.c. Not both.

-- Steve


>  
>  int sysctl_memory_failure_early_kill __read_mostly = 0;

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