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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 D1E9EC433E0 for ; Mon, 29 Jun 2020 18:16:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2598255A0 for ; Mon, 29 Jun 2020 18:16:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="h/M8dcuQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Xjvp/Ruc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2598255A0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hw0ITh1PCFgUgDWrIJ3+6fOp8yRSa74BkeLn2RzxubE=; b=h/M8dcuQXCjSbli2AkIG2rKHd yiq3JryzrlAg/+ApdM6OOSmUB7GUwqEPk5/iQCeqM58zS2FOBuVlqbb/If27dN2+5b1UO9EkgmykD mk3CPQOtCw9Uo9iBeW1InkF4KJMHi5GLBx+D31wsKQlaIFL+kEVuwQp7lQHIiC7ya30z4OvwF3MhW XbxmsjUm+jzh8omCJK4oQ3yyYi3HIsX6tfXd+58RjE2eVfwqobKUbjfXM8HpuhYx+iJYrNaS5YNQa dkEdsWFS1nvwAKngUkbG/PeHqigNPs0Mn29Pu38YWoaubHRFGA8UVPPe7f5QffI74QizmohPuPcRR 0QDZW1O6w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpyJN-0000ag-Dy; Mon, 29 Jun 2020 18:15:21 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpyJK-0000aF-AH for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 18:15:19 +0000 Received: by mail-qt1-x844.google.com with SMTP id i16so13573159qtr.7 for ; Mon, 29 Jun 2020 11:15:17 -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=ksn6KEgSSy4O04+EmiHmLNcv0njEAGgzFW6T11ji+vI=; b=Xjvp/RucTJD7ys4so77HqyBdKQg72774rOpK0Iy63xJF5nLNOOILQoRIXkvOl8GSiV +dq1LOTSqRzP649aH77rs+eXXLE6NrmWrR2ZfZCPcZIIXq+sCkRejxszABRcdazkcaLO sosTZdgioDe0Awvmhn8VQ9Xq7tdlEZdqFPTfi0ICfdG4ZOw15yRKYNYyr7GlNnUU/Jc6 j+yXaf+nXfjR9kDYWQi3iHL2zZJ08F13kaTJcXndLsH6fIgDkpVttULkAJxaKMU4AZTG otU+pDZSB+sDNIHb74V0Qlsb3g2ppZAYET8gjxxd9JFf9PRwuZVBIXjVJQHbrkmo8MjZ lAEw== 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=ksn6KEgSSy4O04+EmiHmLNcv0njEAGgzFW6T11ji+vI=; b=BTshdsSKjBI+KI3NOBfMYGjattK9tEte32Fke6tf/3hh1tDmpmBgTLRFWPlq2LozOI uCD3q0D59SEb2khhbmtfAsiAN3YtqWzI/OdEGzitEtPTWMQnQ+i53V31gAMKNSBDw8qp ERYcl9GxEEhQBnIfjqByLsku7OtRTkaEJfzMO526HF0/M39UpyF9NB8fGD3owc8hf0B6 VI/EIPPjBTXB7s0NkulnRYhhYdE9Yp7BLuK6hl7aG+XVpS6orS/FyxIihA0BXM+nJGzf ycfjVR278H3cbm9egZqJjfabs/tvVJDnxkHkLZW9AYjGXy1YQnrDRlJ7J+3ugPkdj8JM vxRQ== X-Gm-Message-State: AOAM530vd7ff/PvXJ37fv0FHHhofBsaaxl0De1467cbL750J7i0AeEQ0 Bj0jh5HOQpOKSCJh3G+nWhE= X-Google-Smtp-Source: ABdhPJzHr+OXXpT2ladJEzyIUGa3Qh7oKbbNWJhQOzQ+NHJbTju9YGsvUo+VZ1jPBQ+dsZ58uYQ4Zw== X-Received: by 2002:ac8:7242:: with SMTP id l2mr16374761qtp.320.1593454516576; Mon, 29 Jun 2020 11:15:16 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id z17sm592545qth.24.2020.06.29.11.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 11:15:16 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 29 Jun 2020 14:15:14 -0400 To: Russell King - ARM Linux admin Subject: Re: [PATCH v4 14/17] arm/build: Warn on orphan section placement Message-ID: <20200629181514.GA1046442@rani.riverdale.lan> References: <20200629061840.4065483-1-keescook@chromium.org> <20200629061840.4065483-15-keescook@chromium.org> <20200629155401.GB900899@rani.riverdale.lan> <20200629180703.GX1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200629180703.GX1551@shell.armlinux.org.uk> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, Kees Cook , Arnd Bergmann , Peter Collingbourne , Catalin Marinas , Masahiro Yamada , x86@kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Nathan Chancellor , clang-built-linux@googlegroups.com, Arvind Sankar , Ingo Molnar , James Morse , Thomas Gleixner , Borislav Petkov , Will Deacon , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 29, 2020 at 07:07:04PM +0100, Russell King - ARM Linux admin wrote: > On Mon, Jun 29, 2020 at 11:54:01AM -0400, Arvind Sankar wrote: > > 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? > > Do you mean in general, in the kernel vmlinux, in the decompressor > vmlinux or ... ? > Sorry, in the kernel vmlinux. ARM_TEXT includes *(.got) for 32-bit, and the 64-bit vmlinux.lds.S includes it in .text as well. The decompressor for 32-bit keeps it separate for non-EFI stub kernel and puts it inside .data for EFI stub. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel