Page MenuHomeFreeBSD

LinuxKPI: remove < 5.0 version support
ClosedPublic

Authored by bz on Tue, Mar 23, 2:37 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
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bz requested review of this revision.Tue, Mar 23, 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.Tue, Mar 23, 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.