-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hiffy
unable to call SpRot
functions after 46fec52176e26964b65d5ddd5b4e74222de0bd02
#1777
Comments
Huh, it's pretty weird that this only effects the SpRot API... I'll poke around a bit. |
Thanks! 💯 this is weird, especially that it only effects the SpRot. Thanks for taking a look. |
This got changed to let _ = foo, which is great and correct. However, it also causes current versions of rustc to become more aggressive about not emitting the type in the DWARF, and this makes Humility very sad. I'm also patching Humility but, this fixes the code generator for older versions of Humility. This is the proximal cause of: oxidecomputer/hubris#1777
We've got a range of versions of the idolatry code generator in the wild where rustc doesn't emit the foo_ARGS structs for arg-less functions, particularly when using encoding other than zerocopy. Humility won't send arg-less IPCs to firmware in this range of versions. This is the root cause of oxidecomputer/hubris#1777 I'm also patching Idolatry to make it more likely to produce DWARF, but I think it's best for Humility to tolerate such unused zero-size structs not being omitted.
We've got a range of versions of the idolatry code generator in the wild where rustc doesn't emit the foo_ARGS structs for arg-less functions, particularly when using encoding other than zerocopy. Humility won't send arg-less IPCs to firmware in this range of versions. This is the root cause of oxidecomputer/hubris#1777 I'm also patching Idolatry to make it more likely to produce DWARF, but I think it's best for Humility to tolerate such unused zero-size structs not being omitted.
Alright, this is an interaction of two things, both of which I've got PRs outstanding to fix. First, Idolatry changed code generation very slightly in a way that caused rustc to stop emitting DWARF for zero-sized ARGS structs, particularly for Hubpack-encoded operations. When I say codegen was changed slightly, I mean replacing However, these args structs are still for all intents and purposes totally unused and zero size, which means I consider rustc at liberty to not emit DWARF for them at any point in the future. I've got a PR outstanding to cause Humility to treat a missing Idol args struct as zero-length. If it ever gets that assumption wrong, the IPC will just cause hiffy to be killed, which we'll notice. |
This got changed to let _ = foo, which is great and correct. However, it also causes current versions of rustc to become more aggressive about not emitting the type in the DWARF, and this makes Humility very sad. I'm also patching Humility but, this fixes the code generator for older versions of Humility. This is the proximal cause of: oxidecomputer/hubris#1777
We've got a range of versions of the idolatry code generator in the wild where rustc doesn't emit the foo_ARGS structs for arg-less functions, particularly when using encoding other than zerocopy. Humility won't send arg-less IPCs to firmware in this range of versions. This is the root cause of oxidecomputer/hubris#1777 I'm also patching Idolatry to make it more likely to produce DWARF, but I think it's best for Humility to tolerate such unused zero-size structs not being omitted.
We've got a range of versions of the idolatry code generator in the wild where rustc doesn't emit the foo_ARGS structs for arg-less functions, particularly when using encoding other than zerocopy. Humility won't send arg-less IPCs to firmware in this range of versions. This is the root cause of oxidecomputer/hubris#1777 I'm also patching Idolatry to make it more likely to produce DWARF, but I think it's best for Humility to tolerate such unused zero-size structs not being omitted.
As of a couple of minutes ago, Humility 0.11.6 should be able to talk to sprot in this firmware again. |
This got changed to let _ = foo, which is great and correct. However, it also causes current versions of rustc to become more aggressive about not emitting the type in the DWARF, and this makes Humility very sad. I'm also patching Humility but, this fixes the code generator for older versions of Humility. This is the proximal cause of: oxidecomputer/hubris#1777
Between 46fec52 (inclusive) and this commit (exclusive) we haven't generated DWARF info for the Idol ARGS struct in the specific case of a zero-argument function using non-zerocopy encoding. Humility 0.11.6 has been fixed to tolerate this, but in the interest of broader compatibility, we've also patched Idol to try and bring the debug info back. This pulls in the Idol fix. Fixes #1777
Between 46fec52 (inclusive) and this commit (exclusive) we haven't generated DWARF info for the Idol ARGS struct in the specific case of a zero-argument function using non-zerocopy encoding. Humility 0.11.6 has been fixed to tolerate this, but in the interest of broader compatibility, we've also patched Idol to try and bring the debug info back. This pulls in the Idol fix. Fixes #1777
Hubris has been revved to include the fixes in the Idol compiler. Firmware built after ~today should be compatible with earlier versions of Humility; versions of Humility after ~today should be compatible with all versions of the firmware. |
I tripped over this after updating an old hubris build and attempting to talk to the SpRot task on my gimletlet. Using the latest humility & hubris from before the subject commit (d4aba7b) we're able to make SpRot calls as expected:
When built from a later commit (the subject commit or later) this now fails:
Oddly enough the
SpRot
methods appear to be the only ones affected: Methods likeUpdate.block_size
andHash.init_sha256
still work as expected.Since the commit in question changes the
idolatry
built I thought that some code may be missing from the output generated bybuild.rs
. Theserver_stub.rs
generated bystm32h7-sprot-server
crate however appears to have the expectedSpRot_status_ARGS
structure so that may be a dead end.The text was updated successfully, but these errors were encountered: