On Mon, 16 Mar 2020 at 12:40, waddlesplash <waddlesplash@xxxxxxxxx> wrote:
On Mon, Mar 16, 2020, 11:58 AM Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
+static inline bool[...]
+validate_user_range(const void* addr, size_t size)
+{
+ // Validate that the address does not cross the kernel/user boundary.
+ if (IS_USER_ADDRESS(address))
+ return IS_USER_ADDRESS(address + size);
+ else
+ return !IS_USER_ADDRESS(address + size);
Superfluous and misleading else.
How so?