From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4354117555 for ; Sat, 30 May 2026 18:26:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780165571; cv=none; b=shu+4ytsHr8/0SCS5u9U4zMmIcScmAdI6xWhCigPfG97ZB8oxcb/U07F1zBQaU57sWoEFvE64GZ1eBgQ77PRLlbSYTxeZEkoO7LEmoJ/qdPwMyh/x9zJuLl4IYO5UJbwB09gO+nJ/AWtha2XZYZwiW5F9402/tJapDG0Gx5QBb4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780165571; c=relaxed/simple; bh=ht0yWMzA+4DOFSeOdK3amGc7HPEk39ZHBqEhIokVr38=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=immGrD8X638XTNOuYOsQbsnbm79L2YY6SKtylDgX0fkmiD3PpacFng/ipVTA/667eijWTxLSsM88oJwO2R2Ty3btawzlquIu0W23/DCxlRLTPNKzg+cxwMscMiF6iOgSK7ef0BEjhRA0cNRz83LQtVW8DJZ+bTQ4KGnPtZwOtuY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=BR3yV6wg; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="BR3yV6wg" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:Message-ID:References: In-Reply-To:Subject:Cc:To:From:Date:MIME-Version:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+CEMRaJFugQuRP0/DJTzv+8chqmTJilMImwXMol396E=; b=BR3yV6wgeIxWYy5xNZ+xGvXXS7 02mPLhQgHJHn9BspRzTnC/IQvF+JGiFsFf2dUclCkPtWfbZ3dI1KvC4JytpgZzEHagH4Z/dAcGiBt rRNwIqjzQiHXUPQw5IGP4QQ+JobrnhM377GGSuAIw5crru1gwV6c5db0f0uM5jjf4yQgLzvY05b6W nGi7bTAwAgysJJDvp5XGHtmL56IA0Ob6gy5nxUwo3SM9Pkv59buwRJ8TFqXTOoT+WyMf/o4EJogcQ erTteuHigGB4uQkUubfJ0Ul6ITZ/pqB0G3lWZ6C71yx1edTTtdwZnNBtB5Tl1NVteGnR3BRDk3ZdU ybdqi6ZQ==; Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine2.igalia.com with esmtps (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1wTONE-00ALEi-Em; Sat, 30 May 2026 20:25:28 +0200 Received: from webmail.service.igalia.com ([192.168.21.45]) by mail.igalia.com with esmtp (Exim) id 1wTONC-003hJ2-2f; Sat, 30 May 2026 20:25:28 +0200 Received: from localhost ([127.0.0.1] helo=webmail.igalia.com) by webmail.service.igalia.com with esmtp (Exim 4.98.2) (envelope-from ) id 1wTONB-00000005YVY-1bPX; Sat, 30 May 2026 20:25:25 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Sat, 30 May 2026 15:25:25 -0300 From: Mauricio Faria de Oliveira To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Juergen Gross , Alexey Dobriyan , Boris Ostrovsky , kernel-dev@igalia.com, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, kernel test robot Subject: Re: [PATCH v4 0/4] x86/pvh: fix unbootable VMs again (PVH + KASAN) In-Reply-To: <20260527204736.GBahdYaKk6kAkIUYE3@fat_crate.local> References: <20260526-pvh-kasan-inline-v4-0-a310e6a25ecd@igalia.com> <20260527204736.GBahdYaKk6kAkIUYE3@fat_crate.local> Message-ID: <274609541a0c7c6b49b386001967dd2b@igalia.com> X-Sender: mfo@igalia.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Report: NO, Score=-2.2, Tests=ALL_TRUSTED=-3,BAYES_50=0.8 X-Spam-Score: -21 X-Spam-Bar: -- Thanks for having a look at this. On 2026-05-27 17:47, Borislav Petkov wrote: > On Tue, May 26, 2026 at 11:52:32AM -0300, Mauricio Faria de Oliveira wrote: >> The issue of unbootable VMs with CONFIG_PVH due to CONFIG_KASAN is back. > > ... and we care about that particular configuration because...? PVH and KASAN can be enabled independently for their own purposes (startup entry point and debugging), but when combined, KASAN might break booting via the PVH entry point. There are precedents for disabling KASAN instrumentation in specific code paths, including this one (see listed commits), so addressing this issue/regression seems reasonable. In this instance, the use case is to speed up the dev-test cycle when debugging on VMs: PVH allows booting directly from vmlinux, avoiding the need to build/compress and decompress bzImage, while KASAN helps detect issues early. > >> arch/x86/boot/string.c | 6 ++---- >> arch/x86/include/asm/cpuid/api.h | 2 +- >> arch/x86/include/asm/string.h | 21 +------------------- >> arch/x86/include/asm/string_inline.h | 37 ++++++++++++++++++++++++++++++++++++ >> arch/x86/platform/pvh/enlighten.c | 3 ++- >> 5 files changed, 43 insertions(+), 26 deletions(-) > > I fail to see justification for those gymnastics. Briefly, this is a side effect of reusing code from 'boot/string.c' through , which introduces additional complications; please see patch 1 for details. These complications could be avoided by not reusing that code and instead adding slightly duplicated code [1] directly to , if that is preferred. Please let me know your thoughts. Thanks, [1] https://lore.kernel.org/all/324ef97b16f52e0ccc72f6381d1b5dd2@igalia.com/ -- Mauricio