Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6636473rdb; Fri, 15 Dec 2023 04:32:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWfUwXa8sofrhmTK44CmbK9C2srLwz4Dgk0aySPxLbBiLRs8L6ptbs/3zd5Qx4gdH5QYKy X-Received: by 2002:a17:90b:318:b0:28b:1064:2259 with SMTP id ay24-20020a17090b031800b0028b10642259mr1176208pjb.20.1702643523873; Fri, 15 Dec 2023 04:32:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702643523; cv=none; d=google.com; s=arc-20160816; b=R/l2B99r77i76IqBRui+tPeDUxDTFvGXAmDIWCmywumq1l2vpx0SLqmBDsX0Q/QL83 QjvjRGGolYHtD4Tnu+i7QKbLuMClMsHdVhfFnkJJ7L36tT9JXPCuNUEbBNnrRXOHp0x6 /gIHI3FfWptTMpTQEJq7DdIa8ZRTh4VPRqAlhWTLN0AFPxP9AMLrSzNOtjwE+4xwUCJ+ IkBWBVFOW17rvpJ8QOPvxQc6XFJJpADp5XQ+SO74KD6PwDWZWLVTnUi8K9E0HE1ool42 MSVSgRRF+okK6uM0z2QPiBLvJSFOZp1w5tebIDtM7XHbEaplYz1pSJTqatdJBIcAmGjn Vicw== 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:message-id:date:subject:cc:to :from; bh=/RtAnJXmdqql3S5s+cOjOsOvIvsbnGXhZr8LvLkQ/1A=; fh=cwFOem/rBL3vlsmW5EZfH4dXj5MUGk0IYxzeUHboVUs=; b=cdFZ+FKMzl4bGwYTb6ils61GaULC/Iu41dN4nli+A0TZZtRqUknxdbwNgdOLfP//Kl ahCkoOl+JhEUnvyv04gg34TDS7LXXNvGg89nQl4Pn/d5jsn+qSye0JxB5gcDcdo0V7gh K4/M0ohfreWHLiSg8MYzXxl3sHt5rjWG8xKJRYSec6OSXBWLFZ4VuBhnbuj9GE9LR9G9 nVSeNezodz8720stXD0y02BR04d9Ncj34T/IHWbbCTOYAtBggzaF/FTpQub2AJGQ7zJj 4l5l7eF7wM8c/EQbfnSvhxbGxCBVeOKWNoV5kyuxl8wbVUAacCb1Qmo0r9e0kv+Eh3AJ vKJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-922-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u6-20020a17090a3fc600b0028ae125eacbsi4567667pjm.184.2023.12.15.04.32.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 04:32:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-922-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id EEA65B22AE3 for ; Fri, 15 Dec 2023 12:30:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDE042C68D; Fri, 15 Dec 2023 12:30:42 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from frasgout12.his.huawei.com (frasgout12.his.huawei.com [14.137.139.154]) (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 553F238F for ; Fri, 15 Dec 2023 12:30:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.18.186.29]) by frasgout12.his.huawei.com (SkyGuard) with ESMTP id 4Ss7515Sp4z9v7cV for ; Fri, 15 Dec 2023 19:57:41 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id 205FD140486 for ; Fri, 15 Dec 2023 20:14:58 +0800 (CST) Received: from huaweicloud.com (unknown [10.48.148.243]) by APP2 (Coremail) with SMTP id GxC2BwCnpV86Q3xlRz6QAg--.57272S2; Fri, 15 Dec 2023 13:14:57 +0100 (CET) From: Petr Tesarik To: Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org (open list:USER-MODE LINUX (UML)), linux-kernel@vger.kernel.org (open list) Cc: Roberto Sassu , petr@tesarici.cz, Petr Tesarik Subject: [PATCH 0/2] um: improve UML page fault handling Date: Fri, 15 Dec 2023 13:14:29 +0100 Message-Id: <20231215121431.680-1-petrtesarik@huaweicloud.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:GxC2BwCnpV86Q3xlRz6QAg--.57272S2 X-Coremail-Antispam: 1UD129KBjvdXoWrWw1UGr4kJF4rXw1rKryfJFb_yoWxWrX_AF y8trWUGFWjyFZIvay5ta17WFW29FWvgFyxA3Wkt390ywn8Z34UZas8tFy5Xr93WF4rur1k ArnxJrn7Krn7KjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb4AFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Jr0_ Gr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr 1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkF7I0Ew4C26cxK6c8I j28IcwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14 v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkG c2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Jr0_ Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUj0JPt UUUUU== X-CM-SenderInfo: hshw23xhvd2x3n6k3tpzhluzxrxghudrp/ From: Petr Tesarik 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. Petr Tesarik (2): um: do not panic on kernel mode faults um: oops on accessing an non-present page in the vmalloc area arch/um/kernel/trap.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) -- 2.34.1