diff options
| author | Guenter Roeck <[email protected]> | 2024-08-08 15:50:03 +0000 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2024-08-25 22:26:30 +0000 |
| commit | 98c0cc48e27e9d269a3e4db2acd72b486c88ec77 (patch) | |
| tree | c07efd36f1f021ecdc27e4b623072fe9b0b0b4b0 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
| parent | Revert "MIPS: csrc-r4k: Apply verification clocksource flags" (diff) | |
| download | kernel-98c0cc48e27e9d269a3e4db2acd72b486c88ec77.tar.gz kernel-98c0cc48e27e9d269a3e4db2acd72b486c88ec77.zip | |
apparmor: fix policy_unpack_test on big endian systems
policy_unpack_test fails on big endian systems because data byte order
is expected to be little endian but is generated in host byte order.
This results in test failures such as:
# policy_unpack_test_unpack_array_with_null_name: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:150
Expected array_size == (u16)16, but
array_size == 4096 (0x1000)
(u16)16 == 16 (0x10)
# policy_unpack_test_unpack_array_with_null_name: pass:0 fail:1 skip:0 total:1
not ok 3 policy_unpack_test_unpack_array_with_null_name
# policy_unpack_test_unpack_array_with_name: EXPECTATION FAILED at security/apparmor/policy_unpack_test.c:164
Expected array_size == (u16)16, but
array_size == 4096 (0x1000)
(u16)16 == 16 (0x10)
# policy_unpack_test_unpack_array_with_name: pass:0 fail:1 skip:0 total:1
Add the missing endianness conversions when generating test data.
Fixes: 4d944bcd4e73 ("apparmor: add AppArmor KUnit tests for policy unpack")
Cc: Brendan Higgins <[email protected]>
Cc: Kees Cook <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
0 files changed, 0 insertions, 0 deletions
