Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-27 Thread Petr Pavlu
On 11/20/24 03:17, Song Chen wrote: > Hi Petr, > > 在 2024/11/18 20:54, Petr Pavlu 写道: >> On 11/13/24 03:15, Song Chen wrote: >>> 在 2024/11/12 20:56, Petr Pavlu 写道: On 11/10/24 12:42, Song Chen wrote: > Sometimes when kernel calls request_module to load a module > into kernel space, it

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-26 Thread Luis Chamberlain
On Mon, Nov 18, 2024 at 01:54:14PM +0100, Petr Pavlu wrote: > I'm however not sure about rejecting empty strings as is also done by > the patch. Consider a call to request_module("mod%s", suffix) where the > suffix could be empty to select the default variant, or non-empty to > select e.g. some opt

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-19 Thread Song Chen
Hi Petr, 在 2024/11/18 20:54, Petr Pavlu 写道: On 11/13/24 03:15, Song Chen wrote: 在 2024/11/12 20:56, Petr Pavlu 写道: On 11/10/24 12:42, Song Chen wrote: Sometimes when kernel calls request_module to load a module into kernel space, it doesn't pass the module name appropriately, and request_modu

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-18 Thread Petr Pavlu
On 11/13/24 03:15, Song Chen wrote: > 在 2024/11/12 20:56, Petr Pavlu 写道: >> On 11/10/24 12:42, Song Chen wrote: >>> Sometimes when kernel calls request_module to load a module >>> into kernel space, it doesn't pass the module name appropriately, >>> and request_module doesn't verify it as well. >>>

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-12 Thread Song Chen
Hi Petr, Please see my inline comments, many thanks. BR Song 在 2024/11/12 20:56, Petr Pavlu 写道: On 11/10/24 12:42, Song Chen wrote: Sometimes when kernel calls request_module to load a module into kernel space, it doesn't pass the module name appropriately, and request_module doesn't verify

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-12 Thread Petr Pavlu
On 11/10/24 12:42, Song Chen wrote: > Sometimes when kernel calls request_module to load a module > into kernel space, it doesn't pass the module name appropriately, > and request_module doesn't verify it as well. > > As a result, modprobe is invoked anyway and spend a lot of time > searching a no

[PATCH] kmod: verify module name before invoking modprobe

2024-11-10 Thread Song Chen
Sometimes when kernel calls request_module to load a module into kernel space, it doesn't pass the module name appropriately, and request_module doesn't verify it as well. As a result, modprobe is invoked anyway and spend a lot of time searching a nonsense name. For example reported from a custom