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  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:	Sun, 27 Sep 2009 13:58:33 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Tim Abbott <tabbott@...lice.com>,
	Roman Zippel <zippel@...ux-m68k.org>,
	linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] m68k: Make thread_info.h usable from assembly.

On Sun, Sep 27, 2009 at 11:55:55AM +0200, Geert Uytterhoeven wrote:
> On Wed, Sep 16, 2009 at 18:44, Tim Abbott <tabbott@...lice.com> wrote:
> > Signed-off-by: Tim Abbott <tabbott@...lice.com>
> > Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
> > Cc: Roman Zippel <zippel@...ux-m68k.org>
> > Cc: linux-m68k@...ts.linux-m68k.org
> > Cc: Sam Ravnborg <sam@...nborg.org>
> > ---
> >  arch/m68k/include/asm/thread_info_mm.h |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/m68k/include/asm/thread_info_mm.h b/arch/m68k/include/asm/thread_info_mm.h
> > index b6da388..5f36cf1 100644
> > --- a/arch/m68k/include/asm/thread_info_mm.h
> > +++ b/arch/m68k/include/asm/thread_info_mm.h
> > @@ -8,6 +8,7 @@
> >  #include <asm/types.h>
> >  #include <asm/page.h>
> >
> > +#ifndef __ASSEMBLY__
> >  struct thread_info {
> >        struct task_struct      *task;          /* main task structure */
> >        unsigned long           flags;
> > @@ -16,6 +17,7 @@ struct thread_info {
> >        __u32 cpu; /* should always be 0 on m68k */
> >        struct restart_block    restart_block;
> >  };
> > +#endif /* __ASSEMBLY__ */
> >
> >  #define PREEMPT_ACTIVE         0x4000000
> 
> This is not sufficient. <asm/thread_info_mm.h> pulls in <asm/current.h>,
> which contains C only. So you also need:
> 
> --- a/arch/m68k/include/asm/thread_info_mm.h
> +++ b/arch/m68k/include/asm/thread_info_mm.h
> @@ -4,11 +4,12 @@
>  #ifndef ASM_OFFSETS_C
>  #include <asm/asm-offsets.h>
>  #endif
> -#include <asm/current.h>
>  #include <asm/types.h>
>  #include <asm/page.h>
> 
>  #ifndef __ASSEMBLY__
> +#include <asm/current.h>
> +
>  struct thread_info {
>  	struct task_struct	*task;		/* main task structure */
>  	unsigned long		flags;


upstream m68k does not build for me so I could not test.
But I think the correct fix is to drop the include or current from thread_info.
No-one except m68k needs to include current.h in thread_info.h.

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