[lkml]   [2018]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCHv3 2/2] x86/vdso: Add build salt to the vDSO
2018-05-24 7:53 GMT+09:00 Laura Abbott <>:
> On 05/22/2018 05:33 PM, Andy Lutomirski wrote:
>> On Tue, May 22, 2018 at 5:19 PM Laura Abbott <> wrote:
>>> The vDSO is linked separately from the kernel and modules. Ensure it
>>> picks
>>> up the comment section, if available.
>> Did you end up preferring this to just sticking the kernel version in a
>> .comment in the vDSO for some reason?
> Actually I remember now why this is necessary: there is not a simple way
> to encode a string into a linker file as it has to be spit out byte
> by byte. The autogeneration was the easiest way to make that happen.
> Maybe there's some horrific c preprocessing or other generation that
> could happen but I doubt that's any worse than the generated linker
> script.

I am personally prefer CONFIG option (as you did in v2) to KERNELVERSION.

If you use "hex" type instead of "string" type in Kconfig,
and LONG() instead of BYTE() in the script script,
this can be much simpler, right?

hex "Build ID Salt"

Then, in scripts/Makefile,

{ \
echo "SECTIONS {"; \
echo ".comment (INFO) : { LONG($(CONFIG_BUILD_ID_SALT)); }"; \
echo "}"; \

$(obj)/ $(src)/Makefile FORCE
$(call filechk,

This is now so simple that we can even remove the shell script.

Best Regards
Masahiro Yamada

 \ /
  Last update: 2018-05-24 02:13    [W:0.084 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site