From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E9F7C4332F for ; Thu, 29 Dec 2022 12:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233267AbiL2MsM (ORCPT ); Thu, 29 Dec 2022 07:48:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233404AbiL2Mrz (ORCPT ); Thu, 29 Dec 2022 07:47:55 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BDF363E9 for ; Thu, 29 Dec 2022 04:47:54 -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 2396E1EC01CE; Thu, 29 Dec 2022 13:47:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672318073; 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=1KcR7E77mv9elx5G9X9IlsW0Rh4iCO+tG818qQo64N4=; b=CXjIIeugIvcObmtb7Y1VmnUNOHDXpJU3ucwjMO1ozxW9lHCawJh7MurU1zO23IZx13C8rl t28rQjH2rqLXjinYGlHeFAyAlnl32bEKMf8id/Vv/FcMml3qru7Xkv397ijHGtsGftOLd0 oHU55jRihKJJFoKwMmQ7wQOvWd2qkqA= Date: Thu, 29 Dec 2022 13:47:49 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: "Jason A. Donenfeld" , 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: <20221228143831.396245-1-Jason@zx2c4.com> <6cab26b5-06ae-468d-ac79-ecdecb86ef07@linaro.org> <9188EEE9-2759-4389-B39E-0FEBBA3FA57D@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 28, 2022 at 11:31:34PM -0800, H. Peter Anvin wrote: > As far as a crash... that sounds like a big and a pretty serious one at that. > > Could you let me know what kernel you are using and how *exactly* you are booting it? Right, with CONFIG_X86_VERBOSE_BOOTUP=y in a guest here, it says: early console in extract_kernel input_data: 0x000000000be073a8 input_len: 0x00000000008cfc43 output: 0x0000000001000000 output_len: 0x000000000b600a98 kernel_total_size: 0x000000000ac26000 needed_size: 0x000000000b800000 trampoline_32bit: 0x000000000009d000 so that's a ~9M kernel which gets decompressed at 0x1000000 and the output len is, what, ~180M which looks like plenty to me... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette