Page MenuHomeFreeBSD

sys/_pv_entry.h: Include sys/param.h
ClosedPublic

Authored by imp on Oct 10 2022, 5:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 7:42 AM
Unknown Object (File)
Dec 12 2023, 3:38 PM
Unknown Object (File)
Dec 7 2023, 6:53 PM
Unknown Object (File)
Aug 14 2023, 11:30 PM
Unknown Object (File)
Aug 14 2023, 12:31 PM
Unknown Object (File)
Jun 24 2023, 4:22 AM
Unknown Object (File)
Jun 24 2023, 4:09 AM
Unknown Object (File)
May 2 2023, 6:57 AM
Subscribers
None

Details

Summary

sys/param.h is required for this file because it uses howmany() which is
defined there. For the kernel, this works today because of namespace
polllution. However, user land programs, like qemu, can include
machine/pmap.h without having included sys/param.h (since it wasn't
required before).

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Oct 10 2022, 5:21 PM
imp created this revision.
This revision is now accepted and ready to land.Oct 11 2022, 2:29 PM

Wasn't qemu already patched? This header didn't add the howmany, it just moved it. I thought the equivalent of D36362 was already merged to the port, so it shouldn't be broken? Is there anything other than qemu that uses this header? Last time that was the only report of breakage I received.

In D36927#838836, @jhb wrote:

Wasn't qemu already patched? This header didn't add the howmany, it just moved it. I thought the equivalent of D36362 was already merged to the port, so it shouldn't be broken? Is there anything other than qemu that uses this header? Last time that was the only report of breakage I received.

QEMU upstream wasn't patched (just the port), and it's a lot easier for me to fix it here than in upstream due its heavyweight process.

This revision was automatically updated to reflect the committed changes.