From patchwork Thu Dec 21 17:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 13502435 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 54399C46CCD for ; Thu, 21 Dec 2023 17:27:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ACAED6B007B; Thu, 21 Dec 2023 12:27:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A7A7E6B007D; Thu, 21 Dec 2023 12:27:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 969896B007E; Thu, 21 Dec 2023 12:27:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 885446B007B for ; Thu, 21 Dec 2023 12:27:05 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5642680DBA for ; Thu, 21 Dec 2023 17:27:05 +0000 (UTC) X-FDA: 81591506010.15.E0A8C54 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf12.hostedemail.com (Postfix) with ESMTP id 7C1F240006 for ; Thu, 21 Dec 2023 17:27:02 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Vgr1nOMV; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of nathan@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=nathan@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703179622; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=PV3quVy0tEze3ufNVKy6BNRxqcnzU9AraZuJ7Ir+LBc=; b=bWgM0j3Goo/QqJWL/4XP+lMjhxxl0hyfr3MYpMIPLxNbD7F9UFiPaenO4qY3EkJ9Iy2mzP OoeG5O+Pd/KHi5LVEQ2dgLQzXllBd4G2IVuXpcJh1t+tFvCW9nGFoZ5tWerXNTlsl1Th3W LE9ib9UkrwjQ6nFUyJs+G7BJfPw/jIw= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Vgr1nOMV; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf12.hostedemail.com: domain of nathan@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=nathan@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703179622; a=rsa-sha256; cv=none; b=doe/qCtMo9OYrrjirbhuuFMUGmpjVTffVg4Vurs4Nglt1ZN5EDIX/i2uAyXVQS64aTVJPd tMzCzPJAL+LbWrE9SzVBKRAErlSWqORMpmmJvaXxaSi3R6PatmuJ4eMxJlZdNph4LPw3Xa GejQUelasjASU4aF7lKIGOxfEQ+FvOE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 97BB4B8216C; Thu, 21 Dec 2023 17:27:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68D8EC433C7; Thu, 21 Dec 2023 17:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703179620; bh=j7IMo3IslfxSy6UdippjFzjMlbpaPfIPQIQ0OgZlg1w=; h=From:Date:Subject:To:Cc:From; b=Vgr1nOMVkPm9qdsHlovJ02nCyLGAxAAIdd2i9lihUPrGXC7l6I0OghRmacqVFFPxM jAGiEDzdgqW+95ZVl3jFjzwA782qUapXNin/1SY+4hAEihUU1kSjUEHaMSRyYBZlSB u6YpUTtWMAzJFOBtY2gj77+XGRqAMOEnbQeoAZ/V9LzbkrCl3Q1LEwuaiewKxPjsrf 8uxkA8pWK+DnWayfXL9kIvGCb8+/059vCawCMD4SA9lPP6MnmaAtXGwPU2OtD7uOWN mPNvB2HQ1bBjdbJJyt0r2XSYaQjgOg/Jvi4BL336PkGHgPG6jROMXC2y3tqqTiMR1r 812jAGEktzLTA== From: Nathan Chancellor Date: Thu, 21 Dec 2023 10:26:52 -0700 Subject: [PATCH] kasan: Mark unpoison_slab_object() as static MIME-Version: 1.0 Message-Id: <20231221-mark-unpoison_slab_object-as-static-v1-1-bf24f0982edc@kernel.org> X-B4-Tracking: v=1; b=H4sIAFt1hGUC/x3N3QrCMAxA4VcZuTawZsrAVxEZaU23+NOOpoow9 u4WL7+bczYwKSoG526DIh81zanBHToIC6dZUG/NQD0Njsjhi8sD32nNajlN9mQ/ZX+XUJENrXL VgIOPREdxJxojtNJaJOr3f7lc9/0HtDZ9DXUAAAA= To: akpm@linux-foundation.org, andreyknvl@gmail.com, ryabinin.a.a@gmail.com Cc: glider@google.com, dvyukov@google.com, vincenzo.frascino@arm.com, kasan-dev@googlegroups.com, linux-mm@kvack.org, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1506; i=nathan@kernel.org; h=from:subject:message-id; bh=j7IMo3IslfxSy6UdippjFzjMlbpaPfIPQIQ0OgZlg1w=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKktpcmvE2Ulrdl2PGyrXvBlhcbuZ6K5C74t2VYu42ZRF TtHcbNmRykLgxgXg6yYIkv1Y9XjhoZzzjLeODUJZg4rE8gQBi5OAZjIrTOMDA+btzpWWs18o6Ju tDyp86WrKqNz1+FXL1oi7N5Kp27yuc7wv2TPynymQ72Lr/y08BNzFc4M8jn0RXyrw4Vyzu0vXO2 O8AEA X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-Rspamd-Queue-Id: 7C1F240006 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 1otjdmgt6366xq6g1cb9zf8xq8w8fas3 X-HE-Tag: 1703179622-145425 X-HE-Meta: U2FsdGVkX1+WC0BhYvV5xhyf/iVYtTvPaqAzYPOOtuIYnh7tYnSqFC8bwSaySSH/y6U2bQ25Ygp1pUVI6klwZJ1s8yGZOFnIoBD27VfXFAALkaFg41lcy3QVWwY/Wn2Nfi+IMGnDZ7CeXhzPnLb9nFVSzbstd9VKI1Rh6HBx7qTdjPvFZfJU6VknaJhv/W/TLG4KCZNWk1MKA+6A38Yy9mrujH+ggLDT/S4lljIYRF4VC57yFNHSIX78YMDNjYKjbSirNmr7swOvpEfxEVLUTVrVZ1MnR+GgxNwiH0x+0yAUWMfL6j/5u8+cQfZF5Dc6B4wmpMIjiI85rs31GdlGZKPttsg4Ee3E1lfr1MYEzGNEmSyp8w0TLokSZRCZ184w2Owv7A/DOaGjT+d0aZdrEU8Gluw/1rClpq7dWrrFwewSzo+MD/9rxisBMdkwxr188YRrdm9oSGMuqG/Vw/jrmOF7zNEsyVMIWUeMvKK5uxjuhdsOB7tgfCq2j2ho8ikJQgUsraT5AUgwjnd03PZHiFEo3q2AT9Qa58CJ3yFOpRyKrhTAkFtwoZ4rgHdQQrl/41GnSUzi51/vmRm58SCfzspGL9JeK9n2YgAgDqsUmTSWa6gwrNUcrZnzHXYKbY+GtwYScxuwx2qNyfVCNeU7kxTULP+5E4eIyMeJuU4hdSzxBWeoIrhoG2Z4FKNh7K8/OypobklmCig3LCoSz0Bvvkcxt0QlyIbG9qjN+6wikGFJX9YgfLBXTVm3Gb+6qOgx1OWwAKcseLLVrBUPdYbRDVekfzQqrbNcPOn08iHAG6Lf00JKoU0gpXrBiuYTKrhu6i3enAKJZcfrvqjOYkfM/faLEZ/U7jvVVfLEA+ieVE+gUbBvkMsjUa28yYb08aW1GwmW48panC7/n7qp98YRkiwjHe48oOWhdukrORpv/z+fiorh+83pYUwzRpOrgtFyTwq85P/4lRTqIfkpyW2 YjLXE3/o /O+iq38iwOv74Vy4M/hdgnRc2osPyB8D0hEKWMUmAtW+noSYYVYxzw+8zEp6Tmpaes3IdmB0obdzBFiUqpRjpAT4qDtShe9xQLPpQbSeQ6/cQxRb0W5BAzFkU2mx0RDz9LgkZU58yR3g0bE+3OWcERPF8AhSMWLGQQZUivzH4lTrLZlB0Qh4phT5I6OvfP1qmJUkzNpQw/cu5drecSycl61lAwSXUC8VnHoDwLDQ31fprzp8gs4oH3v0gHTU+WkqD1Gi3L+yV9z0HxglWc9fPcSLzJblldaY7t/c16z8LJBz40ifJJSGJOgUMcxaQj49eFY/r8kcUN0KGs54dNdNt8xd50HHWowYbaaHxBJ/nkONtjPU= 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: List-Subscribe: List-Unsubscribe: With -Wmissing-prototypes enabled, there is a warning that unpoison_slab_object() has no prototype, breaking the build with CONFIG_WERROR=y: mm/kasan/common.c:271:6: error: no previous prototype for 'unpoison_slab_object' [-Werror=missing-prototypes] 271 | void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags, | ^~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Mark the function as static, as it is not used outside of this translation unit, clearing up the warning. Fixes: 3f38c3c5bc40 ("kasan: save alloc stack traces for mempool") Signed-off-by: Nathan Chancellor Reviewed-by: Andrey Konovalov --- mm/kasan/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- base-commit: eacce8189e28717da6f44ee492b7404c636ae0de change-id: 20231221-mark-unpoison_slab_object-as-static-3bf224e1527f Best regards, diff --git a/mm/kasan/common.c b/mm/kasan/common.c index ebb1b23d6480..563cda95240b 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -277,8 +277,8 @@ void __kasan_kfree_large(void *ptr, unsigned long ip) /* The object will be poisoned by kasan_poison_pages(). */ } -void unpoison_slab_object(struct kmem_cache *cache, void *object, gfp_t flags, - bool init) +static void unpoison_slab_object(struct kmem_cache *cache, void *object, + gfp_t flags, bool init) { /* * Unpoison the whole object. For kmalloc() allocations,