From patchwork Wed Mar 9 01:47:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Liu X-Patchwork-Id: 12774588 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08399C433EF for ; Wed, 9 Mar 2022 01:29:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230105AbiCIBap (ORCPT ); Tue, 8 Mar 2022 20:30:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbiCIBap (ORCPT ); Tue, 8 Mar 2022 20:30:45 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70F774130E; Tue, 8 Mar 2022 17:29:47 -0800 (PST) Received: from kwepemi100014.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KCvj30fh4zdZMk; Wed, 9 Mar 2022 09:28:23 +0800 (CST) Received: from kwepemm600017.china.huawei.com (7.193.23.234) by kwepemi100014.china.huawei.com (7.221.188.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 09:29:45 +0800 Received: from localhost.localdomain (10.175.112.125) by kwepemm600017.china.huawei.com (7.193.23.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 09:29:44 +0800 From: Peng Liu To: , , , , , , , , , CC: , Subject: [PATCH 0/3] kunit: fix a UAF bug and do some optimization Date: Wed, 9 Mar 2022 01:47:02 +0000 Message-ID: <20220309014705.1265861-1-liupeng256@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600017.china.huawei.com (7.193.23.234) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org This series is to fix UAF when running kfence test case test_gfpzero, which is time costly. This UAF bug can be easily triggered by setting CONFIG_KFENCE_DYNAMIC_OBJECTS = 65535. Furthermore, some optimization for kunit tests has been done. Peng Liu (3): kunit: fix UAF when run kfence test case test_gfpzero kunit: make kunit_test_timeout compatible with comment kfence: test: try to avoid test_gfpzero trigger rcu_stall lib/kunit/try-catch.c | 3 ++- mm/kfence/kfence_test.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)