From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753166AbdHQPU5 (ORCPT ); Thu, 17 Aug 2017 11:20:57 -0400 Received: from mga05.intel.com ([192.55.52.43]:22017 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123AbdHQPUz (ORCPT ); Thu, 17 Aug 2017 11:20:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,388,1498546800"; d="scan'208";a="301436003" Date: Thu, 17 Aug 2017 09:20:54 -0600 From: Ross Zwisler To: Jan Kara Cc: Ross Zwisler , Andrew Morton , linux-kernel@vger.kernel.org, Alexander Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, Kees Cook , Will Deacon , Catalin Marinas , Robin Murphy , Mark Rutland Subject: Re: [PATCH] dax: explain how read(2)/write(2) addresses are validated Message-ID: <20170817152054.GA27641@linux.intel.com> Mail-Followup-To: Ross Zwisler , Jan Kara , Andrew Morton , linux-kernel@vger.kernel.org, Alexander Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, Kees Cook , Will Deacon , Catalin Marinas , Robin Murphy , Mark Rutland References: <20170816173615.10098-1-ross.zwisler@linux.intel.com> <20170817085332.GA7644@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170817085332.GA7644@quack2.suse.cz> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 17, 2017 at 10:53:32AM +0200, Jan Kara wrote: > On Wed 16-08-17 11:36:15, Ross Zwisler wrote: > > Add a comment explaining how the user addresses provided to read(2) and > > write(2) are validated in the DAX I/O path. We call dax_copy_from_iter() > > or copy_to_iter() on these without calling access_ok() first in the DAX > > code, and there was a concern that the user might be able to read/write to > > arbitrary kernel addresses with this path. > > > > Signed-off-by: Ross Zwisler > > Looks OK to me so feel free to add: > > Reviewed-by: Jan Kara > > Just I'd note that standard buffered read / write path is no different so I > don't see a big point in adding this comment when it is not in any other > path either... Fair enough. Yea, if it's not in any of the other paths either and it's just common knowledge that these addresses are validated at the VFS layer, we can leave it out.