From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f198.google.com (mail-io0-f198.google.com [209.85.223.198]) by kanga.kvack.org (Postfix) with ESMTP id D7F3A6B0038 for ; Wed, 14 Dec 2016 14:44:47 -0500 (EST) Received: by mail-io0-f198.google.com with SMTP id f73so46479116ioe.1 for ; Wed, 14 Dec 2016 11:44:47 -0800 (PST) Received: from resqmta-ch2-03v.sys.comcast.net (resqmta-ch2-03v.sys.comcast.net. [69.252.207.35]) by mx.google.com with ESMTPS id w14si6246214ite.110.2016.12.14.11.44.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 11:44:47 -0800 (PST) Date: Wed, 14 Dec 2016 13:43:43 -0600 (CST) From: Christoph Lameter Subject: RE: Designing a safe RX-zero-copy Memory Model for Networking In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB023FA6E@AcuExch.aculab.com> Message-ID: References: <20161205153132.283fcb0e@redhat.com> <20161212083812.GA19987@rapoport-lnx> <20161212104042.0a011212@redhat.com> <20161212141433.GB19987@rapoport-lnx> <584EB8DF.8000308@gmail.com> <20161212181344.3ddfa9c3@redhat.com> <20161213171028.24dbf519@redhat.com> <8aea213f-2739-9bd3-3a6a-668b759336ae@stressinduktion.org> <063D6719AE5E284EB5DD2968C1650D6DB023FA6E@AcuExch.aculab.com> Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: David Laight Cc: Hannes Frederic Sowa , Jesper Dangaard Brouer , John Fastabend , Mike Rapoport , "netdev@vger.kernel.org" , linux-mm , Willem de Bruijn , =?ISO-8859-15?Q?Bj=F6rn_T=F6pel?= , "Karlsson, Magnus" , Alexander Duyck , Mel Gorman , Tom Herbert , Brenden Blanco , Tariq Toukan , Saeed Mahameed , Jesse Brandeburg , Kalman Meth , Vladislav Yasevich On Wed, 14 Dec 2016, David Laight wrote: > If the kernel is doing ANY validation on the frames it must copy the > data to memory the application cannot modify before doing the validation. > Otherwise the application could change the data afterwards. The application is not allowed to change the data after a work request has been submitted to send the frame. Changes are possible after the completion request has been received. The kernel can enforce that by making the frame(s) readonly and thus getting a page fault if the app would do such a thing. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org