cregit-Linux how code gets into the kernel

Release 4.14 arch/h8300/include/asm/uaccess.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_UACCESS_H

#define _ASM_UACCESS_H

#include <linux/string.h>


static inline __must_check unsigned long raw_copy_from_user(void *to, const void __user * from, unsigned long n) { if (__builtin_constant_p(n)) { switch(n) { case 1: *(u8 *)to = *(u8 __force *)from; return 0; case 2: *(u16 *)to = *(u16 __force *)from; return 0; case 4: *(u32 *)to = *(u32 __force *)from; return 0; } } memcpy(to, (const void __force *)from, n); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro119100.00%2100.00%
Total119100.00%2100.00%


static inline __must_check unsigned long raw_copy_to_user(void __user *to, const void *from, unsigned long n) { if (__builtin_constant_p(n)) { switch(n) { case 1: *(u8 __force *)to = *(u8 *)from; return 0; case 2: *(u16 __force *)to = *(u16 *)from; return 0; case 4: *(u32 __force *)to = *(u32 *)from; return 0; default: break; } } memcpy((void __force *)to, from, n); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Al Viro120100.00%2100.00%
Total120100.00%2100.00%

#define INLINE_COPY_FROM_USER #define INLINE_COPY_TO_USER #include <asm-generic/uaccess.h> #endif

Overall Contributors

PersonTokensPropCommitsCommitProp
Al Viro25999.62%266.67%
Greg Kroah-Hartman10.38%133.33%
Total260100.00%3100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.