Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1273683
| Path | csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod |
|---|---|
| From | Linus Torvalds <torvalds@linux-foundation.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC] readlink()-related oddities |
| Date | Fri, 20 Nov 2015 03:20:01 +0100 |
| Message-ID | <qwJsR-Wv-7@gated-at.bofh.it> (permalink) |
| References | <qwGOm-7Dg-15@gated-at.bofh.it> |
| X-Original-To | Al Viro <viro@zeniv.linux.org.uk> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gBnoLhIkhN+K4iV9/ZaVbZLOvOvShcdvK+CIfcpkvuw=; b=xIr+TFIpTkHZJwZ3WzgXL4oG0ed0NI2Ir3EdfBGH/mkP81b512CcizUUnIk40f8fj1 oQqY5tzVO101Z1ahoa/DYEgzJy9zXSvSC1/KGbg/U5z8cMX1LtZnyj0sdgwvm2nK62K+ BMIuETSNgH9Z+clhDp7idKMmgia3L4R6sjzQ4SCMQZmvyoeKvIbdJu9+0D26RmxZ5VF1 zLRYNMUfs82BeWLJc1J7UmQI7qZRs3LXvGldYegbRq9wbFBf9HtFBvQLlSpF7VNMd4uT 2rcrSzvis6DizOuPkV8lre3JJdYEbt87Tc4E4ZEYV1cq7ahIeiv9DRfMHK5lyOPoFgLo aw9g== |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gBnoLhIkhN+K4iV9/ZaVbZLOvOvShcdvK+CIfcpkvuw=; b=RAba6sVTml+Mg9+JYtBiSK2r/GzlUQyzeT5WcYr24GJAMwYPH0tk90wBsHezBBEYsf nahqFdkkCAf2ohIM4FdIQg+wmmB0oYz8dNUXI/sKP4E8n0bxztni0NX5QcVgDn0WYa98 6bFckqA1hzDGTmxpq0awqQFDQPuwglYj3iboY= |
| MIME-Version | 1.0 |
| X-Received | by 10.50.50.202 with SMTP id e10mr939665igo.25.1447985633808; Thu, 19 Nov 2015 18:13:53 -0800 (PST) |
| X-Google-Sender-Auth | b2_ZCcGE0Lgn5Y5vr1rX9iQMMBQ |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 32 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-fsdevel <linux-fsdevel@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, LSM List <linux-security-module@vger.kernel.org>, Miklos Szeredi <miklos@szeredi.hu>, David Howells <dhowells@redhat.com> |
| X-Original-Date | Thu, 19 Nov 2015 18:13:53 -0800 |
| X-Original-Message-ID | <CA+55aFx_=L4adTfn=bZ8oK2b-j-+satDhTsaZUGvcVmJ81A_RQ@mail.gmail.com> |
| X-Original-References | <20151119232635.GI22011@ZenIV.linux.org.uk> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1273683 |
Show key headers only | View raw
On Thu, Nov 19, 2015 at 3:26 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> 1) atime updates, according to POSIX, should happen in case of success.
> For example, giving readlink(2) an unmapped buffer should _not_ touch
> atime. Neither should calling readlink(2) in case if ->readlink() method
> returns e.g. -EIO or -ENOMEM. We do atime update in those cases. Looks
> like a bug and unless there's a good reason to keep that behaviour, I'd
> rather have it do what POSIX says.
I really don't think anybody cares, but I also don't think anybody
cares about the current behavior, so we can certainly fix it to match
POSIX wording, and just move it a bit lower after checking the return
value from ->realink().
> 3) normally, readlink(2) fails for non-symlinks. Moreover, according to
> POSIX it should do so (with -EINVAL).
I don't think POSIX is necessarily relevant here.
We have had magic file behavior outside the scope of POSIX before, and
we will have it in the future. It makes perfect sense to use
readlink() for management tools for automounting, even if the normal
oepration is to treat the thing as a directory.
Not everything is within the domain of POSIX.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 00:30 +0100
Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 03:20 +0100
Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 04:00 +0100
Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 04:10 +0100
Re: [RFC] readlink()-related oddities Linus Torvalds <torvalds@linux-foundation.org> - 2015-11-20 04:20 +0100
Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 04:30 +0100
Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 11:10 +0100
Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 11:00 +0100
Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 17:10 +0100
Re: [RFC] readlink()-related oddities David Howells <dhowells@redhat.com> - 2015-11-20 17:30 +0100
Re: [RFC] readlink()-related oddities Al Viro <viro@ZenIV.linux.org.uk> - 2015-11-20 23:40 +0100
csiph-web