public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dluyaning at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29622] New: Open file permission error under aarch64 architecture
Date: Wed, 28 Sep 2022 02:01:09 +0000	[thread overview]
Message-ID: <bug-29622-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29622

            Bug ID: 29622
           Summary: Open file permission error under aarch64 architecture
           Product: glibc
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: dluyaning at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

strace log:

openat(AT_FDCWD, "/home/lyn/test/", O_RDWR|O_CLOEXEC|O_TMPFILE, 0134240) = 12
write(12, "11111\0", 6) = 6
lseek(12, 0, SEEK_SET) = 0

demo:
#define _GNU_SOURCE

#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/limits.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
char path[PATH_MAX];
int fd = open("/home/lyn/test", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR);
write(fd, "hello", 5);
fsync(fd);
printf("pidis %d\n", getpid());
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
int ret = linkat(fd, path, AT_FDCWD, "yyyy", AT_SYMLINK_FOLLOW);
if(ret < 0)

{ printf("linkat error %d %s\n", errno, strerror(errno)); }
pause();

return 0;
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-09-28  2:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  2:01 dluyaning at gmail dot com [this message]
2022-09-28  2:02 ` [Bug libc/29622] " dluyaning at gmail dot com
2022-09-28  2:37 ` dluyaning at gmail dot com
2022-09-28  8:30 ` schwab@linux-m68k.org
2022-09-28  9:45 ` dluyaning at gmail dot com
2022-09-28  9:56 ` schwab@linux-m68k.org
2022-09-29  2:47 ` dluyaning at gmail dot com
2023-04-18 12:03 ` adhemerval.zanella at linaro dot org

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=bug-29622-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@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).