Page MenuHomeFreeBSD

Avoid re-check of usermode condition.
ClosedPublic

Authored by kib on Jan 1 2018, 7:54 PM.
Tags
None
Referenced Files
F166950471: D13725.diff
Tue, Aug 18, 1:34 AM
F166943315: D13725.id37367.diff
Mon, Aug 17, 11:16 PM
F166905438: D13725.id37366.diff
Mon, Aug 17, 4:24 PM
F166903696: D13725.diff
Mon, Aug 17, 4:04 PM
F166895750: D13725.id37368.diff
Mon, Aug 17, 2:38 PM
F166883246: D13725.id37372.diff
Mon, Aug 17, 12:28 PM
Unknown Object (File)
Sun, Aug 16, 9:55 PM
Unknown Object (File)
Sun, Aug 16, 8:41 PM
Subscribers

Details

Summary

This change should not change anything in the behavior of trap_pfault(), while eliminating obfuscation of jumping to the code which checks for reversed condition.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fix amd64 portion of the patch.

sys/amd64/amd64/trap.c
663 ↗(On Diff #37366)

The unconditional initialization of the variable "rv" to zero is now redundant. Arguably, zero was never a value of the correct type for its initialization, because it's not a KERN_*.

Remove initialization of rv.

This revision is now accepted and ready to land.Jan 1 2018, 8:25 PM
This revision was automatically updated to reflect the committed changes.