Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp558568pxa; Fri, 21 Aug 2020 14:31:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRz2FNusXYUKeIVCCn0D5Ou9DEAis1hj4Qto1qB0J+VG+bgxCHA6WvQEn9aXKGE2z7ESM3 X-Received: by 2002:aa7:c353:: with SMTP id j19mr4925380edr.128.1598045508919; Fri, 21 Aug 2020 14:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598045508; cv=none; d=google.com; s=arc-20160816; b=rFQ8ZaF8rrTjT48dc5gXfjjD0IhqURt7dDe3kofs6XnautcPXuuKko/EKm6V3Cx3On VRAhPruHMgXhJGkHU6kYaAGV1Wfo8qICo+JnipbwAXYJi5I/AE30vTh5OQnhFoLWx0Uh qjxsFGSry+o74hS8Brktlv2k0YcCG9jaYoW7Z/A+sWZM85/iYO7VcZDC02M80WopPub6 KxplMybD80dVAuj+rVmZ0pZjUYtodGeq9rGFSYO0MlOJDK9FQy5vhEOE5B17VCLFKLBC gIIQ2Z+lCjPC3X9/jRPkHxAZizMe/Wm7tn3SkBBJRo0spnjBNVRP/Jdi3vfV/97bf+UG 01MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=u1w1dHewQ24Wh+EinJOH0pHgm/+gMZl7ydhUDFjuxnU=; b=uF6kinGFwE3oDMb2UwYMYyMvunNLT/GzWjkWEzEOYAd4du5RPQcSYw32eYpj65QHzS jEVnwM/fxFxlhtd+g4tQPgV4RgLsjACS9/1YgroCyJEqMLVj3zW7SxCi5Va3m3F+4GC0 0MRQ7oZOroZ9aq8gXE1Ja1yjLBok5CcONFdp1NCCkd5qQlgyiiykHHvzoJJ/zSvJmBDx cCdHq8qQaKH6QOa7La3kku/RmQWspc+ZNaZT0LVN6rW3xmXVqcnyrbyT4c34fstmKcXE veu9knVr2ZTyKVObi+wpfXOllAHoj3KWS/sMW93hDXfnx/ndPU8ZDuJVjhorx5d9frDd iFYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OoMfAjUZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r6si1971624edb.217.2020.08.21.14.31.25; Fri, 21 Aug 2020 14:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OoMfAjUZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbgHUV2d (ORCPT + 99 others); Fri, 21 Aug 2020 17:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726433AbgHUV2c (ORCPT ); Fri, 21 Aug 2020 17:28:32 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C8C1C061573; Fri, 21 Aug 2020 14:28:31 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id k18so2250837qtm.10; Fri, 21 Aug 2020 14:28:31 -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=u1w1dHewQ24Wh+EinJOH0pHgm/+gMZl7ydhUDFjuxnU=; b=OoMfAjUZNkobdLMpwQ9UFNRLMGg4krPXHtBq3Ds15ChRcLsqX5B44nEIZJ7s3FioZb 6oYiG18I/qsd0529aq3ua3uxtI9gSYEoW1ALH3ba3XWAGTaZyUYdsQjnyKpSlukJxuDK blqEdLgUgL92jae/PdnFYiYeQApnlj3mz4LbeuOo0gZeJGEl1IO3i09PIX52HxaxPzuw RFp86XFjqI3KHojp/MGn7uEZDzu48zBiI1YdZs1C9zvnjpGOTRvfXPiIBijrgP0nQZ/8 r1qooc2oOrlTJHcXqo4mDtmOntpRN/IkGUKtZOIH8/BEzBMvlyrn5M0AFD1NgtMnpmVn cKwA== 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=u1w1dHewQ24Wh+EinJOH0pHgm/+gMZl7ydhUDFjuxnU=; b=BX2MLtIcDcf8Ced0SLuiHabf4WDIiqrULdH+/X8rQDjutqeQKi056Jza3vWjKYq6re TBXzkWVPbTh6BSmfeeauMCi9DhnNlx8mcoNXVegZbxvkrngyu0pGu82plVsAYw5q5yLC jlf/qdcfmgx95r7/TekMrrXXCG/M05S/U34Joag7srIKmlH7qixrTDE+OX4PfL1FDDFy OfSRhAIzBbbxdZUB5UhsdSeN36m2+KQRY9K+lyoD9KW0Naz+wsj0ST+urbqHBQ8zG91E rwZsTg4XVFuILgpAUVBR4TUQR2t+PZ2bp9SwJPP/iSV61+BKk8b7/M3XlAYjbjkNrNnG vzrw== X-Gm-Message-State: AOAM531cHi1mcfApn5zQ4ImWX0f+vNV00Dg6Wo54lPjkrcsv6mZREVSf CzNHN1JCa74rnilLYH+9fRc= X-Received: by 2002:aed:27c8:: with SMTP id m8mr4565676qtg.302.1598045310404; Fri, 21 Aug 2020 14:28:30 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id p189sm2823699qkb.61.2020.08.21.14.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 14:28:29 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Fri, 21 Aug 2020 17:28:28 -0400 To: Kees Cook Cc: Arvind Sankar , Ingo Molnar , Catalin Marinas , Mark Rutland , Ard Biesheuvel , Peter Collingbourne , James Morse , Borislav Petkov , Ingo Molnar , Russell King , Masahiro Yamada , 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 v6 27/29] x86/boot/compressed: Remove, discard, or assert for unwanted sections Message-ID: <20200821212828.GA1741495@rani.riverdale.lan> References: <20200821194310.3089815-1-keescook@chromium.org> <20200821194310.3089815-28-keescook@chromium.org> <20200821200159.GC1475504@rani.riverdale.lan> <202008211421.47347CA42@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202008211421.47347CA42@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 21, 2020 at 02:21:34PM -0700, Kees Cook wrote: > On Fri, Aug 21, 2020 at 04:01:59PM -0400, Arvind Sankar wrote: > > On Fri, Aug 21, 2020 at 12:43:08PM -0700, Kees Cook wrote: > > > In preparation for warning on orphan sections, stop the linker from > > > generating the .eh_frame* sections, discard unwanted non-zero-sized > > > generated sections, and enforce other expected-to-be-zero-sized sections > > > (since discarding them might hide problems with them suddenly gaining > > > unexpected entries). > > > > > > Signed-off-by: Kees Cook > > > .rel.dyn : { > > > - *(.rel.*) > > > + *(.rel.*) *(.rel_*) > > > } > > > ASSERT(SIZEOF(.rel.dyn) == 0, "Unexpected run-time relocations (.rel) detected!") > > > > > > .rela.dyn : { > > > - *(.rela.*) > > > + *(.rela.*) *(.rela_*) > > > } > > > ASSERT(SIZEOF(.rela.dyn) == 0, "Unexpected run-time relocations (.rela) detected!") > > > } > > > -- > > > 2.25.1 > > > > > > > When do you get .rela_? > > i386 builds, IIRC. I can try to hunt that down if you want? > > -- > Kees Cook Nah, just curious. Thanks.