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)
Sun, Oct 27, 10:28 AM
Unknown Object (File)
Sun, Oct 27, 10:28 AM
Unknown Object (File)
Sun, Oct 27, 10:27 AM
Unknown Object (File)
Sun, Oct 27, 10:27 AM
Unknown Object (File)
Sun, Oct 27, 10:09 AM
Unknown Object (File)
Tue, Oct 22, 6:48 PM
Unknown Object (File)
Mon, Oct 21, 5:44 PM
Unknown Object (File)
Oct 5 2024, 5:00 PM
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.