Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3215897rwb; Sun, 20 Nov 2022 09:23:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf56XscX9Bq6sfZqwUVb8FM++ZRX9deFLnxkAOjOQ1MzIA5D43OHUdjO80KGBP8QmLQZKzVP X-Received: by 2002:aa7:c046:0:b0:461:54f0:f7dc with SMTP id k6-20020aa7c046000000b0046154f0f7dcmr13217439edo.117.1668965007850; Sun, 20 Nov 2022 09:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668965007; cv=none; d=google.com; s=arc-20160816; b=Mff2f0LYF+E6S0Uebu9syRgguSlQVGpNbtTXVwqeKOWxrz2OaoimIQVfJ3KR3IoKhN Bi9ilR9D3D86bEVFkQAjzBOFzB6oQq1zW97qB3E/MhNxBSAS2J5uI+UrxygrNGsys/KA dchJKzMxGDTxfarAdAASKjJgJwxkggMgdOReLrER416cUkLCH5CFlvu2QsCU24+UvK8p OF5SXzpK7PDJwYWXtxOn0YYPcZpQt40ZxGgRORp+ZbXcVJade8kDgWOEPQO2FHv8leB0 P5iA5FAe7sITAmCIvG+4+lKL0egfVui2htxA7u6p9XZchIZbo35NuJz/ZFlMgoGlzBA9 jKLA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=KfVu7FWkHQ2Bojm6W10rAhMWKqZU3HIBARL9zZ8Ec6Q=; b=ZMaDb33tVHuO0Gv0rHb9V6t+UG398uBMv2UqOqi05Emw+BB5Esb27zUIutmmkVxzcv lciS9wb0YcdlCkHi7Jug8iqYArb9FBiHhuDBTIinvDxZld0p+EcA9rUg/gaKvXc4KhOa tEtpPeY8+7mQDqZ8QClx+A8OeIieWdGsBzlbjSMDbwqcHsA6FUMPAlhV/WoFzhR8pcZl 4tV5hpdU37qEJh32YEvddDoiyjilZGZC3yx0blhR3twnC7LJPdF0iKKktukuox7JJ8sg jkfh3ITTW5X1w2JJe3auMRKlS2HyxGhgPOUMeZ4MVOZOzeEO6jj0tC63NbvFlxgC7EpV YORQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ClCAE1gT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 g23-20020a056402321700b0046327da0dacsi7446598eda.232.2022.11.20.09.23.01; Sun, 20 Nov 2022 09:23:27 -0800 (PST) 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=ClCAE1gT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 S229680AbiKTQua (ORCPT + 91 others); Sun, 20 Nov 2022 11:50:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbiKTQu1 (ORCPT ); Sun, 20 Nov 2022 11:50:27 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 989FF2E698; Sun, 20 Nov 2022 08:50:26 -0800 (PST) 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-out1.suse.de (Postfix) with ESMTPS id C423D2234F; Sun, 20 Nov 2022 16:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668963024; 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=KfVu7FWkHQ2Bojm6W10rAhMWKqZU3HIBARL9zZ8Ec6Q=; b=ClCAE1gTBD7L0VHqYX1j1nPLr8bzlVQR367tUEYAo+XO0eBUZse8pBuW0kz2b6gPjNRZBn aQGUA7mXLZ1wbExWdMVlF36LbyBzZErSyi6rqCu7DyeJWhB1bMmEkL/XF3hjAkqluHGc2t m5d2XY4ySVoN89WBjiON/DcRpV1L0ws= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668963024; 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=KfVu7FWkHQ2Bojm6W10rAhMWKqZU3HIBARL9zZ8Ec6Q=; b=4bUXNii3ybC/Lc1z7dMzDj/jXBGbveL1kNLLsyAbN1AL4OXRRGCXm6TDlVWaovZAJORDw0 bgOxWnAg0gUOoiAA== 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 8C98813216; Sun, 20 Nov 2022 16:50:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +1/FIdBaemOlWAAAMHmgww (envelope-from ); Sun, 20 Nov 2022 16:50:24 +0000 Message-ID: Date: Sun, 20 Nov 2022 17:50:24 +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] mm: Make ksize() a reporting-only function Content-Language: en-US To: Kees Cook Cc: Andrey Konovalov , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Vincenzo Frascino , linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20221118035656.gonna.698-kees@kernel.org> <230127af-6c71-e51e-41a4-aa9547c2c847@suse.cz> <202211180907.A4C218F@keescook> From: Vlastimil Babka In-Reply-To: <202211180907.A4C218F@keescook> Content-Type: text/plain; charset=UTF-8 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/18/22 18:11, Kees Cook wrote: > On Fri, Nov 18, 2022 at 11:32:36AM +0100, Vlastimil Babka wrote: >> On 11/18/22 04:56, Kees Cook wrote: >> > With all "silently resizing" callers of ksize() refactored, remove the >> >> At cursory look seems it's true now in -next (but not mainline?) can you >> confirm? > > Almost, yes. I realized there is 1 case in the BPF verifier that > remains. (I thought it was picked up, but only a prereq patch was.) I'm > going to resend that one today, but I would expect it to be picked > up soon. (But, yes, definitely not for mainline.) > >> That would probably be safe enough to have slab.git expose this to -next now >> and time a PR appropriately in the next merge window? > > Possibly. I suspect syzkaller might trip KASAN on any larger BPF tests > until I get the last one landed. And if you don't want to do the timing > of the PR, I can carry this patch in my hardening tree, since I already > have to do a two-part early/late-merge-window PR there. OK I'm fine with you doing that, there's my ack already, hopefully Andrey is now also happy :) Vlastimil