RFR: 8345296: AArch64: VM crashes with SIGILL when prctl is disallowed [v2]

Aleksey Shipilev shade at openjdk.org
Mon Dec 2 15:38:40 UTC 2024


On Mon, 2 Dec 2024 15:31:15 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:

>> Speaking of the valid ranges for SVE vector length, I don't think we want to blindly accept any `>0` value either. There is a block downwards that tries to check that vector length is not smaller than a `FloatRegister::sve_vl_min`, and that it is a power of two. But that block only works for manual overrides of `MaxVectorSize`. I say we co-opt that block for checking the `prctl` result on a common path. See new commit?
>
> I don't like `get_current_sve_vector_length` returning `-1`. IMO if you cannot use SVE calling it makes no sense.
> I see its doc mentions a negative result: https://github.com/openjdk/jdk/blob/b8233989e7605268dda908e6b639ca373789792b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp#L58-L62

Well, yes. But I don't quite get what are you suggesting? AFAICS, we don't know we are in `prctl`-is-forbidden mess until we actually try to do it in `get_current_sve_vector_length()`. Then we have to deal with the consequences of `prctl` returning `-1`, which is what this PR does.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22479#discussion_r1866070291


More information about the hotspot-dev mailing list