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] [day] [month] [year] [list]
Message-ID: <3280521.lmIxOlm3Me@wuerfel>
Date:	Wed, 16 Dec 2015 00:18:10 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Lijun Pan <Lijun.Pan@...escale.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	Lijun.Pan2000@...il.com
Subject: Re: [PATCH RESEND v3] fsl-ifc: add missing include on ARM64

On Friday 11 December 2015 13:55:02 Lijun Pan wrote:
> Need to include sched.h to fix the following compilation error
> if FSL_IFC is enabled on ARM64 machine.
> 
> In file included from include/linux/mmzone.h:9:0,
>                  from include/linux/gfp.h:5,
>                  from include/linux/kmod.h:22,
>                  from include/linux/module.h:13,
>                  from drivers/memory/fsl_ifc.c:22:
> drivers/memory/fsl_ifc.c: In function ‘check_nand_stat’:
> include/linux/wait.h:165:35: error: ‘TASK_NORMAL’ undeclared (first use in this function)
>  #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
>                                    ^
> drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
>    wake_up(&ctrl->nand_wait);
>    ^
> include/linux/wait.h:165:35: note: each undeclared identifier is reported only once for each function it appears in
>  #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
>                                    ^
> drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
>    wake_up(&ctrl->nand_wait);
>    ^
> 
> Analysis is as follows:
> I put some instrumental code and get the
> following .h files inclusion sequence:
> 
> In file included from ./arch/arm64/include/asm/compat.h:25:0,
>                  from ./arch/arm64/include/asm/stat.h:23,
>                  from include/linux/stat.h:5,
>                  from include/linux/module.h:10,
>                  from drivers/memory/fsl_ifc.c:23:
> include/linux/sched.h:113:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
>  struct sched_attr {
>  ^
> 
> CONFIG_COMPAT=y is enabled while 39 and 48 bit VA is selected.
> When 42 bit VA is selected, it does not enable CONFIG_COMPAT=y
> 
> In ./arch/arm64/include/asm/stat.h:23, it has
> "#ifdef CONFIG_COMPAT"
> "#include <asm/compat.h>"
> "..."
> "#endif"
> 
> Since ./arch/arm64/include/asm/stat.h does not
> include ./arch/arm64/include/asm/compat.h,
> then it will not include include/linux/sched.h
> Hence we have to manually add "#include <linux/sched.h>"
> in drivers/memory/fsl_ifc.c
> 
> Signed-off-by: Lijun Pan <Lijun.Pan@...escale.com>
> 

I've applied this to the fixes branch of arm-soc now.

Thanks,

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