lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86/e820: fix the function type for e820__mapped_all
On Fri, Nov 13, 2020 at 10:35 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 11/13/20 10:26 AM, Sami Tolvanen wrote:
> > e820__mapped_all is passed as a callback to is_mmconf_reserved, which
> > expects a function of type:
> >
> > typedef bool (*check_reserved_t)(u64 start, u64 end, unsigned type);
> >
> > This trips indirect call checking with Clang's Control-Flow Integrity
> > (CFI). Change the last argument from enum e820_type to unsigned to fix
> > the type mismatch.
>
> Hi,
>
> Kernel style is no raw unsigned -- use unsigned int or unsigned long, please.
>
> checkpatch should or could have found that issue.

It did, but the existing type definition for the callback in
pci/mmconfig-shared.c uses raw unsigned. I can add a patch to change
that to unsigned int as well, if you prefer.

Sami

\
 
 \ /
  Last update: 2020-11-13 20:00    [W:0.062 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site