[0/4] x86/ibt: Implement FineIBT

Message ID 20221027092812.185993858@infradead.org
Headers
Series x86/ibt: Implement FineIBT |

Message

Peter Zijlstra Oct. 27, 2022, 9:28 a.m. UTC
  Hi all,

Updated FineIBT series; I've (hopefully) incorporated all feedback from last
time with the notable exception of the Kconfig CFI default -- I'm not sure we
want to add to the Kconfig space for this, also what would a distro do with it.

Anyway; please have a look, I'm hoping to merge this soonish so we can make the
next cycle.
  

Comments

David Laight Oct. 28, 2022, 11:01 a.m. UTC | #1
From: Peter Zijlstra
> Sent: 27 October 2022 10:28
> 
> Hi all,
> 
> Updated FineIBT series; I've (hopefully) incorporated all feedback from last
> time with the notable exception of the Kconfig CFI default -- I'm not sure we
> want to add to the Kconfig space for this, also what would a distro do with it.
> 
> Anyway; please have a look, I'm hoping to merge this soonish so we can make the
> next cycle.

Is there a test to ensure that modules are actually compiled
with the required endbra, function prologue gap (etc).
Having the module load fail is somewhat better than a crash.

It is almost certainly quite easy to generate an out of tree module that
is missing all of those (even if compiled at the same time as the kernel).
(Never mind issues with modules that contain binary blobs.)

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
  
Peter Zijlstra Oct. 28, 2022, 12:03 p.m. UTC | #2
On Fri, Oct 28, 2022 at 11:01:08AM +0000, David Laight wrote:
> From: Peter Zijlstra
> > Sent: 27 October 2022 10:28
> > 
> > Hi all,
> > 
> > Updated FineIBT series; I've (hopefully) incorporated all feedback from last
> > time with the notable exception of the Kconfig CFI default -- I'm not sure we
> > want to add to the Kconfig space for this, also what would a distro do with it.
> > 
> > Anyway; please have a look, I'm hoping to merge this soonish so we can make the
> > next cycle.
> 
> Is there a test to ensure that modules are actually compiled
> with the required endbra, function prologue gap (etc).
> Having the module load fail is somewhat better than a crash.
> 
> It is almost certainly quite easy to generate an out of tree module that
> is missing all of those (even if compiled at the same time as the kernel).
> (Never mind issues with modules that contain binary blobs.)

There is not; it is always possible to load a 'malformed' module. We
have no sanity checking on modules. It is no different from any other
binary compatilibity issue; if you build a dud module, you get to keep
the pieces.