On Tue, Sep 24, 2024 at 02:08:37PM +0900, Sergey Senozhatsky wrote: > Both kfree_const() and kstrdup_const() use __start_rodata > and __end_rodata, which do not work for modules. This is > especially important for kfree_const(). Stop exporting > these functions, as they cannot be used in the modules. Well, they do work when called from modules, they just don't work on constant data that is in modules. There's also plenty of existing callers in modules. So just unexporting them is going to break. The API is kinda horrible, but an implementation to check for constants in modules would also be quite horrible. So I don't have a good answer here, but simply unexporting them is not going to cut it.