[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <90a90f45-cd24-4d98-868e-ac30317badfe@roeck-us.net>
Date: Mon, 12 Aug 2024 10:07:06 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: John Johansen <john.johansen@...onical.com>
Cc: Paul Moore <paul@...l-moore.com>, James Morris <jmorris@...ei.org>,
"Serge E . Hallyn" <serge@...lyn.com>, apparmor@...ts.ubuntu.com,
linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org,
Brendan Higgins <brendanhiggins@...gle.com>,
Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] apparmor: fix policy_unpack_test on big endian systems
On 8/12/24 09:55, John Johansen wrote:
> On 8/8/24 08:59, Guenter Roeck wrote:
>> 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 <brendanhiggins@...gle.com>
>> Cc: Kees Cook <keescook@...omium.org>
>> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
>
> Looks good
>
> Acked-by: John Johansen <john.johansen@...onical.com>
>
> I will pull this into my tree
>
Thanks!
Guenter
Powered by blists - more mailing lists