[LTP] [PATCH] syscalls/statmount07: drop "invalid buffer size" test

Jan Stancek jstancek@redhat.com
Tue Oct 15 12:10:04 CEST 2024


On Tue, Oct 15, 2024 at 11:52 AM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> > The manpage doesn't say that 'smbuf' needs to be valid
> > for entire range of 'bufsize'.
> >
> > This check relies on access_ok() check, which can be skipped
> > on some arches/configs, for example on s390x with
> > CONFIG_ALTERNATE_USER_ADDRESS_SPACE=y. Test then fails with:
> >   statmount07.c:117: TFAIL: invalid buffer size succeeded
>
> And does it fail later on in the copy_to_user() if the buffer is
> physically not accesible?
>
> We may add a test that would look like:
>
> | page mapped rw | page mapped read only |
>              ^
>              buf pointer starts here
>
> What do you think?

we can add that, it would be variation of "invalid buffer pointer" test

>
> --
> Cyril Hrubis
> chrubis@suse.cz
>



More information about the ltp mailing list