Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8141409rdb; Thu, 4 Jan 2024 22:51:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSO8R8H44dC9nby5518LcJH5PdkBvG16CFPw9uKoKFB3pNxt04OIDplC9Pu2L25iVr8Qv4 X-Received: by 2002:a05:6a20:3244:b0:198:7feb:97ae with SMTP id hm4-20020a056a20324400b001987feb97aemr1459943pzc.123.1704437490980; Thu, 04 Jan 2024 22:51:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704437490; cv=none; d=google.com; s=arc-20160816; b=xC5qKKmMHxcGZJH8Z2Jibuvspn05rhCETcUW5qhIrNSBE/L6A7RYjngnKLfp9+XJd+ 0OFcD22ct7b09B1i+Y7qww59GleapOSoFp2Bb8ycytfZsp8BoaDGYbVDgGzNxBIWXJ+q V6ozsxGtSxwFSShEgZ2rkYyxoWf7ywJGq0FP10q+lsMlhmH4KnQQE/4/WQlJriNXFWzC FX+XnfxpY2vk7BSOP/ctU1mktq8mQE39tG3p1veHWbZ2iAUng6pgdvd6NskQh7jptCGO P6HiE2TBaEspuPn3dpm7JmpB4AAB+ogJQB+Hrcvxq4afGWMDPVZ3h7EPtOK1hc+roAZW +FpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=3oaviC+uF9ihysRnDYnMixltc4fpclC1o6scnkW6iVs=; fh=8+GJxlcep9VuX64bnr42Ootj3sw4Na4W42s6ZvHls+A=; b=y+vrgeUsYvfy4HAV/b/CnmuVbZ9UQynKuqdQfAJLax4msTfPdOE93a51/fLoBCNAuc /TgKGC0Nfm61x6yz1In7hOAR2llTX4B22MjbEh+7yNZogiIr3y8ZUcx6AN0Sts7ognqe NiZ9SvflvofpzrYmaTV5kxQxdnRk5icCfvuDTN6m/cWEq13YptnYdiWKUf9JfS5q2EL9 DnGyJqdMrhM7P163++LbFjzQJqewHGAsFwBUS7QbUzIxLXhKvrnZ74h8Srs7GNj5YsYo qZz/XEpDsjmV8yQo9K+Bc4RSbp6gK84C4lLImXWtb5pmRqiVuWLcMv6/ID35P0mJVSL4 pu/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b="rUZM2/Bj"; spf=pass (google.com: domain of linux-kernel+bounces-17519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e16-20020a63d950000000b005bd0432d9b0si832628pgj.100.2024.01.04.22.51.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 22:51:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b="rUZM2/Bj"; spf=pass (google.com: domain of linux-kernel+bounces-17519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tesarici.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 87CB128539E for ; Fri, 5 Jan 2024 06:51:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4017B1DDF5; Fri, 5 Jan 2024 06:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tesarici.cz header.i=@tesarici.cz header.b="rUZM2/Bj" X-Original-To: linux-kernel@vger.kernel.org Received: from bee.tesarici.cz (bee.tesarici.cz [77.93.223.253]) (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 ECDBE1D68C for ; Fri, 5 Jan 2024 06:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=tesarici.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tesarici.cz Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id CDA611A72AF; Fri, 5 Jan 2024 07:51:10 +0100 (CET) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1704437470; bh=NPN413BX7veL0ZZ7wcFpIrFwMjUtaFyf8fSTVWxL9IY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rUZM2/BjJNY3By53aFMPeWST2d8QK3+nd6GJQtlK/Eua315I29ynJPJ7Sa5dsd4jC i4DA2glt0PCNyqxeNhKN6wG8ECyQoaj4APHCrBNEe9V5iXyegI6B1eRFvA+mhRFXSN oxUjV3B3dEU+Dc/Y4iitUaPs2eWirs0OFcALSvUWSQ+duXJNJfH/398JFDzcdoS0Pd dIb3Q6H8p0wq8siy3wBQvc3RuDa8SUWg4AM3t6CAUXCuCDdkyw6CG506k8nLDVc6M3 tG4tp7vCuTo0v9rP5wUbiAaC79iBhYKzZSJeY/Yl9vA4xqxbYCpkd0azQW6iGzO1gW p5u/R2FppHTvw== Date: Fri, 5 Jan 2024 07:51:09 +0100 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Richard Weinberger Cc: Petr Tesarik , anton ivanov , Johannes Berg , linux-um , linux-kernel , Roberto Sassu , Petr Tesarik Subject: Re: [PATCH 0/2] um: improve UML page fault handling Message-ID: <20240105075109.4f0e2785@meshulam.tesarici.cz> In-Reply-To: <435201914.200552.1704410531143.JavaMail.zimbra@nod.at> References: <20231215121431.680-1-petrtesarik@huaweicloud.com> <435201914.200552.1704410531143.JavaMail.zimbra@nod.at> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Helo Richard, Am Fri, 5 Jan 2024 00:22:11 +0100 (CET) schrieb Richard Weinberger : > ----- Urspr=C3=BCngliche Mail ----- > > Von: "Petr Tesarik" > > An: "richard" , "anton ivanov" , "Johannes Berg" > > , "linux-um" ,= "linux-kernel" > > CC: "Roberto Sassu" , petr@tesarici.cz, = "Petr Tesarik" > > > > Gesendet: Freitag, 15. Dezember 2023 13:14:29 > > Betreff: [PATCH 0/2] um: improve UML page fault handling =20 >=20 > > From: Petr Tesarik > >=20 > > Improve UML handling of segmentation faults in kernel mode. Although > > such page faults are generally caused by a kernel bug, it is annoying > > if they cause an infinite loop, or panic the kernel. More importantly, > > a robust implementation allows to write KUnit tests for various guard > > pages, preventing potential kernel self-protection regressions. > >=20 > > Petr Tesarik (2): > > um: do not panic on kernel mode faults > > um: oops on accessing an non-present page in the vmalloc area =20 >=20 > I think this is a good thing to have. Thanks for the feedback. > For the implementation side, this needs to use the oops_* helpers > from kernel/panic.c and taint the kernel, etc... Yes, I did see that coming but wanted to get some confirmation that it's worth the effort. > See arch/x86/kernel/dumpstack.c die() and friends. This implementation also calls die notifiers, but AFAICS different architectures are not very consistent in their use. Do you also require die notifiers for the UML implementation? Petr T