From: "Arnd Bergmann" <arnd@arndb.de>
To: "Paul Moore" <paul@paul-moore.com>, "Arnd Bergmann" <arnd@kernel.org>
Cc: "Stephen Smalley" <stephen.smalley.work@gmail.com>,
"Ondrej Mosnáček" <omosnacek@gmail.com>,
selinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selinux: use explicit 64-bit division
Date: Tue, 15 Sep 2026 22:42:49 +0200 [thread overview]
Message-ID: <5a285431-9b60-4d87-87c4-a5b52021ea65@app.fastmail.com> (raw)
In-Reply-To: <CAHC9VhQwkwrEgnuyP-u_NJxmjgy3Zp9XN4cAqCMqH3ugV+jrsA@mail.gmail.com>
On Tue, Sep 15, 2026, at 22:36, Paul Moore wrote:
> On Tue, Sep 15, 2026 at 3:57 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> On 32-bit targets, the division of a 64-bit integer by 33 causes a
>> function call:
>>
>> arm-linux-gnueabi-ld: security/selinux/selinuxfs.o: in function `sel_read_class':
>> selinuxfs.c:(.text+0xdcc): undefined reference to `__aeabi_uldivmod'
>> arm-linux-gnueabi-ld: security/selinux/selinuxfs.o: in function `sel_read_perm':
>> selinuxfs.c:(.text+0xed0): undefined reference to `__aeabi_uldivmod'
>>
>> Replace this with an explicit call to div_u64() and div_u64_rem() to
>> annotate that these are potentially very slow.
>>
>> Fixes: fc68b6a45f16 ("selinux: convert selinuxfs inode numbers from unsigned long to u64")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>> security/selinux/selinuxfs.c | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> Thanks Arnd.
>
> As sashiko pointed out[1], since we don't really use the full 64-bit
> inode space, what do you think about the following fix instead?
Ah right, I hadn't checked the actual value of SEL_INO_MASK, and the
description of your patch made it sound like the 64-bit space
was actually required.
Your patch is better then, you can treat my mail as Reported-by.
Arnd
next prev parent reply other threads:[~2026-09-15 20:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 19:56 Arnd Bergmann
2026-09-15 20:36 ` Paul Moore
2026-09-15 20:42 ` Arnd Bergmann [this message]
2026-09-15 21:40 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a285431-9b60-4d87-87c4-a5b52021ea65@app.fastmail.com \
--to=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=omosnacek@gmail.com \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®