Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp887967rwb; Fri, 18 Nov 2022 09:31:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4v/YrxMgZrqy4CRJwAP0yKL2I5W8O5Y3j1lsdCv5k4sk979pIE2+RrgLGb+3Gh9UfuVS8p X-Received: by 2002:a65:644f:0:b0:476:87ad:9c16 with SMTP id s15-20020a65644f000000b0047687ad9c16mr7520377pgv.196.1668792706527; Fri, 18 Nov 2022 09:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668792706; cv=none; d=google.com; s=arc-20160816; b=snBqdtHA4AnUCCAZceKaJUX0/pzYgx9p8X9Fw8rHbV7QFn6BdJio4SlH9omp2YHb6O EgbGtbxsWD9lomWYR/swBIyEbJ7jt1uBZ0jyazklwLS8osXxbA3Lh3DVmJO56iVVeTyW K2TZc2Y2yhlt9RSMOHg0jFtojw7DY/DSdxl9NYwG3AqrTaMWN6wJfpuhqKHlvH8/AQwW kWgKrfYzCHKjCqC2jfBWq0F8Uu3tgq5N2znuOjB7InnuGaobXlONokH11WC7GS5lfK+3 SgttUAmM0JEluo664ZW0GghvCZC0n1z1IWecLTLmnIuQvfssoKEsIvYnTRPunBGDxII1 imqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cDyeQiupLB9oqNpxPK4jyqPn5HRNeTYV3/chespM10E=; b=AItflXcWsw15jKYYSuCKo+FtbqB9NJlNNB6BWWRp/bPLnEvnrJjXDQvyoMgRSeOLFH cO6FWBzkqTzwm9h4a9rAAehYzCN+zrejWgaQildO8RjOKlNSOe1pARI1Y+Nfa8e/Di7L kOZZoa3mqQy9ICqZzwi572n3yPhHJmsV/rn977CRUzpmlV5xkmpoYGeQLnkN9LaXICHb 9Z/+CUDCMC3DC+6DBvNKsDpbg01QYJNlY/IFKKqJYsPzfxgu8x+FNoGrhHp/0UAttriF XhVmBIux2Wfr6Rp1Rq/0y5Fiv0LU6TElLdRxXf0zYClUwIDYJ5JyaYUnmmbI7SIfi0fZ AGdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mmBzH89H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p67-20020a634246000000b0045ce0eba520si4052149pga.751.2022.11.18.09.31.35; Fri, 18 Nov 2022 09:31:46 -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=@chromium.org header.s=google header.b=mmBzH89H; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242470AbiKRRLS (ORCPT + 91 others); Fri, 18 Nov 2022 12:11:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242427AbiKRRLJ (ORCPT ); Fri, 18 Nov 2022 12:11:09 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09DCD8C491 for ; Fri, 18 Nov 2022 09:11:09 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id v28so5434604pfi.12 for ; Fri, 18 Nov 2022 09:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=cDyeQiupLB9oqNpxPK4jyqPn5HRNeTYV3/chespM10E=; b=mmBzH89Hj2Bxse1fbp/MklJ4r7OTki1zNjRRRoNQFmICn2xKHkYyz+YKjcBjiei1rV 8aGlrsSZjZwe06eqH7BaCdtc1W69Hm0vttGjaN7A1SZITtFdzA5ZWyCsvO9CFMjt7TIV HXgVsNpwjx4s42njacRq4K+S9PszEvbNPTV08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cDyeQiupLB9oqNpxPK4jyqPn5HRNeTYV3/chespM10E=; b=AyoqL00G1eNXam7siWeXNhSp+RK4LW4r8wt5xwjIhl8Ga+/UeIvuWdWAyG35B49t0E G3dI9gWQ0GEG+rDgBKpN3yIKOZ3LExdCWOpdk6MIPXHeX4ds1/xS3JnigDlZhWqCreR2 hPRBVtUN3N1wEZ/AnfzWnpZi1z5fq5Qs6b76bxas+J3p1vpmY8urllfccmVYPl/UhIBc aKHr4XCSVObe8a527zt8z7NP1wckhDqMWQCN85SO8Izgpn1Jo6gPuCxGc87zl4LaM1DA 3UjWW6bTvctEasq/zfz0iPyLzJrknd9ZA2YVctbgMLSjZ4zDbEe4RugSJIEKXYqGEqbI vg/Q== X-Gm-Message-State: ANoB5pmV5jiJSeUhzHOhGO+yhyqKtM3hj50rWL34xFbWGmicNaokZBtN z1b22EbmNCoQt9AmdMo5uyUp3Q== X-Received: by 2002:a63:ec11:0:b0:470:5b0d:b50e with SMTP id j17-20020a63ec11000000b004705b0db50emr7217183pgh.488.1668791468487; Fri, 18 Nov 2022 09:11:08 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x6-20020a170902a38600b00186881688f2sm3884671pla.220.2022.11.18.09.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 09:11:08 -0800 (PST) Date: Fri, 18 Nov 2022 09:11:07 -0800 From: Kees Cook To: Vlastimil Babka 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 Subject: Re: [PATCH v2] mm: Make ksize() a reporting-only function Message-ID: <202211180907.A4C218F@keescook> References: <20221118035656.gonna.698-kees@kernel.org> <230127af-6c71-e51e-41a4-aa9547c2c847@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <230127af-6c71-e51e-41a4-aa9547c2c847@suse.cz> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 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. -- Kees Cook