[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jKkvs_DLDpr3T1pwsd-EO4PHm_o6swJEktBJP6XyVUv6A@mail.gmail.com>
Date: Fri, 6 May 2016 08:21:10 -0700
From: Kees Cook <keescook@...omium.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"H. Peter Anvin" <hpa@...or.com>, Dave Young <dyoung@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Denys Vlasenko <dvlasenk@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
Brian Gerst <brgerst@...il.com>,
Andy Lutomirski <luto@...capital.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Baoquan He <bhe@...hat.com>, Yinghai Lu <yinghai@...nel.org>,
Vivek Goyal <vgoyal@...hat.com>,
"linux-tip-commits@...r.kernel.org"
<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/boot] x86/boot: Clean up pointer casting
On Fri, May 6, 2016 at 3:10 AM, Ingo Molnar <mingo@...nel.org> wrote:
>
> * Borislav Petkov <bp@...en8.de> wrote:
>
>> This can be simplified even further:
>>
>> ---
>> From: Borislav Petkov <bp@...e.de>
>> Date: Fri, 6 May 2016 10:43:21 +0200
>> Subject: [PATCH] x86/boot: Simplify pointer casting in
>> choose_random_location()
>>
>> Pass them down as unsigned long directly and get rid of more casting and
>> assignments.
>>
>> Signed-off-by: Borislav Petkov <bp@...e.de>
>> Cc: Kees Cook <keescook@...omium.org>
>
>> arch/x86/boot/compressed/misc.h | 8 ++++----
>> 3 files changed, 12 insertions(+), 16 deletions(-)
>
> Great, thanks!
Thanks! Yeah, I did that originally, but then extract_kernel() was
filled with casts, so I took a stab at it. I do prefer the casts being
done in extract_kernel(), though. I was just worried Ingo won't like
it. :)
-Kees
--
Kees Cook
Chrome OS & Brillo Security
Powered by blists - more mailing lists