Staging
v0.5.1
swh:1:snp:a902887e4be9191b7c6c4406aa06b31c1ce2c7cc
Raw File
Tip revision: a111daf0c53ae91e71fd2bfe7497862d14132e3e authored by Linus Torvalds on 19 June 2022, 20:06:47 UTC
Linux 5.19-rc3
Tip revision: a111daf
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