Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3646187imw; Mon, 18 Jul 2022 11:52:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tA0TUc3ynSqk7A1IKc22UyeO3oHdzFe250HbTApiKxQwirETUeTJOr5bdKlgwLSWlYOkmT X-Received: by 2002:a17:902:74cc:b0:16c:6435:8cac with SMTP id f12-20020a17090274cc00b0016c64358cacmr30023236plt.98.1658170371748; Mon, 18 Jul 2022 11:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658170371; cv=none; d=google.com; s=arc-20160816; b=EKwWLrGP6//L9d5I1/B70as7/GCsKVDiy9BtAR4ogPdZ+jzyzGxLO44vYEA+TFS0yN UtoySbRerX4U6wzI5EXYWbY66Lc8oNbQbs5MBUrBiQ3DUdLeHjfq6FqMiXp+iU75DVzY 5o84VV3t/sfnKS8xp2LozM1Ucd2teWtBcbaxPXIWEUsWkgDJ/L2mlKLSj0fUFAVAX1K2 uYtrSH5UpGzO/Lwr3R2IBdqabog3lyqNKmDvj41Q/Jla5cqwoXQcc8+ZGhRhF1LLWFZp AojmeErm/yjLX93x81y6s3SYK3/X24WzU6xlN951tK5FbEigR9kJKnBF0filP90notS+ o3Nw== 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=uKNO/2jKtYxtHpiKjjZWFyfX1vgvMagozZ10mRTcyRY=; b=rsAqAgJaJj3DD6HU1dluKps85wy8baRPHBkWjLAJVVrodZq7ZclBV3W/nh87Ky2FrH Hu5cRK7TBD1oNbBo9das3y7PRlQeWX750rqeCtl2ovKnq55fcoX12sqlYsHYmXi5LQMg 0jculsWwQKyaANKS4kxoJitsetugPZFMvVKhHH9adrLZ2UhZrPu8ue4x2+gtLEL0822p bxP2qbAFjzxxKcJVAHOd92zUaNFuEy9+qhZ+Lfb38wm35Eyhr3L6L/kv0obC2fTZxZMq p157vMhLud5+qBGzxGuq5N4XaEHlaoS+KJ2zDqQ8lXBZoMucuOCaprzAkPv1S+sRsTJr I8CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IBilH2yk; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y193-20020a638aca000000b0040d54868742si14619664pgd.24.2022.07.18.11.52.36; Mon, 18 Jul 2022 11:52:51 -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=@linux-foundation.org header.s=google header.b=IBilH2yk; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236002AbiGRSeZ (ORCPT + 99 others); Mon, 18 Jul 2022 14:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235957AbiGRSeX (ORCPT ); Mon, 18 Jul 2022 14:34:23 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F5962DF for ; Mon, 18 Jul 2022 11:34:22 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id tk8so11533786ejc.7 for ; Mon, 18 Jul 2022 11:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uKNO/2jKtYxtHpiKjjZWFyfX1vgvMagozZ10mRTcyRY=; b=IBilH2yk53/8G11w0puh2eRVbRH56qZC4Tjg3Pq7xlpPa17Nee9c7J7l1O2yx6UVN0 z3xxHnOh5QjU9uN/l6evyV0y+yYqZOk6RJ/fGPflrU720VaN8nL55cKT5RMTIrXLfAFu hmXxGCVcHQ+wDwrb4zsbvFrKF9iDVqdEu3NLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uKNO/2jKtYxtHpiKjjZWFyfX1vgvMagozZ10mRTcyRY=; b=ZvcpQRGVKpvAkxQT7Gf5dh+55vbQtbJH52dmvOGSiV2KXX6MNrIA0qE0ongTD591PB bfDoZTY0kEUdXlpWkELONuKe0o0TQA+QGqmLXUNplSaoUgm2oZnz38sId9Ry3lU8NYfA yP6ZgbQylkn6GaPqoUTESAP8kz5lu/izctbKY8Vz29o6TozlMbDmqMTB3twO/8tDzDDA XtMO5kra9zo1zm12Yjq7vVqiR9pzJlEV+6WclFaJ/ffgEa98qgeEZxl0AYLbPINtlyPP QCw/2HURecLRPtqptt8+4y7khmMKbEaI6BYW5sLmvTgYfygcGmWT7HxxtXrZCPsbrzGI gm/A== X-Gm-Message-State: AJIora8N7eH6m0bZmkTQ3nxLGeylZbzxenQN61W87WdKCxRhScwzB/0H 9bjeqZ5O8S1V1GcgqlbtewRylH3W6IsDCMIN X-Received: by 2002:a17:907:3e9a:b0:72b:44d4:4482 with SMTP id hs26-20020a1709073e9a00b0072b44d44482mr27527055ejc.34.1658169260938; Mon, 18 Jul 2022 11:34:20 -0700 (PDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id v10-20020a1709061dca00b0072b32de7794sm5770634ejh.70.2022.07.18.11.34.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jul 2022 11:34:20 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id bu1so18308022wrb.9 for ; Mon, 18 Jul 2022 11:34:19 -0700 (PDT) X-Received: by 2002:a5d:544b:0:b0:21d:70cb:b4a2 with SMTP id w11-20020a5d544b000000b0021d70cbb4a2mr23607916wrv.281.1658169258764; Mon, 18 Jul 2022 11:34:18 -0700 (PDT) MIME-Version: 1.0 References: <20220715194550.793957-1-cascardo@canonical.com> In-Reply-To: From: Linus Torvalds Date: Mon, 18 Jul 2022 11:34:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efi/x86: use naked RET on mixed mode call wrapper To: Borislav Petkov Cc: Peter Zijlstra , Thadeu Lima de Souza Cascardo , Linux Kernel Mailing List , linux-efi , "the arch/x86 maintainers" , Ard Biesheuvel , Thomas Gleixner , Greg Kroah-Hartman , Guenter Roeck , Josh Poimboeuf , stable , Andrew Cooper Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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, Jul 18, 2022 at 9:28 AM Borislav Petkov wrote: > > So I'm being told we need to untrain on return from EFI to protect the > kernel from it. Why would we have to protect the kernel from EFI? If we can't trust EFI, then the machine is already compromised. We just *called* an EFI routine, if EFI is untrusted, it did something random. I mean, it could have already done something bad at boot time when it loaded the kernel. So no, let's not "protect ourselves from EFI". Linus