[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202306231639.68955384A@keescook>
Date: Fri, 23 Jun 2023 16:45:15 -0700
From: Kees Cook <keescook@...omium.org>
To: Jeffrey Hugo <quic_jhugo@...cinc.com>
Cc: Julia Lawall <julia.lawall@...ia.fr>,
Manivannan Sadhasivam <mani@...nel.org>,
kernel-janitors@...r.kernel.org, mhi@...ts.linux.dev,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/26] bus: mhi: host: use array_size
On Fri, Jun 23, 2023 at 04:09:46PM -0600, Jeffrey Hugo wrote:
> Kees, would you please chime in and educate me here? I feel like I'm
> missing something important here.
The array_size() family will saturate at SIZE_MAX (rather than potentially
wrapping around). No allocator can fulfil a 18446744073709551615 byte
(18 exabyte) allocation. :) So the NULL return value will (hopefully)
trigger an error path.
--
Kees Cook
Powered by blists - more mailing lists