RFR: 8310656: RISC-V: __builtin___clear_cache can fail silently. [v2]

Robbin Ehn rehn at openjdk.org
Fri Jun 30 08:56:02 UTC 2023


> Hi, please consider.
> 
> We recently had a bug where user were missing permissions to use this syscall.
> Which caused crashing on, according to hs_err on things like "addi x11, x24, 0" with SIGILL.
> If it fails it is even possible to execute valid but 'old' instruction which may not lead to a crash, instead the program misbehaves.
> 
> To avoid this mess I suggest that we first test the syscall during vm init and we use it directly.
> This way we can make sure it never fails.
> 
> Tested failing syscall with qemu, tested t1 in qemu, t1 on jh7110 in-progress.

Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:

  added back data barrier
  
  Signed-off-by: Robbin Ehn <rehn at rivosinc.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14670/files
  - new: https://git.openjdk.org/jdk/pull/14670/files/fe139d58..6b6e2dd9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14670&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14670&range=00-01

  Stats: 6 lines in 1 file changed: 2 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14670.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14670/head:pull/14670

PR: https://git.openjdk.org/jdk/pull/14670


More information about the hotspot-dev mailing list