Page MenuHomeFreeBSD

linuxkpi: allow M_EXEC flag for __vmalloc()
AbandonedPublic

Authored by p.bruenn_beckhoff.com on May 20 2019, 12:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 6:05 PM
Unknown Object (File)
Jan 30 2024, 7:10 AM
Unknown Object (File)
Jan 27 2024, 10:44 AM
Unknown Object (File)
Jan 4 2024, 1:56 PM
Unknown Object (File)
Dec 23 2023, 10:30 AM
Unknown Object (File)
Dec 6 2023, 6:44 PM
Unknown Object (File)
Oct 17 2023, 5:41 PM
Unknown Object (File)
Sep 27 2023, 10:13 PM
Subscribers

Details

Reviewers
hselasky
Summary

Enable Linux drivers to use PAGE_KERNEL_EXEC in calls to __vmalloc().

Maybe we should add "#define PAGE_KERNEL_EXEC M_EXEC" to gfp.h, too

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24327
Build 23150: arc lint + arc unit

Event Timeline

Is this variant frequently used? Why not create a new inline function for this: __vmalloc_exec() ?

It's just one driver [1] I care about and it could easily be patched, but vmalloc_exec() is not exported for modules in Linux.
Or do you mean to add something like linux_check_m_prot()?

[1] https://github.com/Beckhoff/BBAPI

I mean just add a new function for these special allocations and then patch the Linux code. That way we don't need to evaluate the "other" argument for __vmalloc().

Okay, then I think I got this interface wrong. To me it looked like linuxkpi was intended to run Linux drivers without modification. That's why I thought upstreaming this patch might be of interessed.
If that's not the case, we will just keep it out of tree on our vendor branch. Converting BBAPI to a real FreeBSD driver would be the best option, but currently that's out of budget.
Thanks a lot for your fast feedback.

The LinuxKPI is there to be able to compile 95% of the linux code :-) The rest must be patched.