Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4835404rwl; Wed, 28 Dec 2022 09:25:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXu+bsnhBx/2gGdqCqVwzNPEq5CRYQZIPiyJoTtNMiaU0kSgKxe38DgsQ6p2+7bI+r0LEUHr X-Received: by 2002:a05:6a21:3a81:b0:af:767a:a7e1 with SMTP id zv1-20020a056a213a8100b000af767aa7e1mr53704930pzb.23.1672248338904; Wed, 28 Dec 2022 09:25:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672248338; cv=none; d=google.com; s=arc-20160816; b=J+34RkzqEjvqK8o0SbvkPunsOmVxo1DTIm6iVBNBm/CO+MGNukJOjy60KuDxmbfKej Dt8KWhBpvvrDZ2ek1a18/IHcWMxkrVrio2NjspqwvDwsVB/uxS1Wy94nWEpF1Kfox5Ih ZnnI4tC0cPlBgx3VFLxaO5VOmGYwTvq71lbFkbejW3PnHzUOzNXVVaAbQUTZjfpp5JQS JmSxQHyz87CH7uZtZIx7eBBQfBgY5V9BbEQZt+w+Ju9Mljxhr8Xn2MNMfIQR4S4LilQI VtAWYfO8hXT/pzyqu6yTjZrY8Kd7r/En00VDrRyOsEEB9edAbK0ODFJGoTqJediMf4nv sM8w== 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=/TBVDGYdRlG5U31yqV7pynGEXacXzLmZlTrofPWf0ws=; b=ZKc+BHwsmn4m1vkv76O74PUqMJvqo9hAMu5YM/2bpTf6uiQzHVmPPjFCdFsmOUCnLG NLQVDQMLwONbQngncyu0FJexoM4T5fvdrcZEpWJmHeAMe1iMb0rqAF2he0kRI+67u2mJ Jfc0+PVTDOg3EkmFN+Yueym6HnAJeJjpJKFO+ONX82QEE5VskiZjNrmPNXH3NMjZobWC CQNsp6u599VWzbl/iaZK2fwG/e1JsXb+wzhs5qW6Wff59Zt5U+uojf4Ur4IF9ywnob12 1HcnrbBH0i1GMXTYQ/QtTpxb4NEodrRVpQbW0wrJutLN423E8hJXFYLhC5qXcf/mlpG2 7LVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=f9G1NL6P; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a63e418000000b004792f347556si16671978pgi.623.2022.12.28.09.25.28; Wed, 28 Dec 2022 09:25:38 -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=@zx2c4.com header.s=20210105 header.b=f9G1NL6P; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234943AbiL1REL (ORCPT + 64 others); Wed, 28 Dec 2022 12:04:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234868AbiL1RDm (ORCPT ); Wed, 28 Dec 2022 12:03:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1792B1929A for ; Wed, 28 Dec 2022 08:58:03 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id A945B61562 for ; Wed, 28 Dec 2022 16:58:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E479BC433F1; Wed, 28 Dec 2022 16:58:00 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="f9G1NL6P" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1672246678; 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: in-reply-to:in-reply-to:references:references; bh=/TBVDGYdRlG5U31yqV7pynGEXacXzLmZlTrofPWf0ws=; b=f9G1NL6Pa1K0WeUCjN7cMRJECqjZIM1uJkStKJn7z//z/h+IKVbcjv0PFYqXkrpvLYMlc4 MFiI9xta0v+DDtKg8n5Sv6wxgOGVNuYZQdXb9mH6TmB6+/ffQxgoZ2nwbKqFCnBpJ5YZss 2bhQJzstgm+VLqf3A2Muu+bd7kZKoVw= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 46f0ad33 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 28 Dec 2022 16:57:58 +0000 (UTC) Date: Wed, 28 Dec 2022 17:57:54 +0100 From: "Jason A. Donenfeld" To: hpa@zytor.com 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, bp@alien8.de, philmd@linaro.org Subject: Re: [PATCH qemu] x86: don't let decompressed kernel image clobber setup_data Message-ID: References: <20221228143831.396245-1-Jason@zx2c4.com> <6cab26b5-06ae-468d-ac79-ecdecb86ef07@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 HELLO H. PETER ANVIN, E L L O On Wed, Dec 28, 2022 at 05:30:30PM +0100, Jason A. Donenfeld wrote: > > Fix looks good, glad you figured out the problem. > > I mean, kind of. The solution here sucks, especially given that in the > worst case, setup_data just gets dropped. I'm half inclined to consider > this a kernel bug instead, and add some code to relocate setup_data > prior to decompression, and then fix up all the links. It seems like > this would be a lot more robust. > > I just wish the people who wrote this stuff would chime in. I've had > x86@kernel.org CC'd but so far, no input from them. Apparently you are the x86 boot guru. What do you want to happen here? Your input would be very instrumental. Jason