All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] vfs: constify arguments to utime family of system calls
Date: Fri, 1 Apr 2016 03:05:24 +0100	[thread overview]
Message-ID: <20160401020524.GA17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1459475472-13104-1-git-send-email-ebiggers3@gmail.com>

On Thu, Mar 31, 2016 at 08:51:12PM -0500, Eric Biggers wrote:
> The system calls to set file times: utime(), utimes(), futimesat(), and
> utimensat(), all take in pointers to a filename and time information,
> neither of which is modified.  Mark the pointed-to data as 'const' to
> better reflect the semantics.

I'm not sure if there's any point, to be honest.  Anything doing direct
dereferencing of those pointers is completely broken and reads are no
better than writes in that respect.  OTOH... put_user() and friends will
produce an error when you give them const void __user * on most of the
architectures, so it's not entirely useles...

What's the situation with other syscalls?  It doesn't make much sense
to do it piece-by-piece...

  reply	other threads:[~2016-04-01  2:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  1:51 [PATCH v2] vfs: constify arguments to utime family of system calls Eric Biggers
2016-04-01  2:05 ` Al Viro [this message]
2016-04-01  2:24   ` Eric Biggers
2016-04-01  3:30     ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160401020524.GA17997@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ebiggers3@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.