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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB65EC43603 for ; Tue, 10 Dec 2019 20:55:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC58F2073D for ; Tue, 10 Dec 2019 20:55:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576011346; bh=6yTF7yMvXdzCNyAqnzkpIHtyptB+pSFVQwdyGXh/R8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=2f8dh5aJHi2Qbe2qreGgzCOcXBCpcGCIV8qHKfJRSQGW94ExeEqIcwTD2nfmw1nK9 oCPb6tXri1UEsEEtGdzTaPYqOYErUsCrWkDAcAvlqNNIw4GpD8n1BmiZ80whQ8/u5Y HNJ3Fj6O4aPAXVyLq3m+KbIKyBdpDifheOlWmHYI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbfLJUzp (ORCPT ); Tue, 10 Dec 2019 15:55:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:37728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbfLJUzp (ORCPT ); Tue, 10 Dec 2019 15:55:45 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0C48206EC; Tue, 10 Dec 2019 20:55:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576011345; bh=6yTF7yMvXdzCNyAqnzkpIHtyptB+pSFVQwdyGXh/R8I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pVSFRjnzq4i492eDgRTa9mtugubxPY3zS0NeF812/t21hUK6+IJoLpn/vx8N6cMVg /h837S4UfTcYciP+JV+MI4unWqhvKOoXFUXrWucPgYDercTubCOfjkAxLbWJAp9Zcu k4GCSZNRxeV1T1Edmvba21GCnbXyY30KP4LuHPoQ= Date: Tue, 10 Dec 2019 21:55:42 +0100 From: Greg KH To: Aviraj CJ Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org, xe-linux-external@cisco.com Subject: Re: [PATCH 1/2] net: stmmac: use correct DMA buffer size in the RX descriptor Message-ID: <20191210205542.GB4080658@kroah.com> References: <20191210170659.61829-1-acj@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191210170659.61829-1-acj@cisco.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Dec 10, 2019 at 09:06:58AM -0800, Aviraj CJ wrote: > We always program the maximum DMA buffer size into the receive descriptor, > although the allocated size may be less. E.g. with the default MTU size > we allocate only 1536 bytes. If somebody sends us a bigger frame, then > memory may get corrupted. > > Program DMA using exact buffer sizes. > > [Adopted based on upstream commit c13a936f46e3321ad2426443296571fab2feda44 > ("net: stmmac: use correct DMA buffer size in the RX descriptor") > by Aaro Koskinen ] Adopted to what? What is this patch for, it looks just like the commit you reference here. totally confused, greg k-h