Re: [tip:x86/boot] x86/boot: Clean up pointer casting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [tip:x86/boot] x86/boot: Clean up pointer casting
- From: Kees Cook <keescook@xxxxxxxxxxxx>
- Date: Fri, 6 May 2016 08:21:10 -0700
- Cc: Borislav Petkov <bp@xxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Dave Young <dyoung@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Denys Vlasenko <dvlasenk@xxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Brian Gerst <brgerst@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Baoquan He <bhe@xxxxxxxxxx>, Yinghai Lu <yinghai@xxxxxxxxxx>, Vivek Goyal <vgoyal@xxxxxxxxxx>, "linux-tip-commits@xxxxxxxxxxxxxxx" <linux-tip-commits@xxxxxxxxxxxxxxx>
- In-reply-to: <20160506101048.GA7325@gmail.com>
On Fri, May 6, 2016 at 3:10 AM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> * Borislav Petkov <bp@xxxxxxxxx> wrote:
>
>> This can be simplified even further:
>>
>> ---
>> From: Borislav Petkov <bp@xxxxxxx>
>> 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@xxxxxxx>
>> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
>
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]