Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thank you.

I would rather see maybe an annotation instructing the compiler and the runtime not to move allocated objects:

  @UnmovableMemory
  byte[] bytes = new byte[...];


Yeah like https://doc.rust-lang.org/std/pin/ Maybe you could propose the idea to the jdk tracker or mailing lists?https://mail.openjdk.java.net/pipermail/jdk-dev/2022-Februar...


All my life, large corporations did nothing but ignore me. I basically gave up at this point.

You are right - something like Pin in rust. It will be a new language feature, there are backward compatibility aspects, and the fact that it will need to be correctly done by all implementations (or it would fail its stated purpose). DirectByteBuffer provides a certain guarantee as it is.

On the other hand, the secrets might still be leaked via paging, so even this solution is a partial one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: