Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp140086lqq; Wed, 12 Jun 2024 20:34:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0ztCQt0nx9FkS0iA2zmvg8QHhOEhQeoF6M3n2VDl7p89JuyS/tvRaYT+vAI/HAytxOcKMUmk1sgfIHystYs/62Ue4sBzrDKGJ8OCqyw== X-Google-Smtp-Source: AGHT+IFfScRVlv667Unxxm5QirwGBIRRY9jWkYiTAZSdtGC2zuk16TnKSd+1DImvKroHwbVTkgR9 X-Received: by 2002:a17:902:d2ca:b0:1f7:207f:7081 with SMTP id d9443c01a7336-1f84e1d39e7mr21878355ad.14.1718249684806; Wed, 12 Jun 2024 20:34:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718249684; cv=pass; d=google.com; s=arc-20160816; b=HV4AwhmKiHUfNoPfllvD2RjAQiiY324tDjRJVr25h8zX+pvkuZePNzOhpHKsk/Ko7h 0fD2bFQm8UCE0vYZQLmNwT+RuYp2jYbJHd4URTUmRgjfFmohIxhw7R7ZHLdWUW3TnBAg g+HxTkSpUVhev5i2IpOqguPjjUiSfvdhmLZ5PU+Irvv5TmsBkCeCnJxRwi306KDqZnSB f4okuhMMAtTtPs8JI2olynYhRBAXLEn7KgU/+3t4nxvXdVh6aUIrTiCWHeE1F+h7TPWB 9vz6wxrQDrK5SQWqEq0yN1p4xNydJT4HAKXshMoQMneLYIJ9t6gRB+dtdhhenVKz0xjU 07ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HKpH5doaKWME/TBd2svFq06cpdiKZqi2cPuosC0QpCY=; fh=f5M1EKxLd8lZuOIeI4zoN1E6D/gMpUFmiKdSpTMryjE=; b=oBwPKvLPWRTGnJEFFKrcUevmrLnx4VcvHChd1mwXYA06XptQm4kUCsc/Wlx5QALoXK CVQXMNDAaBtseazc/4DNpj6fWIKf2SJq3v3whUxY2PIyaSfx+tRMMJ/wc4dUMZm3a0OF qAtQqXPehznE8JUGr0o78HAGayNot2ga5N5o3p9AnArFWgpHy1P5OF7fDCGIvLiuCQUX DHSAFGusL67u7TFhJzpQ5SFrmWMGcUYA2dReOSWtk6VyZ9OjgbcaXgFhbtM3quIkSgxq tIaEZ8R4y3C3YFxZFNeH0FKkM13x+W5QI1EhkRXESeCw2kisRYfe4L2z9zAOfvikddlE 3LrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OS/UsQ6C"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f855f16b7dsi4036545ad.561.2024.06.12.20.34.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 20:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OS/UsQ6C"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-212523-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3C3402842F8 for ; Thu, 13 Jun 2024 03:34:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 268C0130A76; Thu, 13 Jun 2024 03:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OS/UsQ6C" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46A1C2F34; Thu, 13 Jun 2024 03:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718249676; cv=none; b=iJnacogH5mtKc6N53rftRpdQjLFUU9rr29GcNTnuOipkqXKkaf050Kgjl2XgT7GrbR5g+fa6U1I1Vic/muII/l39sSMZzE2zhKz5pkGPXo5rsVuLVwTj1sGJQWLruiN/0a+eNFaFFDftrPkNfMKPSv+BoJ2ZpZfQaUvFXq+MgzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718249676; c=relaxed/simple; bh=4Ve5J8xmQC5rrlMwUon1nb6lBnwrnLCTLGyBEta2HrU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HWFreRzTAVHvWnLNJF3wCWydjP9X6Q379uS1dfuCOrkmF4Q94UF8VphFdlUP6kQx8EWQbzG23znWpdGw7OcKmorqfwb9piY9VkXRPuhRNZZQOnLiwCYLffu05mwcJMBxJ0ZF//9p6bmDR0MtNWU1wubV2Q1lOhF6PWLtYVWpH8Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OS/UsQ6C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A87C2C2BBFC; Thu, 13 Jun 2024 03:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718249675; bh=4Ve5J8xmQC5rrlMwUon1nb6lBnwrnLCTLGyBEta2HrU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OS/UsQ6CToml9KriUhf1wtmHOJUAlk7nphjjLHfTqvovoprnYjd67way2oo8VpsqM mi84M2yATcZoEK1BGYnU+WO1U1j7KVTuuIRZZRhaoMAfsnH5srrjyz8BXIHtcNgTP+ OwJSb89JdaS0OznfrMUQShXYSwePTwngGlyz084onrco6P6T8BmaSSYiK3D3e4q8rI MZITkkA/qT9g2KTFql6jVwOYUyKIabtvW8tAggHatS8kwqjHemOL05yV6txKHbPQxg xMH1Z+wXmD7ba/VUJg/ejzum6pBQFl6J2mMysiCtENFT6Yxx6mLvH0WC/HHGzP7UN5 tXEUMNZvyn0ZA== Date: Wed, 12 Jun 2024 20:34:35 -0700 From: Kees Cook To: Aryan Srivastava Cc: "linux@armlinux.org.uk" , "davem@davemloft.net" , "mw@semihalf.com" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "kuba@kernel.org" , "edumazet@google.com" , "pabeni@redhat.com" Subject: Re: [PATCH v1] net: mvpp2: use slab_build_skb for oversized frames Message-ID: <202406122033.69D9ABFC24@keescook> References: <20240611193318.5ed8003a@kernel.org> <20240613024900.3842238-1-aryan.srivastava@alliedtelesis.co.nz> <202406122003.E02C37ADD1@keescook> <6c2592c517878a69d37e1957d9624d83dbc982ab.camel@alliedtelesis.co.nz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c2592c517878a69d37e1957d9624d83dbc982ab.camel@alliedtelesis.co.nz> On Thu, Jun 13, 2024 at 03:13:34AM +0000, Aryan Srivastava wrote: > On Wed, 2024-06-12 at 20:05 -0700, Kees Cook wrote: > > On Thu, Jun 13, 2024 at 02:49:00PM +1200, Aryan Srivastava wrote: > > > Setting frag_size to 0 to indicate kmalloc has been deprecated, > > > use slab_build_skb directly. > > > > > > Fixes: ce098da1497c ("skbuff: Introduce slab_build_skb()") > > > Signed-off-by: Aryan Srivastava > > > > > > --- > > > Changes in v1: > > > - Added Fixes tag > > > > This looks like similar updates like commit 99b415fe8986 ("tg3: Use > > slab_build_skb() when needed") > Yeah, I noticed that when I was looking for examples of other "Fixes" > tags for the "skbuff: Introduce slab_build_skb()" commit. I suspect > there are many drivers that will need this "fix". Yeah, at the time the API changes was made it was clear it wasn't easy to identify which needed it, so the WARN was added along with supporting the old style via internal fall-back. -Kees > > > > Reviewed-by: Kees Cook > > > -- Kees Cook