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)
Wed, Dec 4, 1:39 AM
Unknown Object (File)
Mon, Dec 2, 4:45 PM
Unknown Object (File)
Nov 23 2024, 10:39 PM
Unknown Object (File)
Nov 19 2024, 6:28 AM
Unknown Object (File)
Nov 19 2024, 6:10 AM
Unknown Object (File)
Nov 19 2024, 4:05 AM
Unknown Object (File)
Oct 30 2024, 3:26 AM
Unknown Object (File)
Oct 21 2024, 7:24 AM

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.