Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8475954rwl; Sat, 31 Dec 2022 06:28:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVkFIOYLOnlgspOBkR6ycRGhEsZjp9DAemX2PPmrz5JWJV5NKH3BOr8q4S5un+v+RB9kKY X-Received: by 2002:a17:906:7749:b0:7c5:fd:4352 with SMTP id o9-20020a170906774900b007c500fd4352mr40894791ejn.49.1672496901371; Sat, 31 Dec 2022 06:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672496901; cv=none; d=google.com; s=arc-20160816; b=SbL2A9+sriQqgRBcSJe+mwuz0SwI1LZwSgDzqt+4wkbDjSFG9AhdKyudlw7thbUKxl /ZEslyAeheaI6PIlhYGDWlCb99TBHw7sfgsHUBo7WdiHe4bIWWGnbedDNO46mDS3fyYw SiI0+Df11zlW4GVAVgUmxudRTTFFAGFyXYxAVZ4BC2yxHlx474TS1KCvKOM3ysZD8DJz 9NTvlOKaavWwh5kLF9OyUQsCU5ktTMHfZaQZOMTM8bJ9Gj4P4EZ9rN5scBsB+r4ZNsoR Hju3vIKT5xAI/XqHd9X8E+l9dZRJQHJ0tax38nm6kS5JXw7fCSquRTtfZv4i9A2ckku1 5IgQ== 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=XSRYAEgw00hfGYGFyTs9QzvEt1IVj0uy86Sl3MJzWNo=; b=TXZeClE6Ia8H81Ahb0+xuWjHyRqFWd2olyShaWl/e/WUxGBIiMZLF/oc18bRn4UsYa HwK4KU2dq5oI9BoPaqQUG2S44KsB98lsCp0PHHDMr0GE++jLlTlL+qciikgF+qV4AzJ9 stxIF5MEWMmhfsDY4hMVsVZUgBZqReClOduJAtF1S+RndmRSrHbWcvFJccT0gdJ+WcLS BUzuKTmf7rGFhVT5taG7Hj2x457fQ24abzCKoFHYA72fHKFA8QreuNMmbejqsqxL311v mHkOxMVZ8yBJYwwLXAtzGh5jWZ6Unr/zS2+dbk6gZQeeHN1x3icTjvbR9kgCh1KZk8WX i0ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hRYLjF3L; 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 wz4-20020a170906fe4400b007c12a22dc43si18917836ejb.662.2022.12.31.06.28.06; Sat, 31 Dec 2022 06:28:21 -0800 (PST) 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=hRYLjF3L; 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 S231975AbiLaOYl (ORCPT + 62 others); Sat, 31 Dec 2022 09:24:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229748AbiLaOYi (ORCPT ); Sat, 31 Dec 2022 09:24:38 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B6A910A3 for ; Sat, 31 Dec 2022 06:24:37 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 1B2001EC01E0; Sat, 31 Dec 2022 15:24:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672496676; 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=XSRYAEgw00hfGYGFyTs9QzvEt1IVj0uy86Sl3MJzWNo=; b=hRYLjF3LQ72BqRPTIm/21vylTA8dAoZkS23G+BhIpgmeca8+mXlaruNqX7NzKxB7Ue9E8H Ly/yPURcM1ogoeJQM/ZkNXuXmQNE9EyIeh1wePILlzj0LhoNAo0JXOncEtPNgLhaBe7d6v qSSdKsP5bHFSQW0D5LGdCC/FVLHAdls= Date: Sat, 31 Dec 2022 15:24:32 +0100 From: Borislav Petkov To: "Jason A. Donenfeld" , "H. Peter Anvin" Cc: pbonzini@redhat.com, ebiggers@kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, ardb@kernel.org, kraxel@redhat.com, philmd@linaro.org Subject: Re: [PATCH qemu] x86: don't let decompressed kernel image clobber setup_data Message-ID: References: <46466e54-25c3-3194-8546-a57cd4a80d9d@zytor.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 Sat, Dec 31, 2022 at 02:51:28PM +0100, Jason A. Donenfeld wrote: > That failure is unrelated to the ident mapping issue Peter and > I discussed. The original failure is described in the commit message: > decompression clobbers the data, so sd->next points to garbage. Right, and the fact that the kernel overwrites it still feels kinda wrong: the kernel knows where setup_data is - the address is in the setup header so *actually*, it should take care of not to clobber it. But hpa would correct me if I'm missing an aspect about whose responsibility it is to do what here... Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette