Page MenuHomeFreeBSD

mvlaic (Marko Vlaic)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 20 2024, 11:29 AM (13 w, 2 d)

Recent Activity

Aug 24 2024

mvlaic updated the diff for D46379: kern: Introduce a low-cost, conditional execution mechanism.

The mechanism is now refactored to use disable_wp() instead of the separate pmap scheme.

Aug 24 2024, 7:01 PM
mvlaic added a comment to D46379: kern: Introduce a low-cost, conditional execution mechanism.

db_write_bytes doesn’t bother with any of this, instead disabling WP on amd64 and using the DMAP on arm64…

While it's true that one can use the DMAP on arm64, that's hardly a desirable state of affairs. Assuming that the portion of the DMAP covered by the kernel text will be readonly, on arm64 and other platforms we'd instead need to temporarily relax protections on the 4KB kernel map page containing the target address, modify the text, and re-apply RO protections. If the first step involves demoting 2MB mappings, the last step should be careful to recreate them; I think this last piece is missing (see pmap_change_prot() on amd64 and arm64), but the use of large mappings for kernel text is important for performance. Perhaps that might be a more fruitful direction to consider.

Aug 24 2024, 12:17 PM

Aug 23 2024

mvlaic added inline comments to D46379: kern: Introduce a low-cost, conditional execution mechanism.
Aug 23 2024, 2:31 PM
mvlaic added inline comments to D46379: kern: Introduce a low-cost, conditional execution mechanism.
Aug 23 2024, 11:24 AM

Aug 20 2024

mvlaic added a comment to D46379: kern: Introduce a low-cost, conditional execution mechanism.

From the perspective of a reviewer, this patch is doing at least two things: adding a new mechanism to modify kernel text, and adding a new interface to define patch points. They should really be considered separately.

Aug 20 2024, 3:38 PM
mvlaic requested review of D46379: kern: Introduce a low-cost, conditional execution mechanism.
Aug 20 2024, 1:26 PM