Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp967331ybb; Fri, 3 Apr 2020 15:26:39 -0700 (PDT) X-Google-Smtp-Source: APiQypLUF808e/oQ5VrKnXlWG8Euqr5ntsasWbK6SvXFr+iPccP0d5k9txCAPy/Hi5iAXDJtJNtx X-Received: by 2002:a54:4519:: with SMTP id l25mr4988949oil.92.1585952799372; Fri, 03 Apr 2020 15:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585952799; cv=none; d=google.com; s=arc-20160816; b=o++3lm4QsMNSyaOpEOLxpTPPGWMj1DNPDzUh30lavy/t6+s5hsIvEoH/aQlccrykkN 6kAw8UNqJnQsWv6H1HHARreokS8e0rNu4QEUkiUUZpTnHMbnCTnvGI4wyAPvI4hI3sZs SmqrhsBg3DTR/+oGuKXrDA0M3Su+e9C3EVBXxGamyaaWjxHyzWz+ozbIrAb3LElbbHsl W6sALWvmBckwFKSScZBIDGKLWVjKrV5FaDKIeETepvBj9tr4k4k8WNVFJpRZTIa7RofT coV70k9hqqSdgCDvsX9XMtzQCq2gOg3aFy+svEUjCX+6Cbt3aDBYTY45+AOGeY/QWDCi hsRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=p7vow1gEKBI2UbbyxyrLH2O5cwwOy+c2MDmXXEWJLcc=; b=NIZmoNXQjGLNvn+8yLV89aI9tdIF4wEWAhFvrgVb2g6f9tkM0pEUmzQFQ1/rbeSzb3 JBMdvlgDc7oow4WVAQnaivZhg9V3tpwyKOXn4O8tyKvbpwr57tBmNyCu4eGrQi/UCVIi t2YC4iUW7emUM0JtlFIdhyeDkj1e1epmpQ+U/HIxBvZjRQccA/p2qBnlCLbhcZBh6Ix5 PnAKik+aNQ06wKBjbRcwIqkEuyN7f5bQNTH0Wo3jwD8S+n+q++OtVcE8RQLWAaEZnXP4 RhokyrUGcZrTPAzD26O5q9o+viEyyDNDsatfgIzYTbpwCJAjm4fr0NUtrWkmPfGBXFxU gjpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BWV9P3Pn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j192si4140686oih.233.2020.04.03.15.26.26; Fri, 03 Apr 2020 15:26:39 -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=@gmail.com header.s=20161025 header.b=BWV9P3Pn; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728254AbgDCWZB (ORCPT + 99 others); Fri, 3 Apr 2020 18:25:01 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:46384 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgDCWZB (ORCPT ); Fri, 3 Apr 2020 18:25:01 -0400 Received: by mail-oi1-f195.google.com with SMTP id q204so7544453oia.13 for ; Fri, 03 Apr 2020 15:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=p7vow1gEKBI2UbbyxyrLH2O5cwwOy+c2MDmXXEWJLcc=; b=BWV9P3Pn9zdrvUQwgl/y9TA98YDFMffrBHVwqBDamg1L9SBKgP6Fa/NtEKXr75kuaj 0pCJOQOHMrKMcKQGAK8X5upFoCLj1oeZ/5lMvV8IFn5QtaFD8faxveSHscy08lcvSZPc 3GCGGV8WOvi2LsYHhh4mE08DRZI6GogcZtS03AOjfn1Ip81OyZC6dNYLZirZTMM8Ks70 7PD0Lz/oRv/7XaFZWm00D0DdHmGchDxeNAYGdxMNj4+kvHut2uTjT3IYH1NdEp6Bf2O5 R2g+Gxa0Xkvi2Yio5nzfXnWWjOVVa+8+EEAa5eq3/xN1xwWLJpI+vV/a2/hmUhj9aqA5 3t8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=p7vow1gEKBI2UbbyxyrLH2O5cwwOy+c2MDmXXEWJLcc=; b=RiG80zvxAHZ19JrZnRbR6v0FdNfhsBGx3xsc8SllEdnV+ZPLXF/9nqN4JhBdNTpDUE ff16ZbNQnwm4wW7RERt0sL21FuJJSqeA2DFMa/cqqHAScGh7xChMTyjJisKRR27cLmEX +QRj4UKLBk1AIbEfeoxtETkXY5dk+BOhj0t72y8TOszBAfhhH61wLuy6Y1k5f/6bCd/v 47v2oBcWstDVPYqOVXLQrXOT+XRcmU5wQYe+M119SkgemSVwz5QK8loJlnqAMyrBoAxR 8yWNASeqyImtxjJXloXxW1OT3F4+qycQ2MxMAGplhYiCKB629VjaXzjPt/z66JBgb8Zc v0eg== X-Gm-Message-State: AGi0PuaDW7RKeFKYNmPegTrWbjwT467FFHoAao6bk2fEb3FFbzXjHMnv nMGBaw8KYh9t8bHv3L8Zooc= X-Received: by 2002:aca:4c57:: with SMTP id z84mr4817143oia.53.1585952700642; Fri, 03 Apr 2020 15:25:00 -0700 (PDT) Received: from ubuntu-m2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id k132sm2547380oih.9.2020.04.03.15.24.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Apr 2020 15:25:00 -0700 (PDT) Date: Fri, 3 Apr 2020 15:24:58 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: Thomas Gleixner , Andrew Morton , clang-built-linux , Ilie Halip , Vincenzo Frascino , LKML Subject: Re: [PATCH] elfnote: mark all .note sections SHF_ALLOC Message-ID: <20200403222458.GA49554@ubuntu-m2-xlarge-x86> References: <20200325231250.99205-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 03, 2020 at 03:13:34PM -0700, 'Nick Desaulniers' via Clang Built Linux wrote: > dropping Jeremy; I got bounceback from the email address. Ping for review? > > On Wed, Mar 25, 2020 at 4:13 PM Nick Desaulniers > wrote: > > > > ELFNOTE_START allows callers to specify flags for .pushsection assembler > > directives. All callsites but ELF_NOTE use "a" for SHF_ALLOC. For > > vdso's that explicitly use ELF_NOTE_START and BUILD_SALT, the same > > section is specified twice after preprocessing, once with "a" flag, once > > without. Example: > > > > .pushsection .note.Linux, "a", @note ; > > .pushsection .note.Linux, "", @note ; > > > > While GNU as allows this ordering, it warns for the opposite ordering, > > making these directives position dependent. We'd prefer not to precisely > > match this behavior in Clang's integrated assembler. Instead, the non > > __ASSEMBLY__ definition of ELF_NOTE uses > > __attribute__((section(".note.Linux"))) which is created with SHF_ALLOC, > > so let's make the __ASSEMBLY__ definition of ELF_NOTE consistent with C > > and just always use "a" flag. > > > > This allows Clang to assemble a working mainline (5.6) kernel via: > > $ make CC=clang AS=clang > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/913 > > Cc: Jeremy Fitzhardinge > > Debugged-by: Ilie Halip > > Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor > > --- > > Ilie has further treewide cleanups: > > https://github.com/ihalip/linux/commits/elfnote > > This patch is the simplest to move us forwards. > > > > include/linux/elfnote.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h > > index 594d4e78654f..69b136e4dd2b 100644 > > --- a/include/linux/elfnote.h > > +++ b/include/linux/elfnote.h > > @@ -54,7 +54,7 @@ > > .popsection ; > > > > #define ELFNOTE(name, type, desc) \ > > - ELFNOTE_START(name, type, "") \ > > + ELFNOTE_START(name, type, "a") \ > > desc ; \ > > ELFNOTE_END > > > > -- > > 2.26.0.rc2.310.g2932bb562d-goog > > > > > -- > Thanks, > ~Nick Desaulniers