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:	Thu, 10 May 2012 10:44:06 -0400
From:	Paul Gortmaker <paul.gortmaker@...driver.com>
To:	Michal Marek <mmarek@...e.cz>
CC:	Sam Ravnborg <sam@...nborg.org>, Tony Luck <tony.luck@...il.com>,
	linux arch <linux-arch@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	Richard Weinberger <richard@....at>,
	"David S. Miller" <davem@...emloft.net>,
	Arnaud Lacombe <lacombar@...il.com>,
	Andi Kleen <andi@...stfloor.org>, <ralf@...ux-mips.org>,
	<linux-mips@...ux-mips.org>
Subject: Re: [PATCH 3/4] kbuild: link of vmlinux moved to a script

On 12-05-10 08:22 AM, Michal Marek wrote:
> On Wed, May 09, 2012 at 06:58:16PM -0400, Paul Gortmaker wrote:
>> On Tue, May 8, 2012 at 12:51 PM, Sam Ravnborg <sam@...nborg.org> wrote:
>>> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
>>> index 26c5b65..1f4c27b 100644
>>> --- a/scripts/link-vmlinux.sh
>>> +++ b/scripts/link-vmlinux.sh
>>> @@ -78,8 +78,8 @@ kallsyms()
>>>                kallsymopt=--all-symbols
>>>        fi
>>>
>>> -       local aflags="${KBUILD_AFLAGS} ${NOSTDINC_FLAGS}                     \
>>> -                     ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>> +       local aflags="${KBUILD_AFLAGS} ${KBUILD_AFLAGS_KERNEL}               \
>>> +                     ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS}"
>>
>> All the linux-next builds for mips are failing, which I tracked down to this.
>> Applying the above update doesn't help.  What is happening is that MIPS
>> gets KBUILD_CPPFLAGS double-quoted, and then you get:
>>
>> + mips-wrs-linux-gnu-nm -n .tmp_vmlinux1
>> + scripts/kallsyms
>> + mips-wrs-linux-gnu-gcc -D__ASSEMBLY__ <..snip..>  -D__KERNEL__
>> '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"' -c -o
>> .tmp_kallsyms1.o -x assembler-with-cpp -
>> <command-line>:0: error: macro names must be identifiers
>> <command-line>:0: error: macro names must be identifiers
>> make[1]: *** [vmlinux] Error 1
>>
>> Note the  '-D"VMLINUX_LOAD_ADDRESS=0xffffffff81100000"' '-D"DATAOFFSET=0"'
>> part -- that is what triggers the two above errors.
> 
> I think it should be as simple as the below patch. But I have no mips
> machine to verify myself.

Well I haven't boot tested it on anything either, but it does
seem to resolve the double quoting that caused the compile failure.

Thanks,
Paul.
--

> 
> Michal
> 
> From d801533d5e6e509d5e115d2fb47655267c4c5ed4 Mon Sep 17 00:00:00 2001
> From: Michal Marek <mmarek@...e.cz>
> Date: Thu, 10 May 2012 14:15:49 +0200
> Subject: [PATCH] mips: Fix KBUILD_CPPFLAGS definition
> 
> The KBUILD_CPPFLAGS variable is no longer passed to sh -c 'gcc ...',
> but exported and used by the link-vmlinux.sh script. This means that the
> double-quotes will not be evaluated by the shell.
> 
> Reported-by: Paul Gortmaker <paul.gortmaker@...driver.com>
> Signed-off-by: Michal Marek <mmarek@...e.cz>
> 
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 4fedf5a..722e04a 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -219,8 +219,8 @@ endif
>  
>  KBUILD_AFLAGS	+= $(cflags-y)
>  KBUILD_CFLAGS	+= $(cflags-y)
> -KBUILD_CPPFLAGS += -D"VMLINUX_LOAD_ADDRESS=$(load-y)"
> -KBUILD_CPPFLAGS += -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
> +KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
> +KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
>  
>  LDFLAGS			+= -m $(ld-emul)
>  
--
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