From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B60BC433DF for ; Mon, 29 Jun 2020 19:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1329820786 for ; Mon, 29 Jun 2020 19:33:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BZU/9VIc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732303AbgF2TdT (ORCPT ); Mon, 29 Jun 2020 15:33:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733227AbgF2Tco (ORCPT ); Mon, 29 Jun 2020 15:32:44 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5E64C0307AD; Mon, 29 Jun 2020 08:54:04 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id c30so11812501qka.10; Mon, 29 Jun 2020 08:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=aJxCpiw45uiFCKFF/Aa3ZwVBKPmiXfb3oRMSPK0K9jk=; b=BZU/9VIc2Y6E9fhw3s/Nvu9omCHAjFS6JaJV5N4AxmLYc8SJERh++jMh8hnkBkk5Rj nj3dy4P+rSnq/nKutiHVABK5OvmhyQTpqlnRoybjbMehxbS3dchjXD/bXVVgiUic9uiX 9KEIZ9SFZNWU1A1IkKVOam+79epkd7faiaeumhjdsOfstN/OVNInEuKXfKQx/sEHHahv RB+f8/hLrG2qOALMJ24yNYyH+tfgwNzIZCerrom8AQJZpijMe2n8a1SdwL5fPMpUqUXp m3eWJnS1YrcNRqYOxz41DsFZ6fzDkWK87qnOzwnDRL2z6um5+Tphb3hwxdh4ZFbHTXGn PBAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=aJxCpiw45uiFCKFF/Aa3ZwVBKPmiXfb3oRMSPK0K9jk=; b=O9/E2OtiXV98xAPz8iP+4nhN496omKmdK/qPb/ff+/UeCD9HW2E2PeD335lFT9q7IL /0y3zcTGXlFdR+IZiMF8WGdOvCyL2Axpmi/uRE4eQVTdocDz9BUKcOoZmVtvkJtvgT0a juAbkhRCW8dBASFE+lN2rYlNOY0hvvmuizoM5WGs96/tNnvQqLTtcHH7/wlR03vuOLm/ Lk6T0tOBLq7Ja0L/j+4i7LY8Giqyq6slIbzVhkLPzQhAMFYyGLxQnWnU32y/wYZ8G5Zm 1Xe2L6/pDeXArWHcwWkyrGV5MVHJIVcjSABtM7p0Hjv8z3n6HOo7444i1IyiZRLr5A6p UsIA== X-Gm-Message-State: AOAM530/VDNixSidB90UlbtTb5L4Oc5o7lVq85ImQWw4Fxb48SUvMk/5 6m2j1b4sVtEY2aWNwvUNevM= X-Google-Smtp-Source: ABdhPJxwuEkyqc0Vgw+drYJAZii7afEIejnAVDgmQdUScCrDEFtKnUdsKQel/JRcOrIWioge2a+zKQ== X-Received: by 2002:a05:620a:c08:: with SMTP id l8mr15224938qki.239.1593446044131; Mon, 29 Jun 2020 08:54:04 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id l46sm81965qtf.7.2020.06.29.08.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 08:54:03 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 29 Jun 2020 11:54:01 -0400 To: Kees Cook Cc: Will Deacon , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Russell King , Masahiro Yamada , Arvind Sankar , Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , x86@kernel.org, clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 14/17] arm/build: Warn on orphan section placement Message-ID: <20200629155401.GB900899@rani.riverdale.lan> References: <20200629061840.4065483-1-keescook@chromium.org> <20200629061840.4065483-15-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200629061840.4065483-15-keescook@chromium.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Sun, Jun 28, 2020 at 11:18:37PM -0700, Kees Cook wrote: > We don't want to depend on the linker's orphan section placement > heuristics as these can vary between linkers, and may change between > versions. All sections need to be explicitly named in the linker > script. > > Specifically, this would have made a recently fixed bug very obvious: > > ld: warning: orphan section `.fixup' from `arch/arm/lib/copy_from_user.o' being placed in section `.fixup' > > Discard unneeded sections .iplt, .rel.iplt, .igot.plt, and .modinfo. > > Add missing text stub sections .vfp11_veneer and .v4_bx. > > Add debug sections explicitly. > > Finally enable orphan section warning. This is unrelated to this patch as such, but I noticed that ARM32/64 places the .got section inside .text -- is that expected on ARM?