News: 0001505956

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

GCC 15 Adds Option For Arm Guarded Control Stack "GCS" Code Generation

([GNU] 5 Hours Ago Guarded Control Stack)


[1]GCC 15 feature development is [2]soon wrapping up to focus on bug fixing before releasing GCC 15.1 as stable in the early months of 2025. One of the latest features to make it in the compiler codebase is code generation support around Arm Guarded Control Stack (GCS) functionality.

Arm introduced Guarded Control Stack with their 2022 CPU extensions and is a means of helping mitigate against some return object programming (ROP) attacks. As explained in the [3]Arm documentation :

"A GCS is a protected region of virtual address space allocated by software. When the processor executes a Branch with Link instruction, such as BL, the return address is pushed onto the GCS as well as being written into the Link Register (LR). On a procedure return, the latest stored return address is popped from the GCS. The processor either compares the popped value with the LR, or uses the popped value directly...To prevent accidental or malicious changes to the GCS, a new Stage 1 permission is introduced. This permission allows reads by software, but restricts writes to either GCSPUSH instructions or as a side-effect of executing a BL."

With the latest GCC patches merged on Thursday, there is now a "-mbranch-protection=gcs" option supported. This enables Arm Guarded Control Stack compatible code generation. This branch protection option is the same one that can also be set to Branch Target Identification "BTI" for earlier Arm processors.

The -mbranch-protection=gcs option is introduced via [4]this commit while related Arm GCS patches were also merged on Thursday and will all be part of the upcoming GCC 15.1 release.



[1] https://www.phoronix.com/search/GCC+15

[2] https://www.phoronix.com/news/GCC-15-Stage-1-Ends-November

[3] https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022

[4] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=56ded80b96b0f65327694912a6affbfc75e4e30d



phoronix

Glogg (a traditional Scandinavian holiday drink):
fifth of dry red wine
fifth of Aquavit
1 and 1/2 inch piece of cinnamon
10 cardamom seeds
1 cup raisins
4 dried figs
1 cup blanched or flaked almonds
a few pieces of dried orange peel
5 cloves
1/2 lb. sugar cubes
Heat up the wine and hard stuff (which may be substituted with wine
for the faint of heart) in a big pot after adding all the other stuff EXCEPT
the sugar cubes. Just when it reaches boiling, put the sugar in a wire
strainer, moisten it in the hot brew, lift it out and ignite it with a match.
Dip the sugar several times in the liquid until it is all dissolved. Serve
hot in cups with a few raisins and almonds in each cup.
N.B. Aquavit may be hard to find and expensive to boot. Use it only
if you really have a deep-seated desire to be fussy, or if you are of Swedish
extraction.