Page MenuHomeFreeBSD

riscv: Preserve savectx return address with vector support
ClosedPublic

Authored by mchoo on Tue, Sep 15, 1:37 AM.
Tags
None
Referenced Files
F173257929: D59689.diff
Thu, Sep 24, 6:36 PM
F173206086: D59689.id186767.diff
Thu, Sep 24, 7:18 AM
F173181363: D59689.id.diff
Thu, Sep 24, 3:46 AM
Unknown Object (File)
Wed, Sep 23, 5:54 PM
Unknown Object (File)
Tue, Sep 22, 4:06 PM
Unknown Object (File)
Fri, Sep 18, 6:23 PM
Unknown Object (File)
Fri, Sep 18, 3:38 AM
Unknown Object (File)
Thu, Sep 17, 7:52 PM
Subscribers

Details

Summary

Calling vector_state_store_savectx() overwrites ra with the address of
the following ret instruction. The ret consequently branches to itself
and prevents kernel dumps from progressing past dump_savectx().

Tail-call vector_state_store_savectx() so that it returns directly to
the original savectx() caller.

Fixes: d7a393095cfd ("riscv: Vector Extension (RVV) support.")
Sponsored by: FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
No Test Coverage
Build Status
Buildable 76915
Build 73798: arc lint + arc unit

Event Timeline

mchoo requested review of this revision.Tue, Sep 15, 1:37 AM
This revision is now accepted and ready to land.Tue, Sep 15, 6:40 AM

ping @jhb for mentor approval

I know John well enough (and work with him) to state that my approval here is sufficient for you to land it, and if you want an Approved by: you can put me there