RFR: 8277204: Implementation of JEP 8264130: PAC-RET protection for Linux/AArch64 [v10]

Andrew Haley aph at openjdk.java.net
Mon Dec 13 10:00:18 UTC 2021


On Mon, 13 Dec 2021 09:50:26 GMT, Alan Hayward <duke at openjdk.java.net> wrote:

> You can support one without the other. The architecture allows you to have one without the other. The GCC flag is an enum of "none|standard|pac-ret[+leaf]|bti", with some of them changing depending on which cpu you specify to -mcpu (8.0,8.3,8.5 etc). Clang has the same flags. 

OK, so we have a precedent.

> If your system had both, the only scenario I could see for only wanting just one would be for test/dev purposes. In a real production scenario you would want everything the system supports or nothing.

Yes.

> An earlier version of my code had a UseBranchProtection="pac|bti|pac+bti|all|none" style option

That sounds great.

It seems to me that following the GCC/Clang precedent is the wisest thing we could do. I can see no possible advantage in diverging: it only confuses programmers.

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

PR: https://git.openjdk.java.net/jdk/pull/6334



More information about the build-dev mailing list