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 DE983C433FE for ; Fri, 18 Nov 2022 17:11:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7EBA16B0072; Fri, 18 Nov 2022 12:11:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 79B366B0074; Fri, 18 Nov 2022 12:11:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 663116B0075; Fri, 18 Nov 2022 12:11:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 591426B0072 for ; Fri, 18 Nov 2022 12:11:10 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 20B6AA0466 for ; Fri, 18 Nov 2022 17:11:10 +0000 (UTC) X-FDA: 80147203500.28.9E28FE3 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by imf18.hostedemail.com (Postfix) with ESMTP id 87B531C0011 for ; Fri, 18 Nov 2022 17:11:09 +0000 (UTC) Received: by mail-pf1-f169.google.com with SMTP id 140so5454269pfz.6 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=cvIqhw2Dzgd4WAOE2HbnnwESyhIYYLRtgtnzTxowhD8P9Thc6T/PKYd6cAH69q2cfy 5lxeF3h3yCo2fH+z6OUK61/ZKL9k1HYERG71pryM/jW9RSL54RxmT81wm3i9bs94b/1l /R2XtwaRmOkMGYBjhQwYjfakW3VvIkwHL1MSw7gcaEM7U78Zt923TP+BHi2u1by83EZx yMwYSP8V63FPUJQqU0AwWij1g6GEeA6w8WbHyTIze0xnGZBiPsz/kWwmmWCLA2EjeWNK L7fz21Jy7neVlGNTu06hbncQPIBixjuTwFE4n440OkUzlsVuMGctELByyGccsvLdjaEV s6mw== X-Gm-Message-State: ANoB5pmlljrVyo7spHEyFtJl0UUsl9quXxCaLRmj7i0CmlMn8tkL9s7A 6TlKimgPn5urDQXPYteYrKXNWw== X-Google-Smtp-Source: AA0mqf4ZnmEE8OLUxPyWmX6DtdMNs26euLf7TggL/hADBnpVlbL4hqcSzhOLXCBe0EvSz9uq5N2EHw== 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> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668791469; a=rsa-sha256; cv=none; b=ZXRl7ehskQc28TtXx9R1bNgm+ObncNRL0XTXK+ZEFVIKSbUOgQRgrYBGVCNpoT5Rzz5cJ+ R/PbiVozoWpUULfuJokYKSFqSkTjGXd0We1KcUKf+vwAx+m0WwU0LVwN9ZICQkMwDp1kLW fBH9cCWqVi2S7u7YJSP8F6sZx5+LSK0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=mmBzH89H; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf18.hostedemail.com: domain of keescook@chromium.org designates 209.85.210.169 as permitted sender) smtp.mailfrom=keescook@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668791469; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=cDyeQiupLB9oqNpxPK4jyqPn5HRNeTYV3/chespM10E=; b=u+KOsbtH7XN8yYy54u1eVOGMxDsibxE45zNrngJi1kVxnWp1NiMHjpJCOzjEdJ1XGca0wm do0fOll6h4nfICEjEwPWAq3kdyL2X7OvzhXw2IkMfDl9I4+8uCOHRp8Y5r71Y63iWlH7vP ySWpgbMtm7l9QegnY4RHXv9XdnblhXs= Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=mmBzH89H; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf18.hostedemail.com: domain of keescook@chromium.org designates 209.85.210.169 as permitted sender) smtp.mailfrom=keescook@chromium.org X-Rspam-User: X-Stat-Signature: 781b7r6woqg8uq6d6d71irjzwzy3r6n1 X-Rspamd-Queue-Id: 87B531C0011 X-Rspamd-Server: rspam11 X-HE-Tag: 1668791469-211404 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 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