Bug 510416 - Missing syswraps for file_getattr and file_setattr
Summary: Missing syswraps for file_getattr and file_setattr
Status: ASSIGNED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.26 GIT
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: mcermak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-09 06:39 UTC by mcermak
Modified: 2025-10-13 07:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
proposed patch (14.34 KB, patch)
2025-10-09 13:46 UTC, mcermak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mcermak 2025-10-09 06:39:03 UTC
On x86_64, LTP testcase file_attr01 gives:

WARNING: unhandled amd64-linux syscall: 469
WARNING: unhandled amd64-linux syscall: 468
Comment 1 mcermak 2025-10-09 07:41:43 UTC
https://lwn.net/Articles/1027795/

fs/file_attr.c

commit be7efb2d20d67f334a7de2aef77ae6c69367e646
Author: Andrey Albershteyn <aalbersh@redhat.com>
Date:   Mon Jun 30 18:20:16 2025 +0200

    fs: introduce file_getattr and file_setattr syscalls
    
    Introduce file_getattr() and file_setattr() syscalls to manipulate inode
    extended attributes. The syscalls takes pair of file descriptor and
    pathname. Then it operates on inode opened accroding to openat()
    semantics. The struct file_attr is passed to obtain/change extended
    attributes.
    
    This is an alternative to FS_IOC_FSSETXATTR ioctl with a difference
    that file don't need to be open as we can reference it with a path
    instead of fd. By having this we can manipulated inode extended
    attributes not only on regular files but also on special ones. This
    is not possible with FS_IOC_FSSETXATTR ioctl as with special files
    we can not call ioctl() directly on the filesystem inode using fd.
    
    This patch adds two new syscalls which allows userspace to get/set
    extended inode attributes on special files by using parent directory
    and a path - *at() like syscall.
Comment 2 mcermak 2025-10-09 13:46:06 UTC
Created attachment 185626 [details]
proposed patch
Comment 3 mcermak 2025-10-09 14:11:40 UTC
Note that I prepared this patch on top of patch for bug 510169, so there may be related NEWS inaccuracy when applying this.
Comment 4 mcermak 2025-10-13 07:36:04 UTC
Test run: https://builder.sourceware.org/buildbot/#/changes/98043