From patchwork Tue Feb 22 17:10:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12755711 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6D14C433EF for ; Tue, 22 Feb 2022 17:10:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C9528D0002; Tue, 22 Feb 2022 12:10:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5779D8D0001; Tue, 22 Feb 2022 12:10:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4676A8D0002; Tue, 22 Feb 2022 12:10:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id 337438D0001 for ; Tue, 22 Feb 2022 12:10:19 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DC3C9181B5809 for ; Tue, 22 Feb 2022 17:10:18 +0000 (UTC) X-FDA: 79171054116.21.A158BCB Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by imf01.hostedemail.com (Postfix) with ESMTP id 08F6A4000C for ; Tue, 22 Feb 2022 17:10:17 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1645549816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WtAp4AiQx2cFjDZg+kQhLqiCnjHbJYbWSztFNAebJV0=; b=xlYQqe087ezV+XM7I/ABgA88EuEsv37JtzM7yYXaZZjF4VPd8bMVFm520holvBULzpTQKZ NkeBoBwoNSpuIx9d6QofDAZ8PjTvilEBTK0k0yS3I7O4Xs9LaI7ndLeiGzhLg+ycfDs2lY JNPjBQBx5ueUdsUcBU8UNPQhj+h2PUY= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , kernel test robot Subject: [PATCH mm] another fix for "kasan: improve vmalloc tests" Date: Tue, 22 Feb 2022 18:10:14 +0100 Message-Id: <2d44632c4067be35491b58b147a4d1329fdfcf16.1645549750.git.andreyknvl@google.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspamd-Queue-Id: 08F6A4000C X-Stat-Signature: 3mxk3s6st7u89ub8cgyycrbsx6w493ip Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=xlYQqe08; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf01.hostedemail.com: domain of andrey.konovalov@linux.dev designates 188.165.223.204 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev X-Rspam-User: X-Rspamd-Server: rspam11 X-HE-Tag: 1645549817-534501 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov set_memory_rw/ro() are not exported to be used in modules and thus cannot be used in KUnit-compatible KASAN tests. Drop the checks that rely on these functions. Reported-by: kernel test robot Signed-off-by: Andrey Konovalov --- lib/test_kasan.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index ef99d81fe8b3..448194bbc41d 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -1083,12 +1083,6 @@ static void vmalloc_helpers_tags(struct kunit *test) KUNIT_ASSERT_TRUE(test, is_vmalloc_addr(ptr)); KUNIT_ASSERT_NOT_ERR_OR_NULL(test, vmalloc_to_page(ptr)); - /* Make sure vmalloc'ed memory permissions can be changed. */ - rv = set_memory_ro((unsigned long)ptr, 1); - KUNIT_ASSERT_GE(test, rv, 0); - rv = set_memory_rw((unsigned long)ptr, 1); - KUNIT_ASSERT_GE(test, rv, 0); - vfree(ptr); }