From: Randy Dunlap <rdunlap@infradead.org>
To: Sami Tolvanen <samitolvanen@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Kees Cook <keescook@chromium.org>, X86 ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Sedat Dilek <sedat.dilek@gmail.com>
Subject: Re: [PATCH] x86/e820: fix the function type for e820__mapped_all
Date: Fri, 13 Nov 2020 11:01:32 -0800 [thread overview]
Message-ID: <352fcf22-aa5d-8f4b-686e-44df25f3ff4a@infradead.org> (raw)
In-Reply-To: <CABCJKueALv=zBf3MYwN-EaeGxN3py-tReb3sVaqe9caCt8cJwA@mail.gmail.com>
On 11/13/20 10:59 AM, Sami Tolvanen wrote:
> 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.
Hm. :)
Well, yes, I prefer, but I can't require it.
thanks for the explanation.
--
~Randy
next prev parent reply other threads:[~2020-11-13 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 18:26 Sami Tolvanen
2020-11-13 18:34 ` Randy Dunlap
2020-11-13 18:59 ` Sami Tolvanen
2020-11-13 19:01 ` Randy Dunlap [this message]
2020-11-27 12:15 ` Borislav Petkov
2020-11-30 19:16 ` Sami Tolvanen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=352fcf22-aa5d-8f4b-686e-44df25f3ff4a@infradead.org \
--to=rdunlap@infradead.org \
--cc=bp@alien8.de \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=samitolvanen@google.com \
--cc=sedat.dilek@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®