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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B804C6FA83 for ; Fri, 23 Sep 2022 18:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232066AbiIWSuo (ORCPT ); Fri, 23 Sep 2022 14:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232100AbiIWSum (ORCPT ); Fri, 23 Sep 2022 14:50:42 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84302120BFC for ; Fri, 23 Sep 2022 11:50:39 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id u132so963465pfc.6 for ; Fri, 23 Sep 2022 11:50:39 -0700 (PDT) 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; bh=soz+B5vr0YawBrGLCJUIfst1rVPegj/kO945i6tNuu4=; b=OTfy5Nwpn08IcUaVlU1KJ27X+N3yWZ/VpCrAZjSpjUbsjTe/slddbrLCSNWyrUEUf+ hKFo3f2nFf90BAG6jEHb+7lo8EJfEwNPirhgwBNLji96jC6KqEyl6t0+uMZVhfPqRt/6 nRku1i36Slqm6llnH2++9t4exlSoETdRFUkh0= 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; bh=soz+B5vr0YawBrGLCJUIfst1rVPegj/kO945i6tNuu4=; b=qt1FuZMPY8vc1ZHw247JnwpwXZeL16+sKCJk5QHuxJezwspcdFEkVuKY1QDxTTJtmj 6FssMIjw7B4cWMXwsuJEKwlsUd2R9JQ7mcWsQQ1N0R26lj3eURrnf0BmC/rkCW3xuJSn yn9HI0lsG1zKsjPeXIHwDlEqU5BFvwJWsugU9AfSQctGESXBkewsXX4vfkXpx4wgwv51 798kN3tMPk3DxQ2IhUt7PfHdc3I7IRlCpn7qQv62Hreheq7cpBc/Qyn/rRozcklRjR0a Z6nj/skiC6QhULR79lUtJnmoF89sJMevWJFZhLnVH8piwkfa8lxctcnBTW5UHrL5NrJ1 9teg== X-Gm-Message-State: ACrzQf1kGDauCh3cpwDAAcsX3hoXmtW7TGcPWd0JPrlmKoFpfzpmu/20 UVCyU080u9oasOn31jvgrmbVzA== X-Google-Smtp-Source: AMsMyM5BOkxT7dmLhP+9f8RXqZTh1AjF61zhu3wqGKFHMmPuMGgEdboAX7cqSq5H5AVVbN7wJUrI2g== X-Received: by 2002:a63:6a47:0:b0:439:be00:7607 with SMTP id f68-20020a636a47000000b00439be007607mr8719395pgc.301.1663959039042; Fri, 23 Sep 2022 11:50:39 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f13-20020a170902ce8d00b0016dc6279ab7sm6423837plg.149.2022.09.23.11.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 11:50:38 -0700 (PDT) Date: Fri, 23 Sep 2022 11:50:37 -0700 From: Kees Cook To: Feng Tang , Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "linux-mm@kvack.org" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , Nick Desaulniers , Alex Elder , Josef Bacik , David Sterba , Sumit Semwal , Christian K??nig , "Brandeburg, Jesse" , Daniel Micay , Yonghong Song , Marco Elver , Miguel Ojeda , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linaro-mm-sig@lists.linaro.org" , "linux-fsdevel@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "dev@openvswitch.org" , "x86@kernel.org" , "linux-wireless@vger.kernel.org" , "llvm@lists.linux.dev" , "linux-hardening@vger.kernel.org" Subject: Re: [PATCH 01/12] slab: Introduce kmalloc_size_roundup() Message-ID: <202209231145.7654767ED5@keescook> References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-2-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Sep 23, 2022 at 09:17:25AM +0800, Feng Tang wrote: > On Thu, Sep 22, 2022 at 07:12:21PM +0800, Hyeonggon Yoo wrote: > > On Wed, Sep 21, 2022 at 08:10:02PM -0700, Kees Cook wrote: > > > [...] > > > Introduce kmalloc_size_roundup(), to serve this function so we can start > > > replacing the "anticipatory resizing" uses of ksize(). > > [...] > > > > This looks okay. > > [...] > > Cc-ing Feng Tang who may welcome this series ;) > > Indeed! This will help our work of extending slub redzone check, > as we also ran into some trouble with ksize() users when extending > the redzone support to this extra allocated space than requested > size [1], and have to disable the redzone sanity for all ksize() > users [2]. > > [1]. https://lore.kernel.org/lkml/20220719134503.GA56558@shbuild999.sh.intel.com/ > [2]. https://lore.kernel.org/lkml/20220913065423.520159-5-feng.tang@intel.com/ Thanks for the feedback! I'll send my v2 series -- I'm hoping at least this patch can land in v6.1 so the various other patches would be clear to land via their separate trees, etc. -- Kees Cook