Re: [PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-30 Thread Sami Tolvanen
On Fri, Nov 27, 2020 at 4:15 AM Borislav Petkov wrote: > I think the proper fix is to fix the typedef to: > > typedef bool (*check_reserved_t)(u64 start, u64 end, enum e820_type > type); > > because > > * is_mmconf_reserved() is passing in E820_TYPE_RESERVED which is enum > e820_type >

Re: [PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-27 Thread Borislav Petkov
On Fri, Nov 13, 2020 at 10:26:54AM -0800, 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

Re: [PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-13 Thread Randy Dunlap
On 11/13/20 10:59 AM, Sami Tolvanen wrote: > On Fri, Nov 13, 2020 at 10:35 AM Randy Dunlap 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

Re: [PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-13 Thread Sami Tolvanen
On Fri, Nov 13, 2020 at 10:35 AM Randy Dunlap 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

Re: [PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-13 Thread Randy Dunlap
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 >

[PATCH] x86/e820: fix the function type for e820__mapped_all

2020-11-13 Thread Sami Tolvanen
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