[LTP] syscalls/file_attr01: Dynamically expect EOPNOTSUPP on tmpfs without xattr
Wake Liu
wakel@google.com
Wed Apr 29 11:22:53 CEST 2026
Regarding the validation order of usize: I have verified that usize
validation (EINVAL/E2BIG) occurs before the filesystem support check
in the kernel. This is confirmed by the LTP test results on a kernel
with CONFIG_TMPFS_XATTR=n.
<linuxtestproject.agent@gmail.com> 於 2026年4月29日週三 下午3:34寫道:
>
> Hi Wake,
>
> On Wed, 29 Apr 2026, Wake Liu wrote:
> > syscalls/file_attr01: Dynamically expect EOPNOTSUPP on tmpfs without xattr
>
> > + if (tc->ufattr == (struct file_attr **)(&null_ptr) && missing_tmpfs_xattr)
> > + exp_errno = EOPNOTSUPP;
>
> The override is scoped only to the null-ufattr tcase. The commit message says
> the kernel checks xattr support "before dereferencing the user pointer", which
> raises the question of whether usize validation (EINVAL/E2BIG tcases) also
> occurs after the support check. If so, those tcases would also return
> EOPNOTSUPP on tmpfs without xattr and need the same treatment. Please clarify
> the kernel's validation order for usize relative to the xattr support check.
>
> > Changes in v3:
> [...]
> > Changes in v2:
> [...]
>
> Version changelogs should be stripped from the commit message before merging;
> they belong in the cover letter only.
>
> ---
> Note:
>
> Our agent completed the review of the patch. The full review can be
> found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25096139400
>
> The agent can sometimes produce false positives although often its
> findings are genuine. If you find issues with the review, please
> comment this email or ignore the suggestions.
>
> Regards,
> LTP AI Reviewer
--
Best Regards,
Wake Liu
More information about the ltp
mailing list