Page MenuHomeFreeBSD

Avoid re-check of usermode condition.
ClosedPublic

Authored by kib on Jan 1 2018, 7:54 PM.
Tags
None
Referenced Files
F83318219: D13725.id37367.diff
Wed, May 8, 7:58 PM
F83318213: D13725.id37366.diff
Wed, May 8, 7:58 PM
F83318200: D13725.id37368.diff
Wed, May 8, 7:58 PM
F83314019: D13725.id.diff
Wed, May 8, 6:39 PM
F83313952: D13725.id37372.diff
Wed, May 8, 6:38 PM
F83295925: D13725.diff
Wed, May 8, 1:37 PM
Unknown Object (File)
Jan 22 2024, 2:53 AM
Unknown Object (File)
Jan 7 2024, 10:39 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
662

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.