Page MenuHomeFreeBSD

Avoid re-check of usermode condition.
ClosedPublic

Authored by kib on Jan 1 2018, 7:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 30, 12:49 PM
Unknown Object (File)
Sun, Mar 29, 1:02 AM
Unknown Object (File)
Thu, Mar 19, 6:11 PM
Unknown Object (File)
Thu, Mar 19, 7:33 AM
Unknown Object (File)
Thu, Mar 19, 4:59 AM
Unknown Object (File)
Thu, Mar 19, 4:53 AM
Unknown Object (File)
Tue, Mar 17, 8:33 PM
Unknown Object (File)
Tue, Mar 17, 5:36 AM
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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Fix amd64 portion of the patch.

sys/amd64/amd64/trap.c
663

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.