[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <79a85431-a505-795d-1e72-76628df987af@suse.com>
Date: Fri, 19 Nov 2021 09:24:16 +0100
From: Jan Beulich <jbeulich@...e.com>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>
Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
Stefano Stabellini <stefano.stabellini@...inx.com>,
stable@...r.kernel.org, Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH] xen: detect uninitialized xenbus in xenbus_init
On 18.11.2021 23:24, Boris Ostrovsky wrote:
> On 11/18/21 4:00 PM, Stefano Stabellini wrote:
>>
>> /*
>> * Avoid truncation on 32-bit.
>> * TODO: handle addresses >= 4G
>> */
>> if ( v >= ~0UL ) {
>> err = -EINVAL;
>> goto out_error;
>> }
>
>
> Since this is only relevant to 32-bit kernels then "#if BITS_PER_LONG == 32".
Plus then > instead of >= (thus also making the comment actually decribe
the code) and ULONG_MAX instead of ~0UL, I would say.
Jan
Powered by blists - more mailing lists