From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:34294 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932675AbdCKVoO (ORCPT ); Sat, 11 Mar 2017 16:44:14 -0500 Date: Sat, 11 Mar 2017 13:44:10 -0800 From: Eric Biggers To: linux-fsdevel@vger.kernel.org Cc: Al Viro , David Howells , linux-kernel@vger.kernel.org, Eric Biggers Subject: Re: [PATCH] statx: optimize copy of struct statx to userspace Message-ID: <20170311214410.GA672@zzz> References: <20170311101510.6504-1-ebiggers3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170311101510.6504-1-ebiggers3@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Mar 11, 2017 at 02:15:10AM -0800, Eric Biggers wrote: > stat() instead initializes its struct on the stack and copies it to > userspace with a single call to copy_to_user(). This turns out to be > much faster, and changing statx to do this makes it almost as fast as > stat: Hmm, I missed that the access_ok() check in sys_statx() will no longer be needed. I'm sending a revised patch that removes that too. Eric