Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8465044rwl; Sat, 31 Dec 2022 06:17:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNqVb/13BBQyrEFkF/oCX0GwH68mwIKa95iS14IrATn9Zs/2S/ch1GYFhxuf8+3Nx5IbVZ X-Received: by 2002:a05:6402:538f:b0:45c:835c:1ebb with SMTP id ew15-20020a056402538f00b0045c835c1ebbmr37563912edb.9.1672496249594; Sat, 31 Dec 2022 06:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672496249; cv=none; d=google.com; s=arc-20160816; b=tRCYvqzTsbQwJeQfm/4YLDWPkJBk7OCK8rrFCEV36EA24gR8Ji0MDGUjPI62+5INYy FjZu+qWthJXwElO7YjLh1/nAn2aV4JvQIkkhZSZXUc5ANyvFbolt1GAU83Ei9AfY2Oh0 5Mxd65pakOBhLsoVPluZRvfVTgJ096BcYXGOsfBgJXF+XbuZ8hk2udKcx6tD9H1CRdjT 7JnJ29fyLlAbsWLDkWYMdYonggVa0PUdzEkdCfHUGURaO6m8Y7TJVHMenk995yAcBK4G HxA14jf+v2ppWHNJ6wxWZLqBNsbg16xpjSGIlhrtd18IqtAyPE/T0170aps0ZgWKS72A MW+w== 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=o0ed0270LbR4oSMiWhqbUtlUU3rbUG/UHLY5euGcUOs=; b=ZUCuxAw9d6cy06fAv6zoAJp/GoNCBlwwN8PVCzDpxiVOkjRYna9RnaSfP273tmukMI 8FUc8zUfVOnxBEinocVMM92vJvyiCbtDtVmKJWXkXFuzxb16Ft1Tw9pufvZBCqT7B8dz URVIOT4p4SJTJl1KN/jJ3/uik8N4d5RjsKKTsMk4Cr7q1b7LLPGiHyeCS0NZCwe/miPv xpmCjALeu2/UOz3F4HH3J2yO+QB0f+jsNPwshbMU3n9Sm6h0pohS7YC429Z8Znv9/mZy 72e257IWCtm8ePcbSQ8PjW6YnZZrlcS6HJCJ4l39dIGImjTEws82KQbolxaaaFQtnGOG eMpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Npfe4/Lh"; 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 ne26-20020a1709077b9a00b0084c4e8e10fbsi16129390ejc.51.2022.12.31.06.17.07; Sat, 31 Dec 2022 06:17:29 -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="Npfe4/Lh"; 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 S235704AbiLaNf4 (ORCPT + 62 others); Sat, 31 Dec 2022 08:35:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbiLaNfy (ORCPT ); Sat, 31 Dec 2022 08:35:54 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C99BA218C for ; Sat, 31 Dec 2022 05:35:51 -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 61BB31EC0493; Sat, 31 Dec 2022 14:35:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672493750; 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=o0ed0270LbR4oSMiWhqbUtlUU3rbUG/UHLY5euGcUOs=; b=Npfe4/LhoihV1SevMmBX/L0PSt78NsHqGVmzB3hKlCgt3vI5wBBZTADJ1os5wH8c8kZPMs adDfhCgU3OrNMaBcSzJC2laYCFCo/upQmZC5guvTASLpgadxlGEzkUD69TnFU+unWVdoBK Tu/VhcPpLsYgEgnK/VRHKVVDnxPO3Io= Date: Sat, 31 Dec 2022 14:35:45 +0100 From: Borislav Petkov To: "Jason A. Donenfeld" Cc: "H. Peter Anvin" , 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: 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 01:54:50PM +0100, Jason A. Donenfeld wrote: > Nothing special... `-kernel bzImage` should be enough to do it. Eric > reported it, and then I was able to repro trivially. Sure you got the > right version? Yeah, qemu executables confusion here - had wrongly something older of the version 7.1... Now made sure I'm actually booting with the latest qemu: QEMU emulator version 7.2.50 (v7.2.0-333-g222059a0fccf) With that the kernel with your config hangs early during boot and the stack trace is below. Seeing how it says trapnr 14, then that looks like something you are seeing. But lemme poke at it more. #0 0xffffffff84738576 in native_halt () at ./arch/x86/include/asm/irqflags.h:57 #1 halt () at ./arch/x86/include/asm/irqflags.h:98 #2 early_fixup_exception (regs=regs@entry=0xffffffff84007dc8, trapnr=trapnr@entry=14) at arch/x86/mm/extable.c:340 #3 0xffffffff846ff465 in do_early_exception (regs=0xffffffff84007dc8, trapnr=14) at arch/x86/kernel/head64.c:424 #4 0xffffffff846ff14f in early_idt_handler_common () at arch/x86/kernel/head_64.S:483 #5 0x2404c74100000cd0 in ?? () #6 0xffffffffff20073c in ?? () #7 0x0000000000000010 in fixed_percpu_data () #8 0xdffffc0000000000 in ?? () #9 0xffffffff84007ea8 in init_thread_union () #10 0xffffffffff200cd0 in ?? () #11 0x0000000000000000 in ?? () -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette