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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E960AC433E0 for ; Wed, 24 Jun 2020 19:43:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C63502082F for ; Wed, 24 Jun 2020 19:43:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ity7y8rG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391308AbgFXTnr (ORCPT ); Wed, 24 Jun 2020 15:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391221AbgFXTnp (ORCPT ); Wed, 24 Jun 2020 15:43:45 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E84C3C061573 for ; Wed, 24 Jun 2020 12:43:43 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id 207so1468972pfu.3 for ; Wed, 24 Jun 2020 12:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WCT8Mp1fiF4Iw+yjIn+C6cOd3D8sms76UQBr6znEpWk=; b=Ity7y8rGEc4oXEiXH3BGiprKBtYxV9crm+SUp0bxSrD2vqsQpgiAGySgg9bKC7LzJV MvzzUHrbKRWE0ccNr7TR1xFfDhtPE+sOVldl9vLooehH6TKNQKk4H23pnw3+Yywmxc3X Gf1bDrSN+lJP7Y5X+I+PBa3FqpnMes7qV+nio= 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; bh=WCT8Mp1fiF4Iw+yjIn+C6cOd3D8sms76UQBr6znEpWk=; b=p5YS1eJnEYdY2/ZydQLXMKl4VQAesfJwg87kcaz+dSlEyuGCm6wrdEMmiu1w5KXVVr d597g3InBlTq4438r/swdk3esxKJ4dnpVLSv1by7WYzt4K0tkxw8x8jlHWkA+NCd2SHj o6T3GvRygc23q6Nyr09WPL7AwanRl0N8mtrCSglTlJeoiYTggPSLqQcKK0Z1mDF4981C etsUTnmw08+TWycCXsSQylhN/k3IUFbp00PY18jGeQIZqbVBomeh37isdnORqlE8ey0L R0X+wYAAP2LO59Fqj4ECGKu/0g1L9DAqNzMGC2TsCucWqCNdm82z7etX7KzxoZAefEjO +l2Q== X-Gm-Message-State: AOAM533p5R8U6F8hcPNWnSmGyPJr4nvLtXVzT9dTqIfYXJnP77zrWUoZ zUqFzQrYkBAea19Xb41XY1UcJA== X-Google-Smtp-Source: ABdhPJwP/uUgjETkk5aFs5K2MQeLa9UJBGY/bZTj/5fR8QMrKjmZ3xMU7b9faBxVf+JpeANaqXIF+g== X-Received: by 2002:a63:c004:: with SMTP id h4mr23300961pgg.385.1593027823302; Wed, 24 Jun 2020 12:43:43 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j126sm20542728pfg.95.2020.06.24.12.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 12:43:42 -0700 (PDT) Date: Wed, 24 Jun 2020 12:43:41 -0700 From: Kees Cook To: Nick Desaulniers Cc: Russell King , Masahiro Yamada , Nathan Chancellor , Will Deacon , Ard Biesheuvel , Arnd Bergmann , Linux ARM , LKML , Eli Friedman Subject: Re: [PATCH v2 1/2] arm/build: Warn on orphan section placement Message-ID: <202006241242.9A6E0E2387@keescook> References: <20200622204915.2987555-1-keescook@chromium.org> <20200622204915.2987555-2-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 05:03:46PM -0700, Nick Desaulniers wrote: > On Mon, Jun 22, 2020 at 1:49 PM Kees Cook wrote: > > [...] > > @@ -37,6 +38,13 @@ > > *(.idmap.text) \ > > __idmap_text_end = .; \ > > > > +#define ARM_COMMON_DISCARD \ > > + *(.ARM.attributes) \ > > I could have sworn that someone (Eli?) once told me that this section > (.ARM.attributes) is used for disambiguating which ARM version or > which optional extensions were used when compiling, and that without > this section, one would not be able to disassemble 32b ARM precisely. > If that's the case, we might not want to discard it? Perhaps we want to treat it like .comment and include it in the ELF? > > +#define ARM_STUBS_TEXT \ > > + *(.gnu.warning) \ > > + *(.glue_7t) \ > > + *(.glue_7) \ > > This changes the order of .glue_7t relative to .glue_7. Maybe that > doesn't matter. Good point. I'll swap it just for consistency. Thanks! -- Kees Cook 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,URIBL_BLOCKED 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 02BACC433E0 for ; Wed, 24 Jun 2020 19:45:39 +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 C89F32077D for ; Wed, 24 Jun 2020 19:45:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="zArJZAQl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Ity7y8rG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C89F32077D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=oqAH7X7Ff65GtI0Hd7G/lmaEC7p1Tw3srPubClqBXPw=; b=zArJZAQl09RlTS1RtzE0VR2IU 1Z6BOxKJB99dwu5pGHWmdYWpn0sQnLcxemS5oy35ih/yp7b61mhB4cQYzMNIY79o1l/e1BMFJ4GUj 0eL2ER8MZw8X6PjT6LfrQWsy2Di5oiP1YY7GlhFLjoRpsMxvUb4yK0cV3BFHm2hPwRhKVXfQ9rhLD bwVklp+rSqLsV6vlvx3vfASgzaOKUkgf/n5I/JnDNLAFNUUrLlhGxHo+Tq3eAaF97sIrLAHTHSOml bVPV0q/2o8IvYNDeCGK5QWo3hJMGN9fvAUsD+IOYgAagTVW4eYiFEa067Xl9uuDFmzHktdYH20Thf P/V7lnQ3A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joBJE-0006mn-IJ; Wed, 24 Jun 2020 19:43:48 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joBJB-0006lJ-Ih for linux-arm-kernel@lists.infradead.org; Wed, 24 Jun 2020 19:43:46 +0000 Received: by mail-pf1-x444.google.com with SMTP id q17so1646939pfu.8 for ; Wed, 24 Jun 2020 12:43:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WCT8Mp1fiF4Iw+yjIn+C6cOd3D8sms76UQBr6znEpWk=; b=Ity7y8rGEc4oXEiXH3BGiprKBtYxV9crm+SUp0bxSrD2vqsQpgiAGySgg9bKC7LzJV MvzzUHrbKRWE0ccNr7TR1xFfDhtPE+sOVldl9vLooehH6TKNQKk4H23pnw3+Yywmxc3X Gf1bDrSN+lJP7Y5X+I+PBa3FqpnMes7qV+nio= 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; bh=WCT8Mp1fiF4Iw+yjIn+C6cOd3D8sms76UQBr6znEpWk=; b=EHdZ7pf8yU/G8xz9WIxv6nAJ9P5++H8SJ7TW5VFeo/vaG03r/4+93uKBpN5xEu4Kkd sxCaIcxwoDmapLRBctASdZvJAjpDIS3C7q6BzK1/3EYCQk3nRr7HFWHECGUxm9l8wyWW qEfZbi3SOdOSquy78IIKdLzuuiXjryi2a6LV5kVgRnYZCdpNy5chqJEO/vhxXlZEppXh HtWLkVNXBOwSpW/LRfOBSldRKy7nOBmgjlc7DNDdbmDWmuQZHuwc2EpIcJ2TPMBhYH6P ieST9F7YcKH01aTv4hqz7lPhNGb2GGg6xBKRLOngA1PV4/qxvSVqVjYthMcUXrvLMv7W zLrA== X-Gm-Message-State: AOAM531wdpjERWqMr9c2tR1puuo/HS1EzveDQbL1qVEBCq6Q2m8T4LdV MlWF/tu0OsJT6MZtMP1El1Oiww== X-Google-Smtp-Source: ABdhPJwP/uUgjETkk5aFs5K2MQeLa9UJBGY/bZTj/5fR8QMrKjmZ3xMU7b9faBxVf+JpeANaqXIF+g== X-Received: by 2002:a63:c004:: with SMTP id h4mr23300961pgg.385.1593027823302; Wed, 24 Jun 2020 12:43:43 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j126sm20542728pfg.95.2020.06.24.12.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 12:43:42 -0700 (PDT) Date: Wed, 24 Jun 2020 12:43:41 -0700 From: Kees Cook To: Nick Desaulniers Subject: Re: [PATCH v2 1/2] arm/build: Warn on orphan section placement Message-ID: <202006241242.9A6E0E2387@keescook> References: <20200622204915.2987555-1-keescook@chromium.org> <20200622204915.2987555-2-keescook@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: Arnd Bergmann , Masahiro Yamada , Eli Friedman , Russell King , LKML , Nathan Chancellor , Will Deacon , Ard Biesheuvel , Linux ARM 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 Tue, Jun 23, 2020 at 05:03:46PM -0700, Nick Desaulniers wrote: > On Mon, Jun 22, 2020 at 1:49 PM Kees Cook wrote: > > [...] > > @@ -37,6 +38,13 @@ > > *(.idmap.text) \ > > __idmap_text_end = .; \ > > > > +#define ARM_COMMON_DISCARD \ > > + *(.ARM.attributes) \ > > I could have sworn that someone (Eli?) once told me that this section > (.ARM.attributes) is used for disambiguating which ARM version or > which optional extensions were used when compiling, and that without > this section, one would not be able to disassemble 32b ARM precisely. > If that's the case, we might not want to discard it? Perhaps we want to treat it like .comment and include it in the ELF? > > +#define ARM_STUBS_TEXT \ > > + *(.gnu.warning) \ > > + *(.glue_7t) \ > > + *(.glue_7) \ > > This changes the order of .glue_7t relative to .glue_7. Maybe that > doesn't matter. Good point. I'll swap it just for consistency. Thanks! -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel