Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-05 Thread Lauri Kasanen
On Tue, 5 Jan 2021 20:21:12 +0100 Alex Samorukov wrote: > On Tue, 5 Jan 2021 10:47:25 +0800 > > Kang-Che Sung wrote: > > > >> I don't see why the > >> "Invalid ELF header" message would bother you so much, since you > >> won't load kernel modules often. > > As mentioned in my original post,

Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-05 Thread Qu Wenruo
On 2021/1/5 上午10:47, Kang-Che Sung wrote: On Mon, Jan 4, 2021 at 6:32 PM Qu Wenruo wrote: On 2021/1/4 下午6:01, Kang-Che Sung wrote: On Sun, Jan 3, 2021 at 12:11 PM Qu Wenruo wrote: finit_module() and init_module() system calls have clear specification to only accept valid ELF image.

Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-04 Thread Lauri Kasanen
On Tue, 5 Jan 2021 10:47:25 +0800 Kang-Che Sung wrote: > I don't see why the > "Invalid ELF header" message would bother you so much, since you > won't load kernel modules often. As mentioned in my original post, it's a pr_err. It shows up on console! So every boot there's 20 scary errors

Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-04 Thread Kang-Che Sung
On Mon, Jan 4, 2021 at 6:32 PM Qu Wenruo wrote: > > On 2021/1/4 下午6:01, Kang-Che Sung wrote: > > On Sun, Jan 3, 2021 at 12:11 PM Qu Wenruo wrote: > >> > >> finit_module() and init_module() system calls have clear specification > >> to only accept valid ELF image. > >> > >> Although we try

Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-04 Thread Qu Wenruo
On 2021/1/4 下午6:01, Kang-Che Sung wrote: On Sun, Jan 3, 2021 at 12:11 PM Qu Wenruo wrote: finit_module() and init_module() system calls have clear specification to only accept valid ELF image. Although we try finit_module() on compressed modules to let the kernel determine if it's an ELF

Re: [PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-04 Thread Kang-Che Sung
On Sun, Jan 3, 2021 at 12:11 PM Qu Wenruo wrote: > > finit_module() and init_module() system calls have clear specification > to only accept valid ELF image. > > Although we try finit_module() on compressed modules to let the kernel > determine if it's an ELF image, but it's not ideal, especially

[PATCH v2 1/2] modutils: check ELF header before calling finit_module()

2021-01-03 Thread Qu Wenruo
finit_module() and init_module() system calls have clear specification to only accept valid ELF image. Although we try finit_module() on compressed modules to let the kernel determine if it's an ELF image, but it's not ideal, especially when newer kernel will complain when some invalid