From mboxrd@z Thu Jan 1 00:00:00 1970 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 20CE4C4332F for ; Mon, 21 Nov 2022 09:28:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8D56E8E0005; Mon, 21 Nov 2022 04:28:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 885498E0001; Mon, 21 Nov 2022 04:28:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 775468E0005; Mon, 21 Nov 2022 04:28:36 -0500 (EST) 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 69DAB8E0001 for ; Mon, 21 Nov 2022 04:28:36 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EFB2D120E76 for ; Mon, 21 Nov 2022 09:28:35 +0000 (UTC) X-FDA: 80156924190.30.D6FC9A2 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf20.hostedemail.com (Postfix) with ESMTP id 67D151C0008 for ; Mon, 21 Nov 2022 09:28:35 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 01EB31F37E; Mon, 21 Nov 2022 09:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669022914; 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; bh=/Y4IZoLVRj8AR5tjsHCss9N1teSmj9vglLERjZaMD7Q=; b=EJiKnqNXde2PecbphzNFPeQZKzd248pytCyissxmjveo7tle57utcAOW/oe0nlWO4jEtCc BO3l8hsNfvcWBKqctp7dnofsoYBgcXdGgi6TmmrFr2ePWNcxtt795C4RsJM6WZep9EeMQv 8wSf3qXbTrLCXeOwx5CY+RnYJ11FaCY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669022914; 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; bh=/Y4IZoLVRj8AR5tjsHCss9N1teSmj9vglLERjZaMD7Q=; b=IwpqJHx8hRMgXiZAtVPlkONVoki455HtEg9cap4PP2aW7TFlYErq0jdY974Mkf59JI7FVm VMbq3j1UFverlZCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C63ED1377F; Mon, 21 Nov 2022 09:28:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HLOfL8FEe2OgbAAAMHmgww (envelope-from ); Mon, 21 Nov 2022 09:28:33 +0000 Message-ID: Date: Mon, 21 Nov 2022 10:28:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 2/2] slab: Remove special-casing of const 0 size allocations Content-Language: en-US To: Kees Cook Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20221118034713.gonna.754-kees@kernel.org> <20221118035200.1269184-2-keescook@chromium.org> <202211180906.3030FDDB4@keescook> From: Vlastimil Babka In-Reply-To: <202211180906.3030FDDB4@keescook> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669022915; a=rsa-sha256; cv=none; b=MwDSPcQAhKKGjjlb3nLLAWPibYS/pmQ7CJmZQ+Dv1g3y4cVejeoIc4Aguqk5LMhWDk16JD aAzWAeOCVV2wk50FwmT2WpXWbQpeFJUCNF/Airg+yjPtc042EcJsKlC95dP3uS1VkCBb8I yahNDYZS/ub4b0Fdp3RW2X5RP2z5UdM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EJiKnqNX; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IwpqJHx8; spf=pass (imf20.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669022915; 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:in-reply-to:references:references:dkim-signature; bh=/Y4IZoLVRj8AR5tjsHCss9N1teSmj9vglLERjZaMD7Q=; b=h4JaMshPhDHOWXKbPGLFHCC9n1+JJIjEOp34IlyuBnWmgcyQL5SYctEpCmy1w36YwCYXUT wS9ZocXH0HxIiYO88gyVnFyZOK8SaP6PQ2tPbY96SeMDSQ0d8vySrjaujDJwoBa3J3KLR5 M77Blg7Tcd4eC7lpdHcyULCHUHFXeMY= X-Stat-Signature: tkudyxt5dp1xxnb9kxztuf9atuw16prd X-Rspamd-Queue-Id: 67D151C0008 X-Rspamd-Server: rspam01 X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=EJiKnqNX; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=IwpqJHx8; spf=pass (imf20.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1669022915-510727 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: On 11/18/22 18:06, Kees Cook wrote: > On Fri, Nov 18, 2022 at 12:34:01PM +0100, Vlastimil Babka wrote: >> On 11/18/22 04:51, Kees Cook wrote: >> > Passing a constant-0 size allocation into kmalloc() or kmalloc_node() >> > does not need to be a fast-path operation, so the static return value >> > can be removed entirely. This is in preparation for making sure that >> > all paths through the inlines result in a full extern function call, >> >> So with the kmalloc_trace() already solved, we could now say it's not "in >> preparation", but simply "makes sure", right? I can correct that while >> picking this patch. > > Yeah, good point. I missed this when updating the commit logs. Thanks! Great, pushed to slab/for-6.2/alloc_size