Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp33337rwb; Mon, 26 Sep 2022 08:58:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7gezcvj3kSOPpqeySijaPWe2WLRNm37MHWky7s79+Vo3sMjLfFqBsV71fC9YTSdAmlT77n X-Received: by 2002:a05:6a00:14d5:b0:542:9c32:ab27 with SMTP id w21-20020a056a0014d500b005429c32ab27mr24498111pfu.64.1664207928575; Mon, 26 Sep 2022 08:58:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664207928; cv=none; d=google.com; s=arc-20160816; b=HgiNCEsJPDriVaEhD/wIjFZmbxj39BF9DTzDKNYyqPj0/4Zc/0lBdWaF+eQ20kZ1Aw +z/7v9kb6+cnQN+rn4imu6XglafAL7m4gb/lOmRR1cuBIVpdGp2rz+FwzH5Zh24ohcMc qbiID0vZeYB2uN8BVQ8vGgA8jNbxiSI31eS+cg5zoYlgu5KV+EIxNj8kRlHeBNG41aKR mAnax6gto0L0qJKrpEwznBc0/Jn2OOozjkKuIkIOo4OmLTNNh1lBC4vHdhu1vikeahVt Ynpu7foj7qpvHBVJH77LXq54bIpy92CnewuT6o20fjHgqmHDSBv5oJ5lwwzyfVpcOJOM /p5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TUYJYqSd4jor/lxJEt262VgRMafpQ9dsUBKaWm7idrI=; b=yJhRWrVGLJLIK1Cgs8nyYjmH+rFi5nn2+1zM1p/r+XaAM+7w3oZOKVkhYWsgnQ78Ms 1+Bag8gYOcQOhJ/nymsZ8yAmtT/PcVpIg8k0wMqmo/PesUZO353xF+sJlZ1eFsg4hS3M 4Sk30nrCc+Ht/4bhot+a5OUyv0n1rNOmyqgc8+aJaw7ITGsAPLH7v7+6mk034R8o+L2v EQmgwMTcjZSyAKIXlcA/BJ3/Jms42k4eJaHJUZKsVEabETZHXDbcc6HDk4cuR3iUhpCx 4Ql/6N2Q9iwUmDJdO7kTTCu/KD+e2e9BqqrtWFKGe4Tpa48LWf6YQ0R7nzVtnyTm2CEn gaRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nb2Ky3/q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a170902d54e00b00170ad89d371si11874320plf.465.2022.09.26.08.58.36; Mon, 26 Sep 2022 08:58:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nb2Ky3/q"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236643AbiIZPbV (ORCPT + 99 others); Mon, 26 Sep 2022 11:31:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237367AbiIZPah (ORCPT ); Mon, 26 Sep 2022 11:30:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8A174F38F; Mon, 26 Sep 2022 07:16:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 85292B80AB3; Mon, 26 Sep 2022 14:16:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 431D9C433C1; Mon, 26 Sep 2022 14:16:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664201776; bh=TUYJYqSd4jor/lxJEt262VgRMafpQ9dsUBKaWm7idrI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nb2Ky3/q5mbHR+N52o5cXYMMAuMbt9/GsKrdxhHJF6rI23h19460jHISA14ah/wDe E/flHbDCVDH2veA1DNmrqsmvnAu4Id6P0ELhY1XumCfI+8AQh8RDaWuiJyTY5Iu3MJ te8RUQ9L7RFRNUMliLdCZYQE08CrxW9iYMe4/q/F8/7ERw4SaV2ExoVHgNAcUEYATX waUXRc1tsQC10RiVP12glpHdcT8H4twilZ3hCp/rnF6keg1xEOQxQM6ERWDQ5Rws3N iK0vw/fdftHElavp2jE+O59RVoq1M/fbVnZnZUuQEAWZV/0CHyp1CsFNPAoYTJcE07 2dGOLZtd9LhfQ== Received: by mail-lj1-f182.google.com with SMTP id b6so7579545ljr.10; Mon, 26 Sep 2022 07:16:16 -0700 (PDT) X-Gm-Message-State: ACrzQf2mJkttg/yBbSViPLhNH1fdHJn31j1/XXC0FOSrtEcgjtYwc2IH WfEsICKqIulQd41oN5YPHJp1cWj9Dza0tbVMsUE= X-Received: by 2002:a2e:8349:0:b0:26c:4311:9b84 with SMTP id l9-20020a2e8349000000b0026c43119b84mr8218226ljh.152.1664201774254; Mon, 26 Sep 2022 07:16:14 -0700 (PDT) MIME-Version: 1.0 References: <20220926100738.148626940@linuxfoundation.org> <20220926100738.463310701@linuxfoundation.org> <20220926110826.GE8978@amd> In-Reply-To: <20220926110826.GE8978@amd> From: Ard Biesheuvel Date: Mon, 26 Sep 2022 16:16:02 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4.14 06/40] efi: libstub: Disable struct randomization To: Pavel Machek Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Daniel Marth , Kees Cook , Sasha Levin Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Sept 2022 at 13:08, Pavel Machek wrote: > > Hi! > > > These structs look like the ideal randomization candidates to the > > randstruct plugin (as they only carry function pointers), but of course, > > these protocols are contracts between the firmware that exposes them, > > and the EFI applications (including our stubbed kernel) that invoke > > them. This means that struct randomization for EFI protocols is not a > > great idea, and given that the stub shares very little data with the > > core kernel that is represented as a randomizable struct, we're better > > off just disabling it completely here. > > > Cc: # v4.14+ > > AFAICT RANDSTRUCT_CFLAGS is not available in v4.19, so we should not > take this patch. > Ugh, as it turns out, this macro doesn't exist before v5.19 so it should not be backported beyond that version at all. Greg, can you please drop this patch from all the -stable trees except v5.19? Thanks, and apologies for creating confusion.