__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __PARISC_UACCESS_H
#define __PARISC_UACCESS_H
/*
* User space memory access functions
*/
#include <asm/page.h>
#include <asm/cache.h>
#include <asm/extable.h>
#include <linux/bug.h>
#include <linux/string.h>
#define TASK_SIZE_MAX DEFAULT_TASK_SIZE
#include <asm/pgtable.h>
#include <asm-generic/access_ok.h>
#define put_user __put_user
#define get_user __get_user
#if !defined(CONFIG_64BIT)
#define LDD_USER(sr, val, ptr) __get_user_asm64(sr, val, ptr)
#define STD_USER(sr, x, ptr) __put_user_asm64(sr, x, ptr)
#else
#define LDD_USER(sr, val, ptr) __get_user_asm(sr, val, "ldd", ptr)
#define STD_USER(sr, x, ptr) __put_user_asm(sr, "std", x, ptr)
#endif
#define __get_user_internal(sr, val, ptr) \
({ \
ASM_EXCEPTIONTABLE_VAR(__gu_err); \
\
switch (sizeof(*(ptr))) { \
case 1: __get_user_asm(sr, val, "ldb", ptr); break; \
case 2: __get_user_asm(sr, val, "ldh", ptr); break; \
case 4: __get_user_asm(sr, val, "ldw", ptr); break; \
case 8: LDD_USER(sr, val, ptr); break; \
default: BUILD_BUG(); \
} \
\
__gu_err; \
})
#define __get_user(val, ptr) \
({ \
__get_user_internal(SR_USER, val, ptr); \
})
#define __get_user_asm(sr, val, ldx, ptr) \
{ \
register long __gu_val; \
\
__asm__("1: " ldx " 0(%%sr%2,%3),%0\n" \
"9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
: "=r"(__gu_val), "+r"(__gu_err) \
: "i"(sr), "r"(ptr)); \
\
(val) = (__force __typeof__(*(ptr))) __gu_val; \
}
#define __get_kernel_nofault(dst, src, type, err_label) \
{ \
type __z; \
long __err; \
__err = __get_user_internal(SR_KERNEL, __z, (type *)(src)); \
if (unlikely(__err)) \
goto err_label; \
else \
*(type *)(dst) = __z; \
}
#if !defined(CONFIG_64BIT)
#define __get_user_asm64(sr, val, ptr) \
{ \
union { \
unsigned long long l; \
__typeof__(*(ptr)) t; \
} __gu_tmp; \
\
__asm__(" copy %%r0,%R0\n" \
"1: ldw 0(%%sr%2,%3),%0\n" \
"2: ldw 4(%%sr%2,%3),%R0\n" \
"9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%1") \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%1") \
: "=&r"(__gu_tmp.l), "+r"(__gu_err) \
: "i"(sr), "r"(ptr)); \
\
(val) = __gu_tmp.t; \
}
#endif /* !defined(CONFIG_64BIT) */
#define __put_user_internal(sr, x, ptr) \
({ \
ASM_EXCEPTIONTABLE_VAR(__pu_err); \
\
switch (sizeof(*(ptr))) { \
case 1: __put_user_asm(sr, "stb", x, ptr); break; \
case 2: __put_user_asm(sr, "sth", x, ptr); break; \
case 4: __put_user_asm(sr, "stw", x, ptr); break; \
case 8: STD_USER(sr, x, ptr); break; \
default: BUILD_BUG(); \
} \
\
__pu_err; \
})
#define __put_user(x, ptr) \
({ \
__typeof__(&*(ptr)) __ptr = ptr; \
__typeof__(*(__ptr)) __x = (__typeof__(*(__ptr)))(x); \
__put_user_internal(SR_USER, __x, __ptr); \
})
#define __put_kernel_nofault(dst, src, type, err_label) \
{ \
type __z = *(type *)(src); \
long __err; \
__err = __put_user_internal(SR_KERNEL, __z, (type *)(dst)); \
if (unlikely(__err)) \
goto err_label; \
}
/*
* The "__put_user/kernel_asm()" macros tell gcc they read from memory
* instead of writing. This is because they do not write to any memory
* gcc knows about, so there are no aliasing issues. These macros must
* also be aware that fixups are executed in the context of the fault,
* and any registers used there must be listed as clobbers.
* The register holding the possible EFAULT error (ASM_EXCEPTIONTABLE_REG)
* is already listed as input and output register.
*/
#define __put_user_asm(sr, stx, x, ptr) \
__asm__ __volatile__ ( \
"1: " stx " %1,0(%%sr%2,%3)\n" \
"9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
: "+r"(__pu_err) \
: "r"(x), "i"(sr), "r"(ptr))
#if !defined(CONFIG_64BIT)
#define __put_user_asm64(sr, __val, ptr) do { \
__asm__ __volatile__ ( \
"1: stw %1,0(%%sr%2,%3)\n" \
"2: stw %R1,4(%%sr%2,%3)\n" \
"9:\n" \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b, "%0") \
ASM_EXCEPTIONTABLE_ENTRY_EFAULT(2b, 9b, "%0") \
: "+r"(__pu_err) \
: "r"(__val), "i"(sr), "r"(ptr)); \
} while (0)
#endif /* !defined(CONFIG_64BIT) */
/*
* Complex access routines -- external declarations
*/
extern long strncpy_from_user(char *, const char __user *, long);
extern __must_check unsigned lclear_user(void __user *, unsigned long);
extern __must_check long strnlen_user(const char __user *src, long n);
/*
* Complex access routines -- macros
*/
#define clear_user lclear_user
#define __clear_user lclear_user
unsigned long __must_check raw_copy_to_user(void __user *dst, const void *src,
unsigned long len);
unsigned long __must_check raw_copy_from_user(void *dst, const void __user *src,
unsigned long len);
#define INLINE_COPY_TO_USER
#define INLINE_COPY_FROM_USER
#endif /* __PARISC_UACCESS_H */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Kbuild | File | 194 B | 0644 |
|
| alternative.h | File | 2.01 KB | 0644 |
|
| asm-offsets.h | File | 35 B | 0644 |
|
| asmregs.h | File | 2.42 KB | 0644 |
|
| assembly.h | File | 13.98 KB | 0644 |
|
| atomic.h | File | 5.97 KB | 0644 |
|
| barrier.h | File | 2.5 KB | 0644 |
|
| bitops.h | File | 5.32 KB | 0644 |
|
| bug.h | File | 2.56 KB | 0644 |
|
| cache.h | File | 2.28 KB | 0644 |
|
| cacheflush.h | File | 3.08 KB | 0644 |
|
| cachetype.h | File | 178 B | 0644 |
|
| checksum.h | File | 4.6 KB | 0644 |
|
| cmpxchg.h | File | 3.67 KB | 0644 |
|
| compat.h | File | 3.3 KB | 0644 |
|
| compat_ucontext.h | File | 591 B | 0644 |
|
| current.h | File | 435 B | 0644 |
|
| delay.h | File | 533 B | 0644 |
|
| dma-mapping.h | File | 996 B | 0644 |
|
| dma.h | File | 5.65 KB | 0644 |
|
| dwarf.h | File | 456 B | 0644 |
|
| eisa_bus.h | File | 492 B | 0644 |
|
| eisa_eeprom.h | File | 4.22 KB | 0644 |
|
| elf.h | File | 14.15 KB | 0644 |
|
| extable.h | File | 2.17 KB | 0644 |
|
| fixmap.h | File | 2.2 KB | 0644 |
|
| floppy.h | File | 6.05 KB | 0644 |
|
| ftrace.h | File | 805 B | 0644 |
|
| futex.h | File | 2.65 KB | 0644 |
|
| grfioctl.h | File | 2.69 KB | 0644 |
|
| hardirq.h | File | 976 B | 0644 |
|
| hardware.h | File | 4.14 KB | 0644 |
|
| hash.h | File | 5.07 KB | 0644 |
|
| hugetlb.h | File | 1004 B | 0644 |
|
| io.h | File | 6.42 KB | 0644 |
|
| irq.h | File | 1.14 KB | 0644 |
|
| irqflags.h | File | 1.22 KB | 0644 |
|
| jump_label.h | File | 1.06 KB | 0644 |
|
| kbdleds.h | File | 477 B | 0644 |
|
| kexec.h | File | 827 B | 0644 |
|
| kfence.h | File | 865 B | 0644 |
|
| kgdb.h | File | 1.32 KB | 0644 |
|
| kprobes.h | File | 1.31 KB | 0644 |
|
| ldcw.h | File | 2.49 KB | 0644 |
|
| led.h | File | 1.18 KB | 0644 |
|
| linkage.h | File | 738 B | 0644 |
|
| mman.h | File | 808 B | 0644 |
|
| mmu.h | File | 199 B | 0644 |
|
| mmu_context.h | File | 2.37 KB | 0644 |
|
| mmzone.h | File | 202 B | 0644 |
|
| module.h | File | 527 B | 0644 |
|
| page.h | File | 5.09 KB | 0644 |
|
| parisc-device.h | File | 1.93 KB | 0644 |
|
| parport.h | File | 358 B | 0644 |
|
| pci.h | File | 5.71 KB | 0644 |
|
| pdc.h | File | 4.39 KB | 0644 |
|
| pdc_chassis.h | File | 14.4 KB | 0644 |
|
| pdcpat.h | File | 16.7 KB | 0644 |
|
| perf.h | File | 1.89 KB | 0644 |
|
| perf_event.h | File | 152 B | 0644 |
|
| pgalloc.h | File | 1.4 KB | 0644 |
|
| pgtable.h | File | 17.18 KB | 0644 |
|
| prefetch.h | File | 1.12 KB | 0644 |
|
| processor.h | File | 10.65 KB | 0644 |
|
| psw.h | File | 2.41 KB | 0644 |
|
| ptrace.h | File | 1.6 KB | 0644 |
|
| ropes.h | File | 9.86 KB | 0644 |
|
| rt_sigframe.h | File | 410 B | 0644 |
|
| runway.h | File | 183 B | 0644 |
|
| seccomp.h | File | 651 B | 0644 |
|
| sections.h | File | 332 B | 0644 |
|
| serial.h | File | 124 B | 0644 |
|
| shmparam.h | File | 968 B | 0644 |
|
| signal.h | File | 348 B | 0644 |
|
| smp.h | File | 1.18 KB | 0644 |
|
| socket.h | File | 310 B | 0644 |
|
| sparsemem.h | File | 345 B | 0644 |
|
| special_insns.h | File | 1.6 KB | 0644 |
|
| spinlock.h | File | 3.4 KB | 0644 |
|
| spinlock_types.h | File | 974 B | 0644 |
|
| string.h | File | 247 B | 0644 |
|
| superio.h | File | 3.25 KB | 0644 |
|
| switch_to.h | File | 332 B | 0644 |
|
| syscall.h | File | 1.44 KB | 0644 |
|
| text-patching.h | File | 445 B | 0644 |
|
| thread_info.h | File | 2.91 KB | 0644 |
|
| timex.h | File | 403 B | 0644 |
|
| tlb.h | File | 288 B | 0644 |
|
| tlbflush.h | File | 1.94 KB | 0644 |
|
| topology.h | File | 402 B | 0644 |
|
| traps.h | File | 666 B | 0644 |
|
| uaccess.h | File | 4.88 KB | 0644 |
|
| ucontext.h | File | 327 B | 0644 |
|
| unistd.h | File | 4.78 KB | 0644 |
|
| unwind.h | File | 2.66 KB | 0644 |
|
| vdso.h | File | 598 B | 0644 |
|
| video.h | File | 328 B | 0644 |
|
| vmalloc.h | File | 96 B | 0644 |
|