From patchwork Fri May 31 18:57:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 13682008 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 4D79AC25B75 for ; Fri, 31 May 2024 18:57:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D85356B00AC; Fri, 31 May 2024 14:57:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D35946B00AD; Fri, 31 May 2024 14:57:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C24776B00AE; Fri, 31 May 2024 14:57:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A3FA66B00AC for ; Fri, 31 May 2024 14:57:14 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4E47B81870 for ; Fri, 31 May 2024 18:57:14 +0000 (UTC) X-FDA: 82179598788.04.AF29DB6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf28.hostedemail.com (Postfix) with ESMTP id 667F1C0010 for ; Fri, 31 May 2024 18:57:11 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LXqURVvo; spf=pass (imf28.hostedemail.com: domain of kees@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kees@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717181831; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=GF5F8Hbym2ZtWWNMraPTtW7zKw29kzggBVACC8KZ5Go=; b=mY3MPf1liCeIDn5C48Q9Ljs6KNpI7MGIJbVCUBgJLquFjvMmG23MWnUSzWBjE7H1ebnWx1 rZfocCf3T0Fh3V03RvdwZ8pXybs5nyXgAFvwL2uyoStZPlexjQfQ8lGW8kQ5TJdOpkSLgw al4qE+OnztJycX6RSjniqEy4oml5H0s= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LXqURVvo; spf=pass (imf28.hostedemail.com: domain of kees@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=kees@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717181831; a=rsa-sha256; cv=none; b=LnCICKcsf56EF9s+fbnvVmHPCnBA4xm+Mmvb/JrayZ39FZLj4CXIP7pVzYv9rCdR57yiME yuOZfVs5mf7j/PLtwYUND7TIDW3KzeUcn3JBFVvqWcSvAYDui+8cDlXNt5SkZcXVslj3Hy DjLzQ/DthBzwBlRN6YRX1Z8Lf2EcJwc= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 7175362CCD; Fri, 31 May 2024 18:57:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25EC8C116B1; Fri, 31 May 2024 18:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717181830; bh=AD6M0l/XhTHROLN84HPg7DK+mvf0+qhuriNkdX52eto=; h=From:To:Cc:Subject:Date:From; b=LXqURVvonoO86l+SqVgDHx2+6B84YxN3Ty3Jalhip5f8LKmuDWXyaQKkN6oGxYISW cw/2cdWVvesB8ubTgklEC72ezwDndA7f3d3e1+Xo/M63Xi+Gfdm+wKu54NJsfmPC42 MSXOXcVYgZ58Vf3f+EJgoyKiXhGmi9al0DMaD8HQeb2jCWMfibtUNoDaN2Y7C0BvWt U4LL61/4Ou5r1cMT6h05RtRM8nwghSLBHWuF+KTjlzvAhlbuVvz8UZtqlmxPCDPbfy KkPPa2GaCTC9pwPVf7n8sFmt2b+BUqwzAGlHP0nzdWljP+zHP31bS26cxzCzSkwhPA u2tJWJ/shle+g== From: Kees Cook To: Vlastimil Babka Cc: Kees Cook , linux-mm@kvack.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kunit/fortify: Remove __kmalloc_node() test Date: Fri, 31 May 2024 11:57:07 -0700 Message-Id: <20240531185703.work.588-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=912; i=kees@kernel.org; h=from:subject:message-id; bh=AD6M0l/XhTHROLN84HPg7DK+mvf0+qhuriNkdX52eto=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBmWh2DthOMchFi4h1JTCJc+Oc7ZIT8JDA+GPlTq O8+j+LvBiKJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZlodgwAKCRCJcvTf3G3A Juc9EACBg7g0AciMJlxpgOkrIEkAgz4JxUyNzcnSH9uUoC2yv8MCXe94HbZEDY7e+twT+Kme7c3 P503Bd31wDK0odVa9x+AfYv7p+7hg6lnKrs0p8m9wybIJIYB12+9OVtY8ue4mXw80s4eDYT6iBt aowOPKrdFswzoOqQ0QItii6khvk9d5ODMhDeyUb9/W5+o+VNFIlb2m+PjQ/yYt0O7Dt0oWTtIf/ O4LV6hS8RBaE3FOmiHfkY60Umwvlj+vwH/KBHiEeauwlQKrfJrxvotXHIvrNWfz8gSz+BNvVqgj 0gfhB8TzgxCEwKYOuqthrYFdgEE+31THl5RocK7YZcIe+SRLHCWzfwSx92LMMLFH2x4rxsHFYqU hxHkhKIJNRI1x1TD0mlOjQZ++Kj7aZgzUWMZviF7iG9eCWOTSwwT2dwW2/XhRIcpfgPyXoe0PIu sf8O2HoLGy9am5QU8EN3AN46jUH/BiVwZ/3fHwiZyeGRKEmx3RvZQCPWzukEGIxsf7m0rLXSqfq dfw7ORnoDjBIeGUQIIz5H6L5WW/OvhDL5b1qLAvtqycwJIxsQzmcvGAxRKYqcHHaiuSQDsiUZrt fA57Ae3G0JbDrmzWaD4FAY2zYHnJH7w9XlpCumPcaUP1G/wJKGlV3ZPRAod7lqZKEUluB0jJJMs AnHqrl sFegIWnK g== X-Developer-Key: i=kees@kernel.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 X-Stat-Signature: 6mr4qan1iz67oiinf9gzeo6t3rxgmrr4 X-Rspamd-Queue-Id: 667F1C0010 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1717181831-720360 X-HE-Meta: U2FsdGVkX1+4+AdkrIskt9kUX4wBHyo1+2Xe/5YNhnw2DwbxFtRvpALPK33FFBfimyPP0H76nweTKCVBULjtvjhXlas5JAwQdEjFmFAJFAFW1MnCT3MvSLQT8qFEuFBqgfgV3aV5bjwmJticsua7HBAJPNydaV52P2Jo54XdiShYSuhyaR4IpssOX332zZVkFn2svDBV0/k2uZUAxcVgMSvZHVG5JZmRM19ClWU1Xlxwl+z11ju0o58wtm0i/rQiway60Xcd1/DKmrN+46Ne4/71J9PwQQ7apfkCbVjlm6Z2Afm9QeF9p3OngsqVGYbokYp83LZJpmBq1Gy25tDdZdqAc0zadIXeNW/J5Mb/Wp9NriLaEp1Rx4yNnbMdLZPsq/XliynsONjc5swzS7Bc2rrzuIU5GONUBP7dlveweSaY6M7CcnwC1PGVQZQrZCPlGlixDhG+25tR/dd6SkPSwzOQyj12VLcpLqir6i3M7IMkdMcg6E8nTdYTW50Cu++T774IOt93CEPTgmEgVF2xlPB+bxivkIfB/cQGiP7aZf3QwFDxXhcyWjQk9w/DhMe+qy0+TUj93FpQVKAPo1PWr3jbgoWZqNyC71A7QkSx7iVAk511UxclYiGJZHrJXnlfWm1FCbn+RRN5PJtaHXuTkppHisWohtoQXoucPKHHayK/nqgOYnFYMUN/k6IxAvSG2lDK9We5UoI77dvuCIr0gPMZA/8oE0be5WgNV9h+DNxB+R64AZJ3tzDU+UOLqoPan5hNjYKLrHo+khEjAmQSxZGyrXCqq9/OCTu/3yCjLnaGGz+JMkHOrRjcR0zyQOLZpf1tSmb+Txim5m4WcNuMoPrJRWmDxcIZeq6YqJRtsMh9f2yORzJ2oG2F5hPlDizTimob4r0+o5cPH4XyFVPFiCefRhK7ScGyLbhEEAA2YRvO9LmW2iUSnUSshwnPpgVnjIzFHBCldJp+dUZ8jdc rugLswcH RRHCLxnvZGknrgYNoP4sRoYSXd9hhV2rGfvyigPS68V/q1B+AmIBt+S5O6zv+IzSPE6TBB6ehAU4sNPwoy4oAtgVkyJVlwsAWiFBuwsaQeKrifzMoZ2k8SMjhVrnZRAWJ2sHdEU/YBLvyF1UDv5OkMQKSd7IHyEIESRbTEVl73EqrwXDuSq391KqyycMhkH3fV94QWdhmC/BnYI7YlPZDjScnZGc371/x2GDkg/+BSYdSJy6Z6IMekGijix5yBD6R0o9V7etCx2rALt9GbIuHFRMguFrfc7JzD1ulp5E1u1wqg7WcBmvKkjAzAo8kwhn5lxMJtmgs+zfWIDpCafIXr0B+XA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: __kmalloc_node() is considered an "internal" function to the Slab, so drop it from explicit testing. Signed-off-by: Kees Cook --- Cc: Vlastimil Babka Cc: linux-mm@kvack.org Cc: linux-hardening@vger.kernel.org --- lib/fortify_kunit.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/fortify_kunit.c b/lib/fortify_kunit.c index 39da5b3bc649..f9cc467334ce 100644 --- a/lib/fortify_kunit.c +++ b/lib/fortify_kunit.c @@ -235,9 +235,6 @@ static void fortify_test_alloc_size_##allocator##_dynamic(struct kunit *test) \ kmalloc_array_node(alloc_size, 1, gfp, NUMA_NO_NODE), \ kfree(p)); \ checker(expected_size, __kmalloc(alloc_size, gfp), \ - kfree(p)); \ - checker(expected_size, \ - __kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \ kfree(p)); \ \ orig = kmalloc(alloc_size, gfp); \