Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp188780lqj; Sat, 1 Jun 2024 14:05:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjZkf12xsjiVEGhe0nCFPUobWkLQns6FxJSEjUzGpNesabIhgIdnSQCaaIF5TCQEhneyXOpSuI5JHNyZWh+Wc9RCPANA/sw19JezzwOA== X-Google-Smtp-Source: AGHT+IHa1Rdt4DiCpoNe9l6S0F3LT7No+RPUxX0HEmTLn7J038kR/1mi6B27JILSogbngNeBNAHt X-Received: by 2002:a50:cd55:0:b0:578:c161:525d with SMTP id 4fb4d7f45d1cf-57a3643a163mr3451023a12.25.1717275953117; Sat, 01 Jun 2024 14:05:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717275953; cv=pass; d=google.com; s=arc-20160816; b=sp5X8e7DHvnfU+RbE+XPrJdEZ6Yhc6PYSOmF0sGC9dM0098C+6KU+iwwiLLdnC+uep UMph1cZuYKTLCH2D75siQhF8jfb9jl5T2RMEZYYrbhQ+yPW+NOxQBzu3xdtein9BNN2u T+3HY6qCmiNKZgR5nI6eSwQgS7q2BezhfhBRzJcIXllSw0k4pX6Eh3kVYtObQ+rKiVrm ae2TpsNMVq5mVY7iGKdjRfiy0dVqiVjHBWH2bZTU8OjFEKtIIfqG7gyy5MtLS+iM4UEO xOfojAEDrsSf468ayydA1BGXJuY8YZD78mT0KIbwoN0pyleMezfQqVQiXvEnVt+GzePp XPHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=kwPPQFqT3GBMJ/jhWI+Nr3RwsaB4dK6fZEkpDAERYTQ=; fh=FatVIS0tcRi1UUHljzujDUOYrv9bpLpVUz4kx3DA8p8=; b=q6XdCYweEb5V+YMx8r7MJjUU48GQPpZmnl9Isv4EKbqO/pfrNiYP+/lBiXid/v94/i IM9uwlLGl7YDvl+745l0m+fhQuw5sU4qZtYu4DkuaTw+6MgSLT5CMI6nmHFKGwr9J38C vpF4GxwtCu80KGY76HRh+bNtTMBvE8+ayO1kFUitkcPxx/BVEh56M/0gE0xdCZdULgM5 Q5zECPN4eyjxGeR2pBWyAuWiHBBhKzCh86d2h9+x3FzAvu2clLhFhfzld542PdsGbp0g rYmff0gow+XtU8r7VK1cRFf+z+IZ97k3lFRttMFGcDp6xqBDDP8rC3XAIB1FjU0zdPhS WfKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Op6iEKu4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Op6iEKu4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-198008-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198008-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57a31bad349si2306842a12.205.2024.06.01.14.05.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 14:05:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198008-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Op6iEKu4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=Op6iEKu4; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-198008-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198008-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 77E3F1F219C9 for ; Sat, 1 Jun 2024 21:05:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7208B152DE4; Sat, 1 Jun 2024 21:05:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Op6iEKu4"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="dBvJNwmx"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Op6iEKu4"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="dBvJNwmx" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFFAA3D69; Sat, 1 Jun 2024 21:05:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717275943; cv=none; b=rZb4JRMrhA3kEN52hN1S5vlr6P0c6UdVia3RRFLrTNWn4EbgjfPj+jhWlLNurMH1CW3hKkhqBjeWrvpfKni8eDV50Bn2b5rJ1uy6PiPtKfPUH/DW+cJFnMt15AJAcUin7i5xFaCSfYp/Xc+AY+ZF8dRi7u1qNYP9+AiYxLBQOmw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717275943; c=relaxed/simple; bh=ljldlZuW5R96CDDUsml/oGI7I8C/lXL9K+6aVcKgyaU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FWBsqcvadJmW90jwDfyItCc94TwqB5AEVvCvh3glASipK5mMDervO9J6HllBazNiPiIRYzzH8f6j31StujYz8H+JANluRMQyqV5EvFF2Mkd9j2Lss3goqGDC1LMoci4q/mHnHTXxm3tUUOIX5tMkjKYiarzUBXFuoLLDGMN5h9A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Op6iEKu4; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=dBvJNwmx; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Op6iEKu4; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=dBvJNwmx; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A054E1FEEC; Sat, 1 Jun 2024 21:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717275939; h=from:from:reply-to: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:in-reply-to:references:references:autocrypt:autocrypt; bh=kwPPQFqT3GBMJ/jhWI+Nr3RwsaB4dK6fZEkpDAERYTQ=; b=Op6iEKu4yTxsRDrm0d/07HPUnilBG3ZXoBOScKonAsdbpsdm8eG42Qb2u4gd9E458+Ii0q OPI50/Ik3a0JmhHkQ4PWipL+esmZc31VHBrpDiXvjhzWvP3OXrNckhvfOrvx8p/6cWHm5U lLpyyNM6Lxc/1mYsjXKh/dtqlSa+Kt0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717275939; h=from:from:reply-to: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:in-reply-to:references:references:autocrypt:autocrypt; bh=kwPPQFqT3GBMJ/jhWI+Nr3RwsaB4dK6fZEkpDAERYTQ=; b=dBvJNwmxTHGgr7p0bqPedHGk44G5htsVc2XQKZ6S5UbiFHvwpMCe771SfHo1hi8dPSxi5H pDRq8raJlRoG1cDA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=Op6iEKu4; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=dBvJNwmx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1717275939; h=from:from:reply-to: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:in-reply-to:references:references:autocrypt:autocrypt; bh=kwPPQFqT3GBMJ/jhWI+Nr3RwsaB4dK6fZEkpDAERYTQ=; b=Op6iEKu4yTxsRDrm0d/07HPUnilBG3ZXoBOScKonAsdbpsdm8eG42Qb2u4gd9E458+Ii0q OPI50/Ik3a0JmhHkQ4PWipL+esmZc31VHBrpDiXvjhzWvP3OXrNckhvfOrvx8p/6cWHm5U lLpyyNM6Lxc/1mYsjXKh/dtqlSa+Kt0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1717275939; h=from:from:reply-to: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:in-reply-to:references:references:autocrypt:autocrypt; bh=kwPPQFqT3GBMJ/jhWI+Nr3RwsaB4dK6fZEkpDAERYTQ=; b=dBvJNwmxTHGgr7p0bqPedHGk44G5htsVc2XQKZ6S5UbiFHvwpMCe771SfHo1hi8dPSxi5H pDRq8raJlRoG1cDA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8685D137C3; Sat, 1 Jun 2024 21:05:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id k45SICONW2YUUgAAD6G6ig (envelope-from ); Sat, 01 Jun 2024 21:05:39 +0000 Message-ID: <03207187-9e85-412e-98a9-1965f31b0003@suse.cz> Date: Sat, 1 Jun 2024 23:05:39 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] kunit/fortify: Remove __kmalloc_node() test Content-Language: en-US To: Kees Cook Cc: linux-mm@kvack.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240531185703.work.588-kees@kernel.org> From: Vlastimil Babka Autocrypt: addr=vbabka@suse.cz; keydata=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UiKEsDswL1WAr tEAZaruo7254TyH+gydURl2wJuzo/aZ7Y7PpqaODbYv727Dvm5eX64HCyyAH0s6sOCyGF5/p eIhrOn24oBf67KtdAN3H9JoFNUVTYJc1VJU3R1JtVdgwEdr+NEciEfYl0O19VpLE/PZxP4wX PWnhf5WjdoNI1Xec+RcJ5p/pSel0jnvBX8L2cmniYnmI883NhtGZsEWj++wyKiS4NranDFlA HdDM3b4lUth1pTtABKQ1YuTvehj7EfoWD3bv9kuGZGPrAeFNiHPdOT7DaXKeHpW9homgtBxj 8aX/UkSvEGJKUEbFL9cVa5tzyialGkSiZJNkWgeHe+jEcfRT6pJZOJidSCdzvJpbdJmm+eED w9XOLH1IIWh7RURU7G1iOfEfmImFeC3cbbS73LQEFGe1urxvIH5K/7vX+FkNcr9ujwWuPE9b 1C2o4i/yZPLXIVy387EjA6GZMqvQUFuSTs/GeBcv0NjIQi8867H3uLjz+mQy63fAitsDwLmR EP+ylKVEKb0Q2A== In-Reply-To: <20240531185703.work.588-kees@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spamd-Result: default: False [-4.40 / 50.00]; BAYES_HAM(-2.90)[99.56%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.cz:+] X-Rspamd-Action: no action X-Rspamd-Queue-Id: A054E1FEEC X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -4.40 On 5/31/24 8:57 PM, Kees Cook wrote: > __kmalloc_node() is considered an "internal" function to the Slab, so > drop it from explicit testing. So is __kmalloc() and so I have the removal of both as part of the cleanup here: https://lore.kernel.org/all/20240527090127.21979-2-vbabka@suse.cz/ which reminds me I should put it to -next at this point. Review still welcome :) > 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); \