Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp674122pxu; Wed, 14 Oct 2020 10:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq+O5LLwQR4j2VMF65oPnClZJHXSwPZ+dRym1/10K1JkBOXymx+j4smMXQTn6BIKDWDkJQ X-Received: by 2002:aa7:d349:: with SMTP id m9mr15355edr.51.1602697355122; Wed, 14 Oct 2020 10:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602697355; cv=none; d=google.com; s=arc-20160816; b=C6x39YeOmKWHtiX6c45UzFstWLrAR0h8TpVHTgEtHbH5ZDIlnwezI6eQAGTCeYPbx9 oG/V0WyrPvfGbHlU/CJLIESlrhkft1sRbQOXpXseReWDoGVndtssUrNPygxx0xXCY7pM HGkF740m4R5VObOpHhQPpSoq7PmjHxPSk7jqg50bIW4XULPGKvIm/xwgu8TaFtVzTEgg rOtGDSyjOQMdIYnQ3c6dgDLauCGJx0MW8oSaNJ2hOyaAwWsEy3bLDqO2WgRJrfYA1f9e KaM0z1Og3Fqjozqq/CR194Fch0csnkz+z1ykyiJYu6G3GtJzLZwrS/QRZq2s5iOjVJOt EJMg== 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=nP06Nzu/uZ+bkygYBHbzehNzKFlWut93IYryMaUqpI8=; b=VMevPiNtC/CXj8XNeBppSzN1bf8yCVNfS/KWO2NWEG5MxNeSjzKlgkNXn2wLVDK9cp +46gqRc1Lc29MTMShP7kBWAB3YHi41reMx7/GdIFItEtVHMYUOcwBQnx7SS2uNqB1iWZ FG/iGWj97Pqdmkm2VJd/H12k05vQJEd8Mmp8xGgTvkwQzQkshDdOXK7XP5nq7JimJ9Lo fU2Ulde6T5kOccJlvYsjXMpgol9C8fVVz0zymRYHcilkZCnmBft88zFs+6/SpFQ4B/2I mn6ChMvQXKZ72XTiT4nWJIDAB5kY2AH34w35hvBmWjOgBjWHgxuX5flz/lc8CSGxfrJ0 Cjow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nhUthSWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j89si108097edc.446.2020.10.14.10.42.12; Wed, 14 Oct 2020 10:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nhUthSWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388627AbgJNQrz (ORCPT + 99 others); Wed, 14 Oct 2020 12:47:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388427AbgJNQry (ORCPT ); Wed, 14 Oct 2020 12:47:54 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4774C061755; Wed, 14 Oct 2020 09:47:53 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id o18so163958edq.4; Wed, 14 Oct 2020 09:47:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nP06Nzu/uZ+bkygYBHbzehNzKFlWut93IYryMaUqpI8=; b=nhUthSWjexc4NX+kll7La73seVsGKK0GbuSgyPFWu0hTmZoZpoN+Jx3qxx22Iydty6 E0c59Y3k/os/WLVs+b5yY45w/dUlNDkay+BbKCC7yE4a6rzoWml7O5Scl89tkMbhkI/W rRz5YMVsYzGqohypmD0b5Bp3LTLGL3ZW3LtzNIh96c71GdlA71sGK+AhfR1ctNFKu511 5thEPLHsABnCPOyWnBu9WiW5mAxo0Dubxjx/QaguECpvNH5KdF6XY60qFwedB0dIFN3d D5ValA+W0NAeFO9XI4VNt3iRM/n+uuWQZSqXw8l2mAcnrO6/Ahjtd1jHND9PbJuF0kqB w09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nP06Nzu/uZ+bkygYBHbzehNzKFlWut93IYryMaUqpI8=; b=Mwfm4lcRJlmxnrMLxN7b7yDd3LFj1ehz5U0vRlunuHQMRS7oPUsqngh/pYfKtog0Rx +5tEZNAYoS0rMwL8/RtjDxe7cfHVd8Cna7QpkSc9nW3ZYAjwy7syM+P2O/6TwuUt50jh PxATkAEq3/AyPBdnP3MGIvsR42z4y5KJN7GI3BoObP5oJSLnQmWPdRwVeP0+pmAtxL7Z QHqMbKnK6aFYwWucq8gz+3D3xk4cWy746Gd6zTcYsrRd+NQCfWRHpLYFufiCVj6Ari9j eF7cjezB6oa+E4TTW0EecHwQA8vF/xoSeNcR7cNnvg1lCSKER3kp9gFWUiiBeiEzw9km GBkw== X-Gm-Message-State: AOAM531Bx1E0S0g76J4816YBmviSciFgEVvDAay1yyWBVyO2Ds4IPLkg MRrVYyyRMWuaMYVO/zk6f7Y= X-Received: by 2002:aa7:d948:: with SMTP id l8mr6279207eds.159.1602694072484; Wed, 14 Oct 2020 09:47:52 -0700 (PDT) Received: from skbuf ([188.26.174.215]) by smtp.gmail.com with ESMTPSA id i14sm43579edu.40.2020.10.14.09.47.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 09:47:51 -0700 (PDT) Date: Wed, 14 Oct 2020 19:47:50 +0300 From: Vladimir Oltean To: Christian Eggers Cc: Woojung Huh , Andrew Lunn , Vivien Didelot , Florian Fainelli , Microchip Linux Driver Support , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kurt Kanzenbach Subject: Re: [PATCH net] net: dsa: ksz: fix padding size of skb Message-ID: <20201014164750.qelb6vssiubadslj@skbuf> References: <20201014161719.30289-1-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201014161719.30289-1-ceggers@arri.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 14, 2020 at 06:17:19PM +0200, Christian Eggers wrote: > __skb_put_padto() is called in order to ensure a minimal size of the > sk_buff. The required minimal size is ETH_ZLEN + the size required for > the tail tag. > > The current argument misses the size for the tail tag. The expression > "skb->len + padlen" can be simplified to ETH_ZLEN. > > Too small sk_buffs typically result from cloning in > dsa_skb_tx_timestamp(). The cloned sk_buff may not meet the minimum size > requirements. > > Fixes: e71cb9e00922 ("net: dsa: ksz: fix skb freeing") > Signed-off-by: Christian Eggers > --- Reviewed-by: Vladimir Oltean