Re: [PATCH] x86/setup: do not include kexec_handover.h from asm/setup.h

Mike Rapoport <[email protected]>
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed, Jul 01, 2026 at 09:57:14AM -0700, Borislav Petkov wrote:
> On Wed, Jul 01, 2026 at 05:15:33PM +0200, Pratyush Yadav wrote:
> > From: "Pratyush Yadav (Google)" <[email protected]>
> > 
> > x86 asm/setup.h includes linux/kexec_handover.h. This is because it is
> > used by setup.c and kaslr.c. But this inclusion is problematic. The
> > header is included in many places, so it results in the KHO header being
> > propagated there. Also, the setup header is used by realmode code. If
> > KHO header includes things like mm.h, it causes a big dump of
> > compliation failures.
> 
> This is exactly why we are trying hard to block people from using more linux/
> namespace headers in the decompressor code. Please split it and put only the
> bits that are needed by the decompressor into a header in
> arch/x86/include/asm/shared/ and use that in the decompressor.
> 
> There are examples there.

The examples there are really x86 specific.
KHO needs decompressor to recognise 'struct kho_scratch' that's defined in
include/linux/kexec_handover.h

I see there's a duplicated 'struct efi_unaccepted_memory' for decompressor
needs, should KHO do the same for 'struct kho_scratch'?

-- 
Sincerely yours,
Mike.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.