Re: [PATCH v5 06/14] module: Switch load_info::len to size_t
Petr Pavlu <[email protected]> Tue, 26 May 2026 11:47:09 +0200
| Newsgroups | org.kernel.vger.linux-integrity,org.kernel.vger.bpf,org.kernel.vger.linux-arch,org.kernel.vger.linux-doc,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel,org.kernel.vger.linux-modules,org.kernel.vger.linux-security-module,org.ozlabs.lists.linuxppc-dev |
|---|---|
| Message-ID | <[email protected]> |
On 5/5/26 11:05 AM, Thomas Weißschuh wrote: > Switching the types will make some later changes cleaner. Since the updated version drops the patch "module: Deduplicate signature extraction", I believe this change is no longer necessary. > size_t is also the semantically correct type for this field. > > As both 'size_t' and 'unsigned long' are always the same size, this > should be risk-free. The module 'len' would now start in init_module() as 'unsigned long', then change in copy_module_from_user() to size_t, and then back to 'unsigned long' when calling copy_chunked_from_user(). The current code is more consistent and mostly uses 'unsigned long', matching the syscall interface. -- Thanks, Petr