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
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
Unknown Object (File)
Thu, Sep 17, 7:43 PM
Unknown Object (File)
Thu, Sep 17, 7:13 PM
Unknown Object (File)
Thu, Sep 17, 12:12 AM
Unknown Object (File)
Wed, Sep 16, 9:38 PM
Unknown Object (File)
Wed, Sep 16, 3:31 AM
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 Not Applicable
Unit
Tests Not Applicable

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