Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35965514rwd; Mon, 10 Jul 2023 15:47:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlExVTKS7mVWuNY3dsfnBCFLt8mdjke4axpTo+xMpv9teS8xV/5Il0QnQbq7ukC9YLRTSOHN X-Received: by 2002:a17:906:3956:b0:988:6e75:6b3d with SMTP id g22-20020a170906395600b009886e756b3dmr11450206eje.33.1689029244667; Mon, 10 Jul 2023 15:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689029244; cv=none; d=google.com; s=arc-20160816; b=GcUMoQwWCGMOeRJDf3q6n6w00z2cNX7Mj9evUMrRGkSyRunZMZ/cTKQl1PWdeCfh4Q MkPNkxQinIhs9HwhbJ3e5Qxz7st1sYcFrSYO15oA3np9DL1N0Gg0l5EXLbm1hqtC1BKq n9Vf1ONfgoiHHLNQUC2Cn6Fe3M2d9ssv9lHbtm/YyzYIHuvu8JW1W2eS0bJuBYJqVev9 1PrtxbAH17Omt3xfdvyhBXgzZSvtvO4+BMU7E7enjYAReXdFmVKO2N1yU5RBZOXBPseV +wac3PenzE6qGGPLPhGyLPt+Ym2WH+8Qy8yfcZMpJz728filx2igu8TiN7UUYD9/jeqz h/VQ== 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=58T4qFvvwwrQRsF9bH2avyjS4AzLemrbBG+e9IV9xyE=; fh=bUsfhlSxo5mbGO/gV6Q/B6Bpk+EeS6wLgNtVxkEE7VY=; b=u8ALpCo8IwWXKV/M8H7bZM3bUPpjW3IgVpBg6clNQ8Z60qZJiLyHsLIVV7ckp0vUBn UhIZ9HvutlIuNVjLcSxjUvv6JD+hTDg6QzIWZH9CRokgwfkMKbfsh7UbOyGipGaoogxX KCBVM2Z3m7l+QnjZO1017ce5pFpPhCjSSVZVzVSH6RSOMOqJ2o0hUXlML+QPTtRak5fh KiiZ0dA5EHSgSSCPGvMZ+tX3TnCB5+t9qwaxCqP7rQwqAgSYHmKQfFobVR9rHPzV+VkP J1RyrhkaOhgMXGWg+7dfMWYnt/4gjRotmJGNEOrl7H8ja172HbZWZlwvINO9ge9htfD1 b2+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CDThmcbc; 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 l6-20020a170906230600b00992f309c359si655662eja.430.2023.07.10.15.47.00; Mon, 10 Jul 2023 15:47:24 -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=CDThmcbc; 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 S229997AbjGJV4H (ORCPT + 99 others); Mon, 10 Jul 2023 17:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjGJV4F (ORCPT ); Mon, 10 Jul 2023 17:56:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFDFCD2; Mon, 10 Jul 2023 14:56:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 41C2761219; Mon, 10 Jul 2023 21:56:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A81ACC433C8; Mon, 10 Jul 2023 21:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689026163; bh=urUMvcqIHSx44e1CLXIt+y4lPoaxzNCVYEBO64LKrtI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CDThmcbcHASAfk2VyXGM5XYnw6xuTJhgaGL9h53i/ZaKq/TKcX3ai1c3/20QBzUA4 7A2Ozb5nBEeK1H/mzH27jKpoywTSLx/H8/KNZDoItdXaZjmWBKLSIxn8uZeH4Y/NQd YzCH7yo5B91USbLjNXlJkDp6HJDzSL7Al8v1WN2+2SY6/rzWjQ2JDCtqCLvi0LSS5q 6hppfuUaEuyb4mjNk4lBO5V+b8cU20Ho/IxyblOLHhT/XxO3N0+X2L/1dy6kFHSNd2 LUJXp3JiBAkGiZ1qxsfhbhLdBLJTtrDI2AISaswHte9wSVs7qo7zPgSdI3cfGcoMCo ClZSpuF4N0VWQ== Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-4faaaa476a9so7980189e87.2; Mon, 10 Jul 2023 14:56:03 -0700 (PDT) X-Gm-Message-State: ABy/qLbyp7TjrPOhVhwqTA6leuLtrRWncm9Iv6IUAaziEWF1dsLZbttR kQBv/WSB76WiauP2Sk2POQ5CpOo+6W4D85OVp0o= X-Received: by 2002:a05:6512:3a96:b0:4f8:554f:36aa with SMTP id q22-20020a0565123a9600b004f8554f36aamr12455800lfu.29.1689026161679; Mon, 10 Jul 2023 14:56:01 -0700 (PDT) MIME-Version: 1.0 References: <20230607072342.4054036-1-ardb@kernel.org> <20230607072342.4054036-7-ardb@kernel.org> <20230710090654.GCZKvKLh44tzlNzPcq@fat_crate.local> In-Reply-To: <20230710090654.GCZKvKLh44tzlNzPcq@fat_crate.local> From: Ard Biesheuvel Date: Mon, 10 Jul 2023 23:55:49 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 06/20] x86/decompressor: Store boot_params pointer in callee save register To: Borislav Petkov Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Evgeniy Baskov , Andy Lutomirski , Dave Hansen , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Alexey Khoroshilov , Peter Jones , Gerd Hoffmann , Dave Young , Mario Limonciello , Kees Cook , Tom Lendacky , "Kirill A . Shutemov" , Linus Torvalds , Joerg Roedel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, 10 Jul 2023 at 11:07, Borislav Petkov wrote: > > On Wed, Jun 07, 2023 at 09:23:28AM +0200, Ard Biesheuvel wrote: > > Instead of pushing and popping %RSI several times to preserve the struct > > boot_params pointer across the execution of the startup code, move it > > into a callee save register before the first call into C, and copy it > > back when needed. > > > > Signed-off-by: Ard Biesheuvel > > --- > > arch/x86/boot/compressed/head_64.S | 34 +++++++------------- > > 1 file changed, 11 insertions(+), 23 deletions(-) > > I like that. > > We do a similar dance in arch/x86/kernel/head_64.S. Care to fix that > too, in a separate patch? > I already did, actually, but I dropped it from this series because it was getting too long, and not essential for the overall goal of the changes. https://lore.kernel.org/all/20230602101313.3557775-19-ardb@kernel.org/