public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
	libc-alpha@sourceware.org
Subject: Re: [PATCH 2/6] New internal function __access_noerrno
Date: Tue, 08 Nov 2016 19:00:00 -0000	[thread overview]
Message-ID: <4f13d235-084b-25f8-b763-053889b0dfdb@gotplt.org> (raw)
In-Reply-To: <317e63c8-1681-84b1-e278-c6ecae71e657@linaro.org>

On Tuesday 08 November 2016 10:39 PM, Adhemerval Zanella wrote:
> Is this comment correct? Checking the patch I am seeing it builds
> only for libc and there is no resulting __access_noerrno on ld.so.

It builds for both.  rtld-Rules has a rule that looks at all of the libc
functions that rtld uses and rebuilds all of them inside ld.so.

$ nm elf/ld.so | grep access_noerrno
00000000000199d0 t __access_noerrno

> I think it would be simpler to just 1. consolidation Linux access
> implementation and 2. add the '_noerrno' on same file.
> 
> The 1. would be simpler to just:
> 
>    1.1. Remove access from sysdeps/unix/syscalls.list
>    1.2. Move sysdeps/unix/sysv/linux/generic/access.c to
> 	sysdeps/unix/sysv/linux/access.c
>    1.3. And implement access checking for __NR_access and
> 	using __NR_facessat if is not defined.  Something
> 	like:
> 
> [...]
> /* Test for access to FILE.  */
> int
> __access (const char *file, int type)
> {
> #if __NR_access
>   return INLINE_SYSCALL_CALL (access, file, type);
> #else
>   return INLINE_SYSCALL_CALL (faccessat, AT_FDCWD, file, type);
> #endif
> }
> [...]
> 
> Then __access_noerro could be just implemented on same file.
> I think it has the advantage of not splitting the access
> on multiple files.
> 
> I think for hurd and nacl it would also result in simplify
> code.  What do you think?

The nacl code can be hacked in there somehow I guess, but the hurd code
seems quite different and I am a bit reluctant to hack at it without
access to a hurd instance to test on.

I can hack at sysdeps/unix/sysv/linux/access.c and drop
sysdeps/unix/access_noerrno.c.

Siddhesh

  reply	other threads:[~2016-11-08 19:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 14:43 [PATCH v5 0/6] glibc tunables Siddhesh Poyarekar
2016-10-24 14:43 ` [PATCH 4/6] Initialize tunable list with the GLIBC_TUNABLES environment variable Siddhesh Poyarekar
2016-10-24 15:01   ` Andreas Schwab
2016-10-26  9:48     ` Siddhesh Poyarekar
2016-10-24 14:43 ` [PATCH 6/6] User manual documentation for tunables Siddhesh Poyarekar
2016-10-24 17:22   ` Joseph Myers
2016-10-26  9:53     ` Siddhesh Poyarekar
2016-10-24 14:43 ` [PATCH 5/6] Enhance --enable-tunables to select tunables frontend at build time Siddhesh Poyarekar
2016-10-24 14:43 ` [PATCH 2/6] New internal function __access_noerrno Siddhesh Poyarekar
2016-11-08 17:10   ` Adhemerval Zanella
2016-11-08 19:00     ` Siddhesh Poyarekar [this message]
2016-11-10  5:47       ` Siddhesh Poyarekar
2016-11-10 12:15         ` Adhemerval Zanella
2016-11-10 13:05           ` Siddhesh Poyarekar
2016-11-10 16:07             ` Adhemerval Zanella
2016-10-24 14:43 ` [PATCH 3/6] Add framework for tunables Siddhesh Poyarekar
2016-10-24 14:43 ` [PATCH 1/6] Static inline functions for mallopt helpers Siddhesh Poyarekar
2016-10-26 17:51   ` DJ Delorie
2016-10-27  3:12     ` Siddhesh Poyarekar
2016-11-03 10:26 ` [PING][PATCH v5 0/6] glibc tunables Siddhesh Poyarekar
2016-11-08  5:37   ` [PING 2][PATCH " Siddhesh Poyarekar

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=4f13d235-084b-25f8-b763-053889b0dfdb@gotplt.org \
    --to=siddhesh@gotplt.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).