Reply-To: kernel-hardening@lists.openwall.com Date: Thu, 28 Jul 2016 19:02:40 +0000 From: Jason Cooper Message-ID: <20160728190240.GS4541@io.lakedaemon.net> References: <1469471141-25669-1-git-send-email-william.c.roberts@intel.com> <20160726030201.6775-1-jason@lakedaemon.net> <20160726033032.GD4541@io.lakedaemon.net> <20160726170052.GI4541@io.lakedaemon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [kernel-hardening] Re: [RFC patch 1/6] random: Simplify API for random address requests To: Kees Cook Cc: "Roberts, William C" , linux-mm@vger.kernel.org, LKML , "kernel-hardening@lists.openwall.com" , Russell King - ARM Linux , Andrew Morton , Theodore Ts'o , Arnd Bergmann , Greg KH , Catalin Marinas , Will Deacon , Ralf Baechle , "benh@kernel.crashing.org" , Paul Mackerras , Michael Ellerman , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , Al Viro , Nick Kralevich , Jeffrey Vander Stoep , alyzyn@android.com, Daniel Cashman List-ID: On Tue, Jul 26, 2016 at 10:07:22AM -0700, Kees Cook wrote: > On Tue, Jul 26, 2016 at 10:00 AM, Jason Cooper wrote: ... > > if (range == 0 || ULONG_MAX - range < start) > > return start; > > Should it "abort" like this? I was thinking just cap the range, something like: > > if (range > ULONG_MAX - start) > range = ULONG_MAX - start yes, will do. thx, Jason.