[LTP] [PATCH v2] mseal02: Handle multiple errnos for 32-bit compat mode
Petr Vorel
pvorel@suse.cz
Fri Mar 20 18:27:18 CET 2026
Hi Wei, all,
> Hi all,
> > In 32-bit compat mode, the overflow_size (calculated using a 32-bit ULONG_MAX)
> > does not cause a 64-bit integer wrap-around when added to the start address.
> > Consequently, the kernel see valid range that points to unmapped space, returning
> > ENOMEM instead of the expected EINVAL.
> Also LGTM.
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> + if (tst_is_compat_mode())
> + tcases[2].exp_err = ENOMEM;
I was about to merge, but thinking about it twice, it'd make sense instead
hardcoding index 2 (we talked about it in the past, that hardcoding indexes can
cause problems the future) to add attribute .check_kver, similar way Jan Polensky
did in dcf0c145d9 ("setxattr02: Adapt test for kernel 7.1.0+ socket xattr support").
Could you please modify it in v3?
Kind regards,
Petr
[1] https://github.com/linux-test-project/ltp/commit/dcf0c145d90531b919e633bb3f481f59a867aa06
> Kind regards,
> Petr
More information about the ltp
mailing list