Page MenuHomeFreeBSD

LinuxKPI: remove < 5.0 version support
ClosedPublic

Authored by bz on Mar 23 2021, 2:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 16 2024, 7:51 PM
Unknown Object (File)
Feb 15 2024, 6:38 PM
Unknown Object (File)
Jan 30 2024, 10:45 PM
Unknown Object (File)
Jan 27 2024, 12:26 PM
Unknown Object (File)
Dec 25 2023, 8:05 PM
Unknown Object (File)
Dec 20 2023, 1:41 AM
Unknown Object (File)
Dec 19 2023, 12:50 AM
Unknown Object (File)
Dec 14 2023, 10:22 PM

Details

Summary

We are not aware of any out-of-tree consumers anymore
which would need KPI support for before Linux version 5.
Update the two in-tree consumers to use the new KPI.
This allows us to remove the extra version check and
will also give access to {lower,upper}_32_bits() unconditionally.

Sponsored-by: The FreeBSD Foundation
Reviewed-by: ..
MFC-after: 2 weeks
X-MFC: to 13 only

Differential Revision:

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Mar 23 2021, 2:37 PM

Is it worth us having somewhere something like:

#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 50000
#error LINUXKPI_VERSION < 50000 not supported
#endif

Both sys/ofed/drivers/infiniband/core/ib_uverbs_main.c and sys/dev/pms/freebsd/driver/common/lxencrypt.c seems to use the old access_ok definition.

In D29391#658261, @manu wrote:

Both sys/ofed/drivers/infiniband/core/ib_uverbs_main.c and sys/dev/pms/freebsd/driver/common/lxencrypt.c seems to use the old access_ok definition.

Ah mumble. I misunderstood @hselasky 's "The kernel doesn't use it" then. Sigh. My bad. I wonder if we want to flip the default then or change (update) the consumers?

In D29391#658264, @bz wrote:
In D29391#658261, @manu wrote:

Both sys/ofed/drivers/infiniband/core/ib_uverbs_main.c and sys/dev/pms/freebsd/driver/common/lxencrypt.c seems to use the old access_ok definition.

Ah mumble. I misunderstood @hselasky 's "The kernel doesn't use it" then. Sigh. My bad. I wonder if we want to flip the default then or change (update) the consumers?

The kernel doesn't use LINUXKPI_VERSION, so it have the old definition.

  • LinuxKPI: update pms and ofed for newer access_ok()

I haven't compile-tested this that I did not foo-bar it again.
But changing the three consumer lines seems straight forward enough.

I'll wait for @hselasky and @rlibby to see if they are okay with it.

This revision is now accepted and ready to land.Mar 23 2021, 3:49 PM
rlibby added a subscriber: rstone.

LGTM, and I checked $work's tree for other references.

But, did you mean to tag @rstone? I don't think we have any other funky version dependency, but if we do then I think he would know.

LGTM, and I checked $work's tree for other references.

Thanks!

But, did you mean to tag @rstone? I don't think we have any other funky version dependency, but if we do then I think he would know.

I think you touch pms(4) and that's why I had added you.

I can confirm don't have any out-of-tree consumers of linuxkpi, so looks fine to me.

This revision was automatically updated to reflect the committed changes.