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:	Fri, 12 Aug 2011 18:32:20 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Stephen Boyd <sboyd@...eaurora.org>
Cc:	Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] ARM: zImage: Skip relinking if nothing changes

Hi,

On Fri, Aug 12, 2011 at 4:48 PM, Arnaud Lacombe <lacombar@...il.com> wrote:
> Hi,
>
> On Fri, Aug 12, 2011 at 3:00 PM, Stephen Boyd <sboyd@...eaurora.org> wrote:
>> lib1funcs.S is reshipped even though the file hasn't changed
>> because the make rule is marked with FORCE. According to Sam
>> Ravnborg:
>>
>>        The FORCE prerequisite will tell make to always execute
>>        the command.
>>        But we only want to execute the command if:
>>        1) $(obj)/lib1funcs.S is missing
>>        2) or $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S is not
>>        older then $(obj)/lib1funcs.S
>>
>>        So dropping FORCE should be a safe thing to do.
>>
>> This fixes the shipped problem, but we still have to reassemble
>> lib1funcs.S because it isn't part of $targets. Add
>> lib1funcs.{S,o} to $targets to avoid relinking the compressed
>> vmlinux if nothing changes.
>>
>> Signed-off-by: Stephen Boyd <sboyd@...eaurora.org>
>> Acked-by: Sam Ravnborg <sam@...nborg.org>
>> ---
>>  arch/arm/boot/compressed/Makefile |    8 +++-----
>>  1 files changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
>> index 0c74a6f..937fd26 100644
>> --- a/arch/arm/boot/compressed/Makefile
>> +++ b/arch/arm/boot/compressed/Makefile
>> @@ -91,7 +91,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma
>>
>>  targets       := vmlinux vmlinux.lds \
>>                 piggy.$(suffix_y) piggy.$(suffix_y).o \
>> -                font.o font.c head.o misc.o $(OBJS)
>> +                font.o font.c head.o misc.o lib1funcs.o lib1funcs.S $(OBJS)
>>
>>  # Make sure files are removed during clean
>>  extra-y       += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
>> @@ -121,9 +121,7 @@ LDFLAGS_vmlinux += -X
>>  LDFLAGS_vmlinux += -T
>>
>>  # For __aeabi_uidivmod
>> -lib1funcs = $(obj)/lib1funcs.o
>> -
>> -$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE
>> +$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
>>        $(call cmd,shipped)
>>
> You should be able to avoid the extra copy altogether by doing something ala:
>
> $(obj)/lib1funcs.o: $(srctree)/arch/arm/lib/lib1funcs.S
>        $(call cmd,as_o_S)
>
> note that I also remove the $(SRCARCH), as there is no other
> `arch/*/lib/lib1funcs.S' than `arch/arm/lib/lib1funcs.S'
>
I withdraw this proposal and will hack around this to find a proper
solution from within kbuild, and eventually come back on these uses
:-)

 - Arnaud

>>  # We need to prevent any GOTOFF relocs being used with references
>> @@ -140,7 +138,7 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
>>     echo "$$bad_syms" >&2; rm -f $@; false )
>>
>>  $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \
>> -               $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE
>> +               $(addprefix $(obj)/, $(OBJS)) $(obj)/lib1funcs.o FORCE
>>        $(call if_changed,ld)
>>        @$(check_for_bad_syms)
>>
>> --
>> Sent by an employee of the Qualcomm Innovation Center, Inc.
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
>> the body of a message to majordomo@...r.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
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