From patchwork Wed Jun 22 10:45:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12890476 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5643C433EF for ; Wed, 22 Jun 2022 10:45:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.353759.580734 (Exim 4.92) (envelope-from ) id 1o3xrZ-0003VD-IB; Wed, 22 Jun 2022 10:45:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 353759.580734; Wed, 22 Jun 2022 10:45:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o3xrZ-0003V6-Dz; Wed, 22 Jun 2022 10:45:33 +0000 Received: by outflank-mailman (input) for mailman id 353759; Wed, 22 Jun 2022 10:45:32 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1o3xrY-0003V0-Hj for xen-devel@lists.xenproject.org; Wed, 22 Jun 2022 10:45:32 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6fd562b2-f218-11ec-b725-ed86ccbb4733; Wed, 22 Jun 2022 12:45:31 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CCBC421A97; Wed, 22 Jun 2022 10:45:30 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AD89B134A9; Wed, 22 Jun 2022 10:45:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +UzKKMrysmJPVQAAMHmgww (envelope-from ); Wed, 22 Jun 2022 10:45:30 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6fd562b2-f218-11ec-b725-ed86ccbb4733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1655894730; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=aRapF1oRH7n+rUj6AqavtElno3IhEnMrbC5x00uKDR4=; b=PPiyCV2q2kJhKctVq8iv7cx5ew7fY7V7VKRIZjc4TSsM2aOl6YUtc900DI1oeeEBovmyx1 oeDFVgfxYdMafqgzesTBHQ/qcJXaDEuN23m5iLHAn376AIEvuEt8Auvd4U6OJGBu6BuYBO y+0fNOebKtBjHP8IM/jXTrOx+5f6vz0= Message-ID: Date: Wed, 22 Jun 2022 12:45:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Content-Language: en-US To: Julien Grall Cc: "xen-devel@lists.xenproject.org" , Andrew Cooper From: Juergen Gross Subject: Tentative fix for dom0 boot problem Julien, could you please test the attached patches? Juergen From ff35bc33c5ee184868d41bf76dcc7322191f9fd3 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 22 Jun 2022 12:17:47 +0200 Subject: [PATCH 2/2] x86: fix setup of brk area Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") put the brk area into the .bss segment, causing it not to be cleared initially. As the brk area is used to allocate early page tables, these might contain garbage in not explicitly written entries. Fix that by letting clear_bss() clear the brk area, too. Fixes: e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") Signed-off-by: Juergen Gross --- arch/x86/kernel/head64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index e7e233209a8c..6a3cfaf6b72a 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -430,6 +430,8 @@ void __init clear_bss(void) { memset(__bss_start, 0, (unsigned long) __bss_stop - (unsigned long) __bss_start); + memset(__brk_base, 0, + (unsigned long) __brk_limit - (unsigned long) __brk_base); } static unsigned long get_cmd_line_ptr(void) -- 2.35.3