Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1471798imm; Wed, 23 May 2018 17:14:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp1C47/ni9xa34rQDq0Q2PcWvBePvBBq1w/KmKjwrSyGSaHCQArveVXV0LOhs08y4eeAC2N X-Received: by 2002:a63:788e:: with SMTP id t136-v6mr4005870pgc.424.1527120895380; Wed, 23 May 2018 17:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527120895; cv=none; d=google.com; s=arc-20160816; b=oyZfYcZJPiSU4QlyDUleUAoe3lfOp/ylYqO/l/y9TCxjB5dSj7YxJH/KV77RZk519W F3YunDIpu52I2PhFkB5Xwiv+rdkacsZq8+DZ9NqHrGgm5MqXWwmre6tkMWLMS9CBre5x 4Qtel4JEH5PNRbUlovlvonx3mRzzIvHkyS/ab9UhbufHMeqkLTEu4XaHj5GrGDqIyYXg ALUuMJn4SEV5faZi26FitrGEgFrWyBgptiN4DrsCCv4oZXD4PlsIQ8yJSE6zot+vUviF iH8UkGeiyMj1mMOU2ZsCOck5tmdV3BzeYiaoQUP9E1b27pqRDEb/D1qah4TIWXt4GSyA sRTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=AajAZr0BKUQEYTXNMMkgm2Z5AtzlIeUaDn3NJv5UqGA=; b=urdehgZvw2Rj3xHk3DmjRqcfSfiivlbFAM+PJ2gZzLA5JdKQz6ZGO+0wmlJilhEKXJ KbRSLNXrNf14JSkgZalhFqEtr1V6SuuIR/Qhk+TmIgo+NEcSJeGVCLFFctY7HsLlzMSr S2R9UMNVD4lTNVkO3aEe4410sAnnHA2vnpt908Nqv6PdXJbl17Zbacxwp5KuYysc6H7T HAwCE/UjDm+i/PRm/s1OzmfwUx9fXmsyoEkmQ8C9+rYYv3MnM/nueQc5+n43H6kNbZYo 1SP79TzRsHze2qGevGg/ekQ3SMQk5qBw+eg2UZEkuUQi9KaLM5EBPYnJ3dgDzqKw7HtO gfLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=V9FTMWuz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22-v6si19660758pfe.318.2018.05.23.17.14.40; Wed, 23 May 2018 17:14:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=V9FTMWuz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935234AbeEXAMy (ORCPT + 99 others); Wed, 23 May 2018 20:12:54 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:26694 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933416AbeEXAMv (ORCPT ); Wed, 23 May 2018 20:12:51 -0400 Received: from mail-vk0-f43.google.com (mail-vk0-f43.google.com [209.85.213.43]) (authenticated) by conssluserg-02.nifty.com with ESMTP id w4O0CSeS026312; Thu, 24 May 2018 09:12:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com w4O0CSeS026312 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1527120749; bh=AajAZr0BKUQEYTXNMMkgm2Z5AtzlIeUaDn3NJv5UqGA=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=V9FTMWuzlfmP1e2e8AqFQmP6x3dg9M78Su7O/Tlx1vyzAqNMRYimV/faqYQyENrrM R3jES2TkgeZZuZlX7jBIkKubH7SebCVtk6LLWO79DuFtKBrOvDgJDT2yVfWo4JDhMY 0hdxJF2HGSTevU8wLgYL3DxTqzD8k6FtYa6cv75jNPEuf9P6CGRvJXa+BHHjYH9OA6 LE87XH7g1slUHvDSMTsmDRczLKzo9CAyVKP9B/IbFjvdqTGVFiQyXKqxgysnNzQmR6 XVudI3/lLRNfq/NS+IhYNyZ5vp7d8Y7bgyPrpp3LzjBghnojhAWFrL+qUq1LjAWq5S dMQhEIJcAdXiw== X-Nifty-SrcIP: [209.85.213.43] Received: by mail-vk0-f43.google.com with SMTP id i185-v6so14267301vkg.3; Wed, 23 May 2018 17:12:29 -0700 (PDT) X-Gm-Message-State: ALKqPwfc1lC+8IRrUS7d90o3sEJ+vuEDhQOWej8MZQ3LsD4Y7bUCbq0p OMOeyYK+lW8tOi/DU4nCKvy/gfIO14k0vnSYQFk= X-Received: by 2002:a1f:9615:: with SMTP id y21-v6mr3249452vkd.154.1527120747942; Wed, 23 May 2018 17:12:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:55d8:0:0:0:0:0 with HTTP; Wed, 23 May 2018 17:11:47 -0700 (PDT) In-Reply-To: <15dcff14-ea1b-18c8-4cd1-06586cf6f05b@redhat.com> References: <20180523001939.9431-1-labbott@redhat.com> <20180523001939.9431-3-labbott@redhat.com> <15dcff14-ea1b-18c8-4cd1-06586cf6f05b@redhat.com> From: Masahiro Yamada Date: Thu, 24 May 2018 09:11:47 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv3 2/2] x86/vdso: Add build salt to the vDSO To: Laura Abbott Cc: Andy Lutomirski , Mark Wielaard , "H. J. Lu" , Linus Torvalds , X86 ML , LKML , Nick Clifton , Cary Coutant , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? config BUILD_ID_SALT hex "Build ID Salt" help ... Then, in scripts/Makefile, define filechk_build-salt.lds { \ echo "SECTIONS {"; \ echo ".comment (INFO) : { LONG($(CONFIG_BUILD_ID_SALT)); }"; \ echo "}"; \ } endef $(obj)/build-salt.lds: $(src)/Makefile FORCE $(call filechk,build-salt.lds) This is now so simple that we can even remove the shell script. -- Best Regards Masahiro Yamada