[LTP] [PATCH v2 1/4] Fallback landlock network support
Cyril Hrubis
chrubis@suse.cz
Tue Nov 5 14:15:51 CET 2024
Hi!
> In this way it could work, but we loose guarded buffers which are passed
> to the syscall and might be useful during debugging. In this case we
> should use tst_buffers_alloc(). @Cyril what do you think?
That woudln't work either, since we cannot allocate "half a structure"
can we?
Unfortunatelly I think that having a per API version structures is the
cleanest solution. Because:
- our tests should run everywhere they can, that means that we have to
use the minimal ABI that is required for the test
- important part of the backward compatibilty testing is that there are
no accesses past the declared ruleset size, which can be easily done
by the guarded buffers provided that we allocate exactly the size
needed
And backward compatibility also means that we have to properly handle
the case when we need newer ABI than currently supported, so the
verify_landlock_enabled() needs a size parameter so that we can check
that the ABI is >= than the minimal ABI the test needs...
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list