Re: [PATCH 1/8] x86,kcfi: Fix EXPORT_SYMBOL vs kCFI
From: Peter Zijlstra
Date: Tue Nov 05 2024 - 09:59:02 EST
On Tue, Nov 05, 2024 at 06:32:12AM -0800, Christoph Hellwig wrote:
> On Tue, Nov 05, 2024 at 03:27:20PM +0100, Peter Zijlstra wrote:
> > > I don't think that is the case at all. The is a relatively small number
> > > of exported symbols that are called indirectly. I'd much rather mark
> > > those explicitly.
> >
> > I'm not claiming they have their address taken -- just saying that
> > traditionally this has always been a valid thing to do.
> >
> > Anyway, I raised this point last time, and I think back then the
> > consensus was to explicitly mark those you should not be able to call.
>
> Who came to that consensus? There really is just a relatively well
The people who found that thread.
> bounded number of functions that are used as either default methods
> or as ready made callbacks. Everything else has no business being
> called indirectly. While disallowing this might be a bit of work,
> I think it would be a great security improvement.
Well, we don't disagree. But since most of the EXPORT'ed functions are
done in C, we need something that works there too.
I think the idea was that we add EXPORT_SYMBOL{,_GPL}_SEALED() and go
convert everything over to that.
Anyway, 0-day just informed me that this patch has a wee build issue :-/
That robot always waits until after you post to tell you.