Staging
v0.5.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: 4fe89d07dcc2804c8b562f6c7896a45643d34b2f authored by Linus Torvalds on 02 October 2022, 21:09:07 UTC
Linux 6.0
Tip revision: 4fe89d0
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