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=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 193A9C433E2 for ; Thu, 3 Sep 2020 22:23:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEC1920722 for ; Thu, 3 Sep 2020 22:23:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MDW/84QF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728015AbgICWXm (ORCPT ); Thu, 3 Sep 2020 18:23:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727065AbgICWXl (ORCPT ); Thu, 3 Sep 2020 18:23:41 -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 27E30C061244 for ; Thu, 3 Sep 2020 15:23:40 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id f18so3455687pfa.10 for ; Thu, 03 Sep 2020 15:23:40 -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=H9pa3N3N+X5kZ3hnxzvQ5nbf/nL9Hg2di+HfYCma81c=; b=MDW/84QFAbUZu6t/g0TK/VAn9O+TVo4DzXtdS9Mhsj4QS/PE4e+Rn1k5NJYTcEw24e tNZS2BxVn/MJcmyK/CDSaMc4ViToYo9qGsGIvo5Wk1nGGaIuLIS6ugX3FalJIhONa1De fN3g8m6b4O4IAz78V2dpe1p5CqrvjqKDQ1UOY= 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=H9pa3N3N+X5kZ3hnxzvQ5nbf/nL9Hg2di+HfYCma81c=; b=aO3TtuexKHjNj5tNGzWFIe/rrYQ3W/AzRTppDGMRC7iubUvIBnJjGI7AzdNlrN6s5v JEAMYNZKPfrWHYIg0FwkkqMpd4qgiK4dVPneVFEcA8qh3Kv5Li+5jA5cifIevdGvdfJF Gz4xb8NJlVTUlboGgIa5d2d20k9i0835ptIpoOXURBOboUhHRDI/6qVg15ls+zR+DlV3 N0xJ3go8kdVT0KGY3yrAcA6IGUUgARcYpISgATTgiegdafq047P5K/hhktxFOFGh0Vit dh/fJV6/fxuWjSCeu7m57ujr4sCC2r1l5HMX18uejhpLmdiaTPCLm+VMrqg2XRiQ7LWu kNPQ== X-Gm-Message-State: AOAM530mDeXUHdGdh59OsnOyERxhFJOukgJ/KiJWI5NEKU/vPlw8G0rP lX9GLXvlll4ee0Y/QiOGfEa5hg== X-Google-Smtp-Source: ABdhPJxcY2j2KcoBxTS2ZsNzK0y4z5+F+CWnnaOAlqa994vL2EIo7Uflbx8UD2XsOoy0qHrpZNJapg== X-Received: by 2002:aa7:9286:0:b029:13c:1611:66c1 with SMTP id j6-20020aa792860000b029013c161166c1mr4124056pfa.12.1599171819570; Thu, 03 Sep 2020 15:23:39 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q3sm4361846pfb.201.2020.09.03.15.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 15:23:38 -0700 (PDT) Date: Thu, 3 Sep 2020 15:23:37 -0700 From: Kees Cook To: Sami Tolvanen Cc: Masahiro Yamada , Will Deacon , Peter Zijlstra , Steven Rostedt , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 13/28] kbuild: lto: merge module sections Message-ID: <202009031522.2BA9A035@keescook> References: <20200624203200.78870-1-samitolvanen@google.com> <20200903203053.3411268-1-samitolvanen@google.com> <20200903203053.3411268-14-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903203053.3411268-14-samitolvanen@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 01:30:38PM -0700, Sami Tolvanen wrote: > LLD always splits sections with LTO, which increases module sizes. This > change adds a linker script that merges the split sections in the final > module. > > Suggested-by: Nick Desaulniers > Signed-off-by: Sami Tolvanen We'll likely need to come back around to this for FGKASLR (to keep the .text.* sections separated), but that's no different than the existing concerns for FGKASLR on the main kernel. Reviewed-by: Kees Cook -- 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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 8DCB6C43461 for ; Thu, 3 Sep 2020 22:24:48 +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 5249120716 for ; Thu, 3 Sep 2020 22:24:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mJQxCEQj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="MDW/84QF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5249120716 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=fFDOSMvG7kbDnW5rt+u8h9DtGSyv3hugDZqODO3mqm4=; b=mJQxCEQjKPxvofoCAANp+lNeX qxfyZXN4+wZeeeiqvNgCsCONSqaCJH74qcFLbeM98PCB8hcLlFwf26S4JNHWj2ePkkPl9rhiJV46U 5MXsBmRqqHWoW/kSHa2+TP+vZ38KYFL9UnwYjkrQ5p/wxBFNmY8QRKaQXaIcnNPC2GCMAEum0UCWl jULnc6rV4PIFbLuBvBMfYtxTtbOGh4lLbbX6xei81nIjEn+R92JXBjSbH1GYDmTYK7nNqWrHFsMpG d0rcwYXSma9587R8a5CvX12omIZBBuR6VQdG4T6SR4x2g1tyaWuegbay6Iv+GmQQe48SMmUE56nOA vR33jzGow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDxdw-0000Pz-5Z; Thu, 03 Sep 2020 22:23:44 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDxdt-0000Or-Iv for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 22:23:42 +0000 Received: by mail-pg1-x544.google.com with SMTP id w186so3231234pgb.8 for ; Thu, 03 Sep 2020 15:23:41 -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=H9pa3N3N+X5kZ3hnxzvQ5nbf/nL9Hg2di+HfYCma81c=; b=MDW/84QFAbUZu6t/g0TK/VAn9O+TVo4DzXtdS9Mhsj4QS/PE4e+Rn1k5NJYTcEw24e tNZS2BxVn/MJcmyK/CDSaMc4ViToYo9qGsGIvo5Wk1nGGaIuLIS6ugX3FalJIhONa1De fN3g8m6b4O4IAz78V2dpe1p5CqrvjqKDQ1UOY= 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=H9pa3N3N+X5kZ3hnxzvQ5nbf/nL9Hg2di+HfYCma81c=; b=PVF4jjt1HhpZStb9A0HxBLrOBozDohJspCM+uVFF4Tzm+yT1dscvYh/X3PdcskTexw e9PFrT8zl31rA7gjXaNTGvGdwwvU7Na90Ni9iD4k01gjt3HM+ki2pvfm8aryJ8HNXJ0b kUn553M7I78+0Azwzky2iyBpq8PnuRUEd95gqwKA/43GMWP16hdbF9NWotmA9iZELnOA h7tPi/Iw1fTd0MXqtw4FpUBH9u3bqN4sRf408imYm70xva/wS2Knjkms519bg24SXK8m 71V7htkwEC8Hiuk4lrhbliFmcz3nptoZvvTvM/0lSRE/FcMs3fe9H3zl/r3kxBJozaSS x0HA== X-Gm-Message-State: AOAM533rGi6aGs4j9rELygRc2VjteKWB+uPsMnHoQEQkPtWN2+hQjiKa 0DxMLga4DSYy7cgdkjeuVPE8Yw== X-Google-Smtp-Source: ABdhPJxcY2j2KcoBxTS2ZsNzK0y4z5+F+CWnnaOAlqa994vL2EIo7Uflbx8UD2XsOoy0qHrpZNJapg== X-Received: by 2002:aa7:9286:0:b029:13c:1611:66c1 with SMTP id j6-20020aa792860000b029013c161166c1mr4124056pfa.12.1599171819570; Thu, 03 Sep 2020 15:23:39 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q3sm4361846pfb.201.2020.09.03.15.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 15:23:38 -0700 (PDT) Date: Thu, 3 Sep 2020 15:23:37 -0700 From: Kees Cook To: Sami Tolvanen Subject: Re: [PATCH v2 13/28] kbuild: lto: merge module sections Message-ID: <202009031522.2BA9A035@keescook> References: <20200624203200.78870-1-samitolvanen@google.com> <20200903203053.3411268-1-samitolvanen@google.com> <20200903203053.3411268-14-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200903203053.3411268-14-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200903_182341_654050_DCDFD837 X-CRM114-Status: GOOD ( 12.79 ) 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: linux-arch@vger.kernel.org, x86@kernel.org, "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Will Deacon , 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 Thu, Sep 03, 2020 at 01:30:38PM -0700, Sami Tolvanen wrote: > LLD always splits sections with LTO, which increases module sizes. This > change adds a linker script that merges the split sections in the final > module. > > Suggested-by: Nick Desaulniers > Signed-off-by: Sami Tolvanen We'll likely need to come back around to this for FGKASLR (to keep the .text.* sections separated), but that's no different than the existing concerns for FGKASLR on the main kernel. Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel