Re: [PATCH] of: Correctly annotate IMA kexec buffer functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 29, 2022 at 09:52:50AM +0000, Jonathan McDowell wrote:
> Below is on top of what was in tip; I can roll a v7 if preferred but
> I think seeing the fix on its own is clearer.

Yes, and you don't have to base it on top because, as I've said, I've
zapped your other patch there.

Once IMA folks are fine with that fix of yours I can take both, if they
wish so.

> ima_free_kexec_buffer() calls into memblock_phys_free() so must be
> annotated __meminit.

Why __meminit?

The very sparse comment over it says:

/* Used for MEMORY_HOTPLUG */
#define __meminit        __section(".meminit.text") __cold notrace \
                                                  __latent_entropy

so how does ima_free_kexec_buffer() have anything to do with
MEMORY_HOTPLUG?

It calls memblock_phys_free() which is __init_memblock.

Now __init_memblock is defined as

#define __init_memblock __meminit

for some CONFIG_ARCH_KEEP_MEMBLOCK thing so I guess that is the
connection.

But then the couple other functions which call into memblock are all
__init...

IOW, I probably am missing something...

Thx.

-- 
Regards/Gruss,
    Boris.

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux