All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rich Felker <dalias-8zAoT0mYgF4@public.gmane.org>
To: Zack Weinberg <zackw-VmQCmMdMyN0AvxtiuMwx3w@public.gmane.org>,
	"H.J. Lu" <hjl.tools-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	libc-alpha <libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org>,
	linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: The time(2) man page conflicts with glibc
Date: Wed, 16 Dec 2015 16:59:56 -0500	[thread overview]
Message-ID: <20151216215955.GJ238@brightrain.aerifal.cx> (raw)
In-Reply-To: <20151216203432.GR11489-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>

On Wed, Dec 16, 2015 at 03:34:32PM -0500, Mike Frysinger wrote:
> On 16 Dec 2015 02:08, Rich Felker wrote:
> > On Tue, Dec 15, 2015 at 01:38:26PM -0500, Mike Frysinger wrote:
> > > On 15 Dec 2015 10:19, Zack Weinberg wrote:
> > > > On Tue, Dec 15, 2015 at 9:55 AM, Mike Frysinger wrote:
> > > > > On 15 Dec 2015 09:14, Zack Weinberg wrote:
> > > > >> Given the extreme obsolescence of the argument to `time`, I would
> > > > >> recommend that the *kernel* be changed to fire an actual SIGSEGV
> > > > >> instead of returning -EFAULT from the syscall version of `time`, and
> > > > >> then that can be the documented behavior, with the historic behavior
> > > > >> relegated to the BUGS section of the manpage.
> > > > >
> > > > > meh.  it would be out of character for the kernel to do this.
> > > > 
> > > > Why?
> > > 
> > > because it returns EFAULT for other syscalls when you pass bad pointers.
> > > projects like LTP utilize that to verify edge case functionality.
> > 
> > Programs could also be calling the syscall directly (using syscall()
> > or asm) and using it as a (very cheap, fail-safe) way to verify that
> > an address is writable before attempting to write to it. Breaking this
> > would be a kernel API regression. However the library function time()
> > has UB for invalid pointers and no obligation to support them.
> 
> sure, but that still doesn't mean the kernel should be sending SEGV.
> which is what this subthread was about.

The kernel is not causing SIGSEGV as far as I can tell; it's purely
the library function time that's causing this.

Rich
--
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:[~2015-12-16 21:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 13:58 The time(2) man page conflicts with glibc H.J. Lu
2015-12-15 14:14 ` Zack Weinberg
     [not found]   ` <CAKCAbMj-X+wLKX3=MDm9z3L9zyikemxCNggu2bfw6=o6K5PGgg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-15 14:31     ` Andreas Schwab
2015-12-15 14:55     ` Mike Frysinger
     [not found]       ` <20151215145517.GR11489-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
2015-12-15 15:19         ` Zack Weinberg
     [not found]           ` <CAKCAbMh2ysZPQe3oOSjcPsx1_pcnCAQ6yf+gMbv6iDmvfnGXZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-15 18:38             ` Mike Frysinger
2015-12-16  7:08               ` Rich Felker
     [not found]                 ` <20151216070839.GE238-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org>
2015-12-16 20:34                   ` Mike Frysinger
     [not found]                     ` <20151216203432.GR11489-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
2015-12-16 21:59                       ` Rich Felker [this message]
     [not found]                         ` <20151216215955.GJ238-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org>
2015-12-16 22:27                           ` Zack Weinberg
2015-12-16 22:44                             ` Rich Felker
     [not found]                               ` <20151216224432.GK238-C3MtFaGISjmo6RMmaWD+6Sb1p8zYI1N1@public.gmane.org>
2015-12-16 22:51                                 ` Zack Weinberg
2015-12-17  3:15                           ` Mike Frysinger
     [not found] ` <CAMe9rOoJLk8VzyJKmkOvbmBxhCj4mVA2huYtHJsdxpatbkgJ1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-15 14:16   ` Andreas Schwab
     [not found]     ` <mvmegen94qs.fsf-8jEJWzg51KSXcDkGTvBoYw@public.gmane.org>
2015-12-15 14:17       ` H.J. Lu
2015-12-16 13:38         ` Michael Kerrisk (man-pages)
     [not found]           ` <5671696B.3070203-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-16 13:53             ` H.J. Lu
     [not found]               ` <CAMe9rOqsxCEia7OWqzJ-HzZWCra5BTyYqt4japjZTw0pY=fugw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-16 14:07                 ` Michael Kerrisk (man-pages)
     [not found]                   ` <56717032.7000007-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-16 14:50                     ` Zack Weinberg
     [not found]                       ` <CAKCAbMjrKfsT7P=Q=+1zWC68552aK=ciod0HYk3=HWMvkYW26w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-16 15:04                         ` Michael Kerrisk (man-pages)
2015-12-16 23:05                       ` Paul Eggert
     [not found]                         ` <5671EE36.1000402-764C0pRuGfqVc3sceRu5cw@public.gmane.org>
2015-12-17  5:53                           ` Michael Kerrisk (man-pages)

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=20151216215955.GJ238@brightrain.aerifal.cx \
    --to=dalias-8zaot0mygf4@public.gmane.org \
    --cc=hjl.tools-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=zackw-VmQCmMdMyN0AvxtiuMwx3w@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.