All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms-fPG8STNUNVg@public.gmane.org>
To: Al Viro <viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
Cc: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: RFC: syscall(2), annotation
Date: Thu, 27 Apr 2017 12:55:05 +0200	[thread overview]
Message-ID: <5901CE09.5010301@bfs.de> (raw)
In-Reply-To: <20170426155259.GY29622-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>



Am 26.04.2017 17:53, schrieb Al Viro:
> On Wed, Apr 26, 2017 at 12:35:08PM +0100, David Howells wrote:
> 
>> AT_EMPTY_PATH wasn't there back in 2010.  I could eliminate the:
>>
>> 	statx(fd, NULL, 0, ...);
>>
>> option in favour of:
>>
>> 	statx(fd, "", AT_EMPTY_PATH, ...);
>>
>> Any thoughts either way, Al?
>>
>> It would seem that AT_EMPTY_PATH should be redundant, though, since you can
>> just set the pathname pointer to NULL.
> 
> NULL pathname pointer means an error for a lot of existing syscalls, so
> if you want to turn them into wrappers for ...at() ones at libc level,
> you'd need to do special-casing of NULL both kernel-side and in libc wrappers.
> 
> Requiring "" + AT_EMPTY_PATH means a single dereference of userland pointer.  
> OTOH, that's not a terrible burden...


perhaps this is something the manpage should mention ?
lately we had some changes in syscall:
Re: [PATCH] syscall(2): note parisc handling of aligned register pairs

I have no clue about NULL pointers in syscalls() but when we write that
"General: pathname" (i assume: char *) "NULLpointer mean an error for
existing syscalls".

This sounds right,




--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2017-04-27 10:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 11:14 Revised statx(2) man page for review Michael Kerrisk (man-pages)
2017-04-25 11:14 ` Michael Kerrisk (man-pages)
2017-04-25 18:50 ` Silvan Jegen
2017-04-25 18:50   ` Silvan Jegen
2017-04-25 19:40   ` Michael Kerrisk (man-pages)
2017-04-25 19:40     ` Michael Kerrisk (man-pages)
2017-04-25 20:06 ` Dmitry V. Levin
2017-04-25 20:06   ` Dmitry V. Levin
2017-04-26  5:42   ` Michael Kerrisk (man-pages)
2017-04-26  5:42     ` Michael Kerrisk (man-pages)
2017-04-26 10:43     ` G. Branden Robinson
2017-04-26 10:43       ` G. Branden Robinson
2017-04-26 11:35 ` Revised statx(2) man page for review [and AT_EMPTY_PATH question] David Howells
2017-04-26 11:35   ` David Howells
2017-04-26 12:13   ` Michael Kerrisk (man-pages)
2017-04-26 12:13     ` Michael Kerrisk (man-pages)
2017-04-26 15:10   ` David Howells
2017-04-26 15:10     ` David Howells
2017-04-26 19:08     ` Michael Kerrisk (man-pages)
2017-04-26 19:08       ` Michael Kerrisk (man-pages)
2017-04-26 15:53   ` Al Viro
2017-04-26 15:53     ` Al Viro
     [not found]     ` <20170426155259.GY29622-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2017-04-27 10:55       ` walter harms [this message]

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=5901CE09.5010301@bfs.de \
    --to=wharms-fpg8stnunvg@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.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.