public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Yury Norov <ynorov@caviumnetworks.com>
Cc: <libc-alpha@sourceware.org>, <zackw@panix.com>,
	<schwab@linux-m68k.org>, <arnd@arndb.de>
Subject: Re: [PATCH v2] Linux: consolidate rename()
Date: Thu, 20 Oct 2016 13:16:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1610201302400.2960@digraph.polyomino.org.uk> (raw)
In-Reply-To: <1476924756-31448-1-git-send-email-ynorov@caviumnetworks.com>

On Thu, 20 Oct 2016, Yury Norov wrote:

> Tested on arm64/lp64 which supports renameat and renameat2,
> and aarch64/ilp32 which supports renameat2 only.

There's clearly something very wrong with your test environment that you 
need to resolve before submitting any more glibc patches at all.  If you'd 
tested this patch you should have seen linknamespace tests failing because 
rename is in standards that do not include renameat, and the localplt test 
failing because you're calling an exported function that isn't using the 
libc_hidden_proto/libc_hidden_def machinery (even non-exported functions 
have to use that machinery when called within the same library, but 
failure to do so is less visible from test results).

Just leave rename.c in sysdeps/unix/sysv/linux/generic and add a case for 
it to use the renameat2 syscall and you avoid all these issues; on 
platforms with the rename syscall, there is no benefit from going via 
other syscalls, and calling renameat from rename rather than using 
syscalls introduces unnecessary complications.  (But you must still test 
by running the full glibc testsuite and actually investigating any 
failures seen.)

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2016-10-20 13:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20  0:53 Yury Norov
2016-10-20  7:11 ` Andreas Schwab
2016-10-20 11:23   ` Yury Norov
2016-10-20 12:35     ` Andreas Schwab
2016-10-20 12:53       ` Yury Norov
2016-10-20 13:16 ` Joseph Myers [this message]
2016-10-20 13:58   ` Adhemerval Zanella
2016-10-20 15:32     ` Joseph Myers
2016-10-20 16:55       ` Adhemerval Zanella

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=alpine.DEB.2.20.1610201302400.2960@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=arnd@arndb.de \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    --cc=ynorov@caviumnetworks.com \
    --cc=zackw@panix.com \
    /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).