summaryrefslogtreecommitdiff
path: root/internal/generate/classify.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-31 19:09:16 +0300
committerPaul Buetow <paul@buetow.org>2026-05-31 19:09:16 +0300
commit8a1bf6236f6a525881c647fd881093b393436411 (patch)
tree0fb537b847b6e5c72d2d3d98d7ce8fbc15330102 /internal/generate/classify.go
parentc3177bd82c16429c1bb246d19af76012479f0c01 (diff)
listxattrat: READ-classify return for xattr-list family consistency
listxattrat(2) (Linux 6.13+) returns the size in bytes of the list of extended attribute names, exactly like listxattr/llistxattr/flistxattr, but its exit was classified UNCLASSIFIED, so its read bytes were dropped from I/O totals. Classify it as ReadClassified and regenerate the BPF handler (ret_type now READ_CLASSIFIED). This mirrors the getxattrat fix (task ku, commit c3177bd) and completes xattr-family consistency: get-family and list-family are READ_CLASSIFIED while set-family and remove-family stay UNCLASSIFIED (they return 0/-1). Update the docs ReadClassified list and the retclassify expectation, and add an ioworkload scenario plus integration test: the workload sets a user xattr then lists names via the raw listxattrat(2) syscall with AT_FDCWD, and the test asserts enter_listxattrat captures the file path and accounts the returned name-list size as read bytes. Task: r20 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'internal/generate/classify.go')
-rw-r--r--internal/generate/classify.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/generate/classify.go b/internal/generate/classify.go
index 3746bd9..0735291 100644
--- a/internal/generate/classify.go
+++ b/internal/generate/classify.go
@@ -593,6 +593,10 @@ var retClassifications = map[string]RetClassification{
"getxattrat": ReadClassified,
"lgetxattr": ReadClassified,
"listxattr": ReadClassified,
+ // listxattrat (Linux 6.13+) returns the size in bytes of the list of
+ // extended attribute names, exactly like listxattr/llistxattr/flistxattr,
+ // so it is a read byte-count.
+ "listxattrat": ReadClassified,
"llistxattr": ReadClassified,
"pread64": ReadClassified,
"preadv": ReadClassified,