Staging
v0.5.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: 614124bea77e452aa6df7a8714e8bc820b489922 authored by Linus Torvalds on 06 June 2021, 22:47:27 UTC
Linux 5.13-rc5
Tip revision: 614124b
maccess.c
// SPDX-License-Identifier: GPL-2.0-only

#include <linux/uaccess.h>
#include <linux/kernel.h>

bool copy_from_kernel_nofault_allowed(const void *unsafe_src, size_t size)
{
	/* highest bit set means kernel space */
	return (unsigned long)unsafe_src >> (BITS_PER_LONG - 1);
}
back to top