[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191214221419.GA314531@rani.riverdale.lan>
Date: Sat, 14 Dec 2019 17:14:20 -0500
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: Arvind Sankar <nivedita@...m.mit.edu>,
Ard Biesheuvel <ardb@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-efi <linux-efi@...r.kernel.org>,
Hans de Goede <hdegoede@...hat.com>,
Matthew Garrett <matthewgarrett@...gle.com>,
Ingo Molnar <mingo@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 05/10] efi/libstub: distinguish between native/mixed not
32/64 bit
On Sat, Dec 14, 2019 at 09:30:08PM +0000, Ard Biesheuvel wrote:
> On Sat, 14 Dec 2019 at 22:17, Arvind Sankar <nivedita@...m.mit.edu> wrote:
> >
> > Maybe just do
> > if (sizeof(at) < sizeof(__ret))
> > __ret = (__typeof__(__ret))(uintptr_t)at;
> > else
> > __ret = (__typeof__(__ret))at;
> > That should cover most of the cases.
>
> But the compiler will still be unhappy about the else clause if __ret
> is a pointer type, since we'll be casting an u32 to a pointer,
Ugh, yeah it complains even though it can tell at compile time that that
branch isn't taken.
Powered by blists - more mailing lists