public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/29622] New: Open file permission error under aarch64 architecture
@ 2022-09-28  2:01 dluyaning at gmail dot com
  2022-09-28  2:02 ` [Bug libc/29622] " dluyaning at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dluyaning at gmail dot com @ 2022-09-28  2:01 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-18 12:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28  2:01 [Bug libc/29622] New: Open file permission error under aarch64 architecture dluyaning at gmail dot com
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

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).