On Sat, Mar 02, 2024 at 03:57:02PM +0100, Szabolcs Nagy wrote:
- Mark Brown broonie@kernel.org [2024-02-21 17:36:12 +0000]:
I said NOP but there's no reason it strictly needs to be a NOP. It could instead do something reasonable to convey the state of racing with shadow stack being disabled.
This feels like it's getting complicated and I fear it may be an uphill struggle to get such code merged, at least for arm64. My instinct is
the aarch64 behaviour is already nop for gcs instructions when gcs is disabled. the isa was designed so async disable is possible.
Yeah, we'd need to handle GCSPR_EL0 somehow (currently it's inaccessible when GCS is disabled) and userspace would need to take care it's not doing something that could get stuck if for example a pop didn't actually *do* anything.