# Re: \[PATCH v26 23/30\] x86/cet/shstk: Handle thread shadow stack

- From: Borislav Petkov \<bp@alien8.de\>
- Date: 2021-05-11 17:09:51 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2021/05/1372309
- Thread: https://ratatoskr.run/linux-doc/2021/04/6352121/t.md

```text
On Mon, May 10, 2021 at 03:57:56PM -0700, Yu, Yu-cheng wrote:
> So this struct will be:
>
> struct thread_shstk {
> 	u64 shstk_base;
> 	u64 shstk_size;
> 	u64 locked:1;
> 	u64 ibt:1;
> };
> 
> Ok?

Pretty much.

You can even remove the "shstk_" from the members and when you call the
pointer "shstk", accessing the members will read

	shstk->base
	shstk->size
	...

and all is organic and readable :)

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette
```
