Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH] x86/ibt: Implement FineIBT | Date | Tue, 18 Oct 2022 21:27:15 +0000 |
| |
From: Joao Moreira > Sent: 18 October 2022 16:58 > > > Does the hash value for kCFI only depend on the function type? > > Or is there something like a attribute that can also be included? > > Hi David -- does this sound like what you are asking about? > > https://github.com/ClangBuiltLinux/linux/issues/1736 > > If yes, then it is something in our todo list :) I think Sami is > handling it.
That sort of thing. As well as helping restrict what can be called from where, with reasonable unique CFI hashes something like objtool can work out which functions are callable from which call sites. This should give the raw data than can be used for static stack-depth analysis.
Possibly even the compiler could output the 'called function xxx at stack offset nnn' data.
From some experience doing static stack depth analysis many years ago (on a code base that had no recursion and very few indirect calls) the result will be unexpected. I suspect the kernel stack is nothing like big enough for the worst case error path!
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)
| |