Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2861168rwi; Tue, 1 Nov 2022 12:41:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7nFEqa9YmXVEUiEpQpNy+vMI04nTPt/mW4v2pBcc71/e7CP1EExCZO/vb3SOEo8EUMyaxc X-Received: by 2002:a63:2547:0:b0:46f:793f:197b with SMTP id l68-20020a632547000000b0046f793f197bmr18910417pgl.35.1667331696640; Tue, 01 Nov 2022 12:41:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667331696; cv=none; d=google.com; s=arc-20160816; b=b+EaL5g56aMWfdA9dRxIrSt0dlNHVKMVdQz9jd4Tuhx414edbHRayrhnHsiq0i3urw YhJvMH2DmoVlNspN4NA9El9iW8RI/Tsvbg3c/+7HuRHdD2FqYLax9FO5l9LsQD709knL X/rp6beUfI1fPL5vYvj/D1swGTqRbVk/qBid9ClxAAcofP6Y+uzDgrTUNffkJ05Bpc15 eSt4U+r3fCvJohN35A/fvxSHAtqRJsEj8zyhee7jbPOlln6y4i4QNgwxiGizw1O5Ffw6 cPQcpcecLvzATujc0xExUm+u3WtbMsMyi/ZMh5PzA83SzCAEKN9W28u9WwEBabfANeE3 nORA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=Jc3GZbUnGicye2/jncE2VAeBO5z9oAX6w1xDyj0hRaI=; b=f+bhlbji/UJh7lqY/Fx33IQtAquSZj4vAiDsxjggCkIWXxynB6L1gdnYp+FJkuH7Fj 3L9U0uOALYvZ1+TA1XfyWnSJsoSy4I7PiBjL0wyjyPL7xyCPYQQnACMGmtdRJy1AAMT+ 7fG2ifaUA6aPcbJeOAAS3gCimRXqWZ+9i7cUl+FEFZyDwv3+PTkYdMRWvuWjH6gJzBFm udbbxB3Cm7PJ9t8wQqvXVgbl2Tnuuw7gW2Ps3Gx8P2sKwKDphDcYQNFop9hzvSLebY63 yYdL/Cr6eHluo5fUmNvs+mZMX0GBz5+NI60eYXWb7H2qp1bt3ifLTiGVdGfCJWoEfZuA u/5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zxfEoNp7; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=R81kdDAa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z198-20020a6333cf000000b004594e9f9b10si13896948pgz.188.2022.11.01.12.41.23; Tue, 01 Nov 2022 12:41:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=zxfEoNp7; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=R81kdDAa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbiKATgB (ORCPT + 97 others); Tue, 1 Nov 2022 15:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiKATgA (ORCPT ); Tue, 1 Nov 2022 15:36:00 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4A71DDFF; Tue, 1 Nov 2022 12:35:58 -0700 (PDT) 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 ABF861F8BA; Tue, 1 Nov 2022 19:35:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1667331356; 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=Jc3GZbUnGicye2/jncE2VAeBO5z9oAX6w1xDyj0hRaI=; b=zxfEoNp7ByQJWbFfW/abgDH3V5Ms7cBMA7PHBEYuzp95JXxSnlsKV9HE48hNuYThLVm4d8 pDUT0NS97pS9sleJdlH4HYB4TuKVZ0sW0UcxJDs6rj6RjjnVG/OYrQhOYfWNtJolbMgKYn 42KRxuj4mYVHb7TJUD+FfYxMqVIuygI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1667331356; 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=Jc3GZbUnGicye2/jncE2VAeBO5z9oAX6w1xDyj0hRaI=; b=R81kdDAat9+Gy9w72WUdJdEEDk1kFsDH5uguOsuZGDmslkZx4I/62V9xhPiUKDalyvl3JQ ekfwdj+5mkwhYwAA== 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 6A11613AAF; Tue, 1 Nov 2022 19:35:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id g9MRGBx1YWOATwAAMHmgww (envelope-from ); Tue, 01 Nov 2022 19:35:56 +0000 Message-ID: Date: Tue, 1 Nov 2022 20:35:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v4] mempool: Do not use ksize() for poisoning To: Kees Cook Cc: Anders Roxell , kernel test robot , Andrew Morton , David Rientjes , Marco Elver , Vincenzo Frascino , linux-mm@kvack.org, Andrey Konovalov , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20221028154823.you.615-kees@kernel.org> <20221031105514.GB69385@mutt> <13c4bd6e-09d3-efce-43a5-5a99be8bc96b@suse.cz> <202211011014.02F2559@keescook> Content-Language: en-US From: Vlastimil Babka In-Reply-To: <202211011014.02F2559@keescook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/1/22 18:15, Kees Cook wrote: > On Mon, Oct 31, 2022 at 04:00:25PM +0100, Vlastimil Babka wrote: >> From a4a5a40852723dfadb2429bee1d5e1f9d3b75f39 Mon Sep 17 00:00:00 2001 >> From: Vlastimil Babka >> Date: Mon, 31 Oct 2022 15:55:47 +0100 >> Subject: [PATCH] mempool: Do not use ksize() for poisoning-fix >> >> For slab mempools (not kmalloc), pool_data is not object size, but a >> kmem_cache pointer; we need to extract the size via kmem_cache_size(). >> >> Reported-by: Anders Roxell >> Link: https://lore.kernel.org/all/20221031105514.GB69385@mutt/ >> Reported-by: kernel test robot >> Link: https://lore.kernel.org/oe-lkp/202210312110.1fe5d224-oliver.sang@intel.com >> Signed-off-by: Vlastimil Babka > > Reviewed-by: Kees Cook > > Thanks again for fixing this. I don't see it in -next yet? Should I > resend this directly, or how would be best to land it? I think Andrew will add it from here, but maybe is waiting for Anders acknowledging that it fixes the bug for him? > -Kees >