Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4706534imw; Tue, 19 Jul 2022 11:37:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKzuCHrqpDUia4cLRJWuYQ+NreAis0wxsuQSeTaRcaZSAxO6X3kE5KW4ecPMoNiuzFMsTF X-Received: by 2002:a05:6402:240a:b0:437:d2b6:3dde with SMTP id t10-20020a056402240a00b00437d2b63ddemr45478962eda.62.1658255826838; Tue, 19 Jul 2022 11:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658255826; cv=none; d=google.com; s=arc-20160816; b=c2CcZa1hcSN7qv4IGxEMIkdadcBW0tVEAhIGyHzKvq9pnw34n7yUc19gE6BL+bZd55 Z3GKoAsl5i4xU7IH4vHMwJ0ZF7nsDd8M3uo57AeyyDB5pFHVtjradMWiv4l9ucmx39It 1LjqTiesuy1NZbG+orJMvljq7BNnEp+qDC5eYsVb6b2qupYs4UkgRy/2xA6YqNG8nm1w u8IlXY5SAg+v3wkbwOorAKJcPUYjVV3J7f/tgudBW6bsngRuQz6zEcMknIOc2RED0rVS 9PwsmCerMEUFDEKfDWMzIhNMQ57c/k/ZTcCev5IsOzS1yxZleVoqn2ON1/BAjGXxryNh 1tpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y5ZMCnUTWGMS2A57L3TimBKZx2dG3nsMUVXGZqiweuI=; b=ilqxDuXNaeFBLR/ri6gkLWUdimoAFuN9g7qL1vz5ZQZatFfvzdKCfN6lAg+ankEJbT Z9abltCl+aKMRZAuOAKoRi6mk0Da7Lg4koLtNqreTgD0/r1Lo9wdHUTkBu857GPqd65f iMoH4F6H5mFJvwg+T8rusXFXNhgNBE/ivxQVQAXQjrNvbOfeg8vU1Vq5jolMeOkGp1Vw poCWRUFngC7s0a4z5AeUAIeaa/53WR6RskXe2KH7sQNp+HwfYrnYLAcKQBM29BH+08/f NdvIbff5o+aMpyHdgaCmoAge5AVdOX+eOXZZyp1wFvmCC+GTtIW6Hx4LYAGW+dRsmlCP LoSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=DV+KzSps; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr14-20020a170907720e00b00726b8c9d872si19275318ejc.737.2022.07.19.11.36.40; Tue, 19 Jul 2022 11:37:06 -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=@alien8.de header.s=dkim header.b=DV+KzSps; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237937AbiGSRh5 (ORCPT + 99 others); Tue, 19 Jul 2022 13:37:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235492AbiGSRh4 (ORCPT ); Tue, 19 Jul 2022 13:37:56 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B945A2FF; Tue, 19 Jul 2022 10:37:54 -0700 (PDT) Received: from zn.tnic (p200300ea97297609329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9729:7609:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 530761EC0138; Tue, 19 Jul 2022 19:37:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658252267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=y5ZMCnUTWGMS2A57L3TimBKZx2dG3nsMUVXGZqiweuI=; b=DV+KzSpsmUJXA4gV2e71Kx9Wuq+g9wu2jW9T+QmkWpKnTcgcguGh61gc0eOtjBphP7fEX+ 7uOhwtmI+/jz7Mqjln4xuwG+oFy3ZSbWyI37nJRNMyYtnqSIpiFk4NMfM6ecjSA971IfQQ hatuNYgEJOwJ5jRpEwoyTWtfDr8Wt4c= Date: Tue, 19 Jul 2022 19:37:43 +0200 From: Borislav Petkov To: Ard Biesheuvel Cc: Linus Torvalds , Peter Zijlstra , Thadeu Lima de Souza Cascardo , Linux Kernel Mailing List , linux-efi , the arch/x86 maintainers , Thomas Gleixner , Greg Kroah-Hartman , Guenter Roeck , Josh Poimboeuf , stable , Andrew Cooper Subject: Re: [PATCH] efi/x86: use naked RET on mixed mode call wrapper Message-ID: References: <20220715194550.793957-1-cascardo@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Tue, Jul 19, 2022 at 05:22:28PM +0200, Ard Biesheuvel wrote: > The code in question is a little trampoline that executes from the EFI > mixed mode 1:1 mapping of the kernel text, and never via the kernel > mapping, so we should just move it into .rodata instead (and fix up > the mixed mode virtual address map logic accordingly). I don't think > mapping the kernel text and rodata into the 1;1 EFI map is needed at > all, tbh, and the only thing we ever access via that mapping is that > little trampoline. > > Something like I'm obviously always for simplifications like that. I'm guessing this should be tested for a full next release before it goes to Linus? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette