__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ 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-only */
#ifndef __ASM_UACCESS_ASM_H__
#define __ASM_UACCESS_ASM_H__
#include <asm/asm-offsets.h>
#include <asm/domain.h>
#include <asm/page.h>
#include <asm/thread_info.h>
.macro csdb
#ifdef CONFIG_THUMB2_KERNEL
.inst.w 0xf3af8014
#else
.inst 0xe320f014
#endif
.endm
.macro check_uaccess, addr:req, size:req, limit:req, tmp:req, bad:req
#ifndef CONFIG_CPU_USE_DOMAINS
adds \tmp, \addr, #\size - 1
sbcscc \tmp, \tmp, \limit
bcs \bad
#ifdef CONFIG_CPU_SPECTRE
movcs \addr, #0
csdb
#endif
#endif
.endm
.macro uaccess_mask_range_ptr, addr:req, size:req, limit:req, tmp:req
#ifdef CONFIG_CPU_SPECTRE
sub \tmp, \limit, #1
subs \tmp, \tmp, \addr @ tmp = limit - 1 - addr
addhs \tmp, \tmp, #1 @ if (tmp >= 0) {
subshs \tmp, \tmp, \size @ tmp = limit - (addr + size) }
movlo \addr, #0 @ if (tmp < 0) addr = NULL
csdb
#endif
.endm
#if defined(CONFIG_CPU_SW_DOMAIN_PAN)
.macro uaccess_disable, tmp, isb=1
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_DISABLE
mcr p15, 0, \tmp, c3, c0, 0 @ Set domain register
.if \isb
instr_sync
.endif
.endm
.macro uaccess_enable, tmp, isb=1
/*
* Whenever we re-enter userspace, the domains should always be
* set appropriately.
*/
mov \tmp, #DACR_UACCESS_ENABLE
mcr p15, 0, \tmp, c3, c0, 0
.if \isb
instr_sync
.endif
.endm
#elif defined(CONFIG_CPU_TTBR0_PAN)
.macro uaccess_disable, tmp, isb=1
/*
* Disable TTBR0 page table walks (EDP0 = 1), use the reserved ASID
* from TTBR1 (A1 = 1) and enable TTBR1 page table walks for kernel
* addresses by reducing TTBR0 range to 32MB (T0SZ = 7).
*/
mrc p15, 0, \tmp, c2, c0, 2 @ read TTBCR
orr \tmp, \tmp, #TTBCR_EPD0 | TTBCR_T0SZ_MASK
orr \tmp, \tmp, #TTBCR_A1
mcr p15, 0, \tmp, c2, c0, 2 @ write TTBCR
.if \isb
instr_sync
.endif
.endm
.macro uaccess_enable, tmp, isb=1
/*
* Enable TTBR0 page table walks (T0SZ = 0, EDP0 = 0) and ASID from
* TTBR0 (A1 = 0).
*/
mrc p15, 0, \tmp, c2, c0, 2 @ read TTBCR
bic \tmp, \tmp, #TTBCR_EPD0 | TTBCR_T0SZ_MASK
bic \tmp, \tmp, #TTBCR_A1
mcr p15, 0, \tmp, c2, c0, 2 @ write TTBCR
.if \isb
instr_sync
.endif
.endm
#else
.macro uaccess_disable, tmp, isb=1
.endm
.macro uaccess_enable, tmp, isb=1
.endm
#endif
#if defined(CONFIG_CPU_SW_DOMAIN_PAN) || defined(CONFIG_CPU_USE_DOMAINS)
#define DACR(x...) x
#else
#define DACR(x...)
#endif
#ifdef CONFIG_CPU_TTBR0_PAN
#define PAN(x...) x
#else
#define PAN(x...)
#endif
/*
* Save the address limit on entry to a privileged exception.
*
* If we are using the DACR for kernel access by the user accessors
* (CONFIG_CPU_USE_DOMAINS=y), always reset the DACR kernel domain
* back to client mode, whether or not \disable is set.
*
* If we are using SW PAN, set the DACR user domain to no access
* if \disable is set.
*/
.macro uaccess_entry, tsk, tmp0, tmp1, tmp2, disable
DACR( mrc p15, 0, \tmp0, c3, c0, 0)
DACR( str \tmp0, [sp, #SVC_DACR])
PAN( mrc p15, 0, \tmp0, c2, c0, 2)
PAN( str \tmp0, [sp, #SVC_TTBCR])
.if \disable && IS_ENABLED(CONFIG_CPU_SW_DOMAIN_PAN)
/* kernel=client, user=no access */
mov \tmp2, #DACR_UACCESS_DISABLE
mcr p15, 0, \tmp2, c3, c0, 0
instr_sync
.elseif IS_ENABLED(CONFIG_CPU_USE_DOMAINS)
/* kernel=client */
bic \tmp2, \tmp0, #domain_mask(DOMAIN_KERNEL)
orr \tmp2, \tmp2, #domain_val(DOMAIN_KERNEL, DOMAIN_CLIENT)
mcr p15, 0, \tmp2, c3, c0, 0
instr_sync
.endif
.endm
/* Restore the user access state previously saved by uaccess_entry */
.macro uaccess_exit, tsk, tmp0, tmp1
DACR( ldr \tmp0, [sp, #SVC_DACR])
DACR( mcr p15, 0, \tmp0, c3, c0, 0)
PAN( ldr \tmp0, [sp, #SVC_TTBCR])
PAN( mcr p15, 0, \tmp0, c2, c0, 2)
.endm
#undef DACR
#undef PAN
#endif /* __ASM_UACCESS_ASM_H__ */
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| hardware | Folder | 0755 |
|
|
| mach | Folder | 0755 |
|
|
| vdso | Folder | 0755 |
|
|
| xen | Folder | 0755 |
|
|
| Kbuild | File | 186 B | 0644 |
|
| arch_gicv3.h | File | 6.25 KB | 0644 |
|
| arch_timer.h | File | 3.05 KB | 0644 |
|
| archrandom.h | File | 229 B | 0644 |
|
| arm-cci.h | File | 535 B | 0644 |
|
| arm_pmuv3.h | File | 7.38 KB | 0644 |
|
| asm-offsets.h | File | 35 B | 0644 |
|
| assembler.h | File | 16.77 KB | 0644 |
|
| atomic.h | File | 12.59 KB | 0644 |
|
| auxvec.h | File | 29 B | 0644 |
|
| bL_switcher.h | File | 2.13 KB | 0644 |
|
| barrier.h | File | 2.84 KB | 0644 |
|
| bitops.h | File | 7.55 KB | 0644 |
|
| bitrev.h | File | 451 B | 0644 |
|
| bug.h | File | 2.56 KB | 0644 |
|
| bugs.h | File | 297 B | 0644 |
|
| cache.h | File | 896 B | 0644 |
|
| cacheflush.h | File | 15.14 KB | 0644 |
|
| cachetype.h | File | 3.02 KB | 0644 |
|
| checksum.h | File | 3.96 KB | 0644 |
|
| clocksource.h | File | 161 B | 0644 |
|
| cmpxchg.h | File | 6.31 KB | 0644 |
|
| compiler.h | File | 978 B | 0644 |
|
| cp15.h | File | 3.22 KB | 0644 |
|
| cpu.h | File | 370 B | 0644 |
|
| cpufeature.h | File | 1.26 KB | 0644 |
|
| cpuidle.h | File | 1.59 KB | 0644 |
|
| cputype.h | File | 8.68 KB | 0644 |
|
| cti.h | File | 3.62 KB | 0644 |
|
| current.h | File | 1.8 KB | 0644 |
|
| dcc.h | File | 623 B | 0644 |
|
| delay.h | File | 2.83 KB | 0644 |
|
| device.h | File | 533 B | 0644 |
|
| div64.h | File | 2.69 KB | 0644 |
|
| dma-iommu.h | File | 906 B | 0644 |
|
| dma.h | File | 4.17 KB | 0644 |
|
| dmi.h | File | 378 B | 0644 |
|
| domain.h | File | 3.35 KB | 0644 |
|
| ecard.h | File | 5.98 KB | 0644 |
|
| edac.h | File | 995 B | 0644 |
|
| efi.h | File | 2.62 KB | 0644 |
|
| elf.h | File | 4.58 KB | 0644 |
|
| exception.h | File | 416 B | 0644 |
|
| fiq.h | File | 1.36 KB | 0644 |
|
| firmware.h | File | 1.69 KB | 0644 |
|
| fixmap.h | File | 1.84 KB | 0644 |
|
| floppy.h | File | 2.26 KB | 0644 |
|
| fncpy.h | File | 2.49 KB | 0644 |
|
| fpstate.h | File | 1.34 KB | 0644 |
|
| fpu.h | File | 309 B | 0644 |
|
| ftrace.h | File | 1.96 KB | 0644 |
|
| futex.h | File | 4.25 KB | 0644 |
|
| glue-cache.h | File | 2.88 KB | 0644 |
|
| glue-df.h | File | 2.06 KB | 0644 |
|
| glue-pf.h | File | 1005 B | 0644 |
|
| glue-proc.h | File | 4.32 KB | 0644 |
|
| glue.h | File | 613 B | 0644 |
|
| hardirq.h | File | 246 B | 0644 |
|
| highmem.h | File | 2.32 KB | 0644 |
|
| hugetlb-3level.h | File | 740 B | 0644 |
|
| hugetlb.h | File | 541 B | 0644 |
|
| hw_breakpoint.h | File | 3.76 KB | 0644 |
|
| hw_irq.h | File | 349 B | 0644 |
|
| hwcap.h | File | 378 B | 0644 |
|
| hypervisor.h | File | 282 B | 0644 |
|
| idmap.h | File | 359 B | 0644 |
|
| insn.h | File | 1.29 KB | 0644 |
|
| io.h | File | 13.81 KB | 0644 |
|
| irq.h | File | 808 B | 0644 |
|
| irq_work.h | File | 234 B | 0644 |
|
| irqflags.h | File | 3.88 KB | 0644 |
|
| jump_label.h | File | 1.12 KB | 0644 |
|
| kasan.h | File | 708 B | 0644 |
|
| kasan_def.h | File | 2.66 KB | 0644 |
|
| kexec-internal.h | File | 272 B | 0644 |
|
| kexec.h | File | 2.16 KB | 0644 |
|
| kfence.h | File | 1.03 KB | 0644 |
|
| kgdb.h | File | 2.72 KB | 0644 |
|
| kprobes.h | File | 2.1 KB | 0644 |
|
| krait-l2-accessors.h | File | 231 B | 0644 |
|
| linkage.h | File | 216 B | 0644 |
|
| mc146818rtc.h | File | 720 B | 0644 |
|
| mcpm.h | File | 11.78 KB | 0644 |
|
| mcs_spinlock.h | File | 570 B | 0644 |
|
| memblock.h | File | 248 B | 0644 |
|
| memory.h | File | 10.24 KB | 0644 |
|
| mman.h | File | 369 B | 0644 |
|
| mmu.h | File | 949 B | 0644 |
|
| mmu_context.h | File | 3.76 KB | 0644 |
|
| module.h | File | 1.26 KB | 0644 |
|
| module.lds.h | File | 134 B | 0644 |
|
| mpu.h | File | 3.22 KB | 0644 |
|
| mtd-xip.h | File | 520 B | 0644 |
|
| neon.h | File | 1.02 KB | 0644 |
|
| nwflash.h | File | 195 B | 0644 |
|
| opcodes-sec.h | File | 350 B | 0644 |
|
| opcodes-virt.h | File | 684 B | 0644 |
|
| opcodes.h | File | 8.06 KB | 0644 |
|
| outercache.h | File | 3.19 KB | 0644 |
|
| page-nommu.h | File | 811 B | 0644 |
|
| page.h | File | 4.69 KB | 0644 |
|
| paravirt.h | File | 477 B | 0644 |
|
| paravirt_api_clock.h | File | 26 B | 0644 |
|
| pci.h | File | 687 B | 0644 |
|
| percpu.h | File | 1.7 KB | 0644 |
|
| perf_event.h | File | 477 B | 0644 |
|
| pgalloc.h | File | 3.29 KB | 0644 |
|
| pgtable-2level-hwdef.h | File | 3.31 KB | 0644 |
|
| pgtable-2level-types.h | File | 1.25 KB | 0644 |
|
| pgtable-2level.h | File | 8.54 KB | 0644 |
|
| pgtable-3level-hwdef.h | File | 4.34 KB | 0644 |
|
| pgtable-3level-types.h | File | 1.3 KB | 0644 |
|
| pgtable-3level.h | File | 8 KB | 0644 |
|
| pgtable-hwdef.h | File | 321 B | 0644 |
|
| pgtable-nommu.h | File | 1.89 KB | 0644 |
|
| pgtable.h | File | 10.16 KB | 0644 |
|
| probes.h | File | 1.3 KB | 0644 |
|
| proc-fns.h | File | 4.88 KB | 0644 |
|
| processor.h | File | 3 KB | 0644 |
|
| procinfo.h | File | 1.13 KB | 0644 |
|
| prom.h | File | 552 B | 0644 |
|
| psci.h | File | 379 B | 0644 |
|
| ptdump.h | File | 969 B | 0644 |
|
| ptrace.h | File | 4.93 KB | 0644 |
|
| seccomp.h | File | 281 B | 0644 |
|
| sections.h | File | 622 B | 0644 |
|
| secure_cntvoff.h | File | 152 B | 0644 |
|
| semihost.h | File | 643 B | 0644 |
|
| set_memory.h | File | 788 B | 0644 |
|
| setup.h | File | 1.13 KB | 0644 |
|
| shmparam.h | File | 419 B | 0644 |
|
| signal.h | File | 694 B | 0644 |
|
| simd.h | File | 185 B | 0644 |
|
| smp.h | File | 2.83 KB | 0644 |
|
| smp_plat.h | File | 2.48 KB | 0644 |
|
| smp_scu.h | File | 1.32 KB | 0644 |
|
| smp_twd.h | File | 590 B | 0644 |
|
| sparsemem.h | File | 714 B | 0644 |
|
| spectre.h | File | 991 B | 0644 |
|
| spinlock.h | File | 5.51 KB | 0644 |
|
| spinlock_types.h | File | 547 B | 0644 |
|
| stackprotector.h | File | 1.11 KB | 0644 |
|
| stacktrace.h | File | 1.47 KB | 0644 |
|
| string.h | File | 2.11 KB | 0644 |
|
| suspend.h | File | 445 B | 0644 |
|
| swab.h | File | 1005 B | 0644 |
|
| switch_to.h | File | 1.17 KB | 0644 |
|
| sync_bitops.h | File | 1.48 KB | 0644 |
|
| syscall.h | File | 2.07 KB | 0644 |
|
| syscalls.h | File | 1.96 KB | 0644 |
|
| system_info.h | File | 763 B | 0644 |
|
| system_misc.h | File | 1005 B | 0644 |
|
| tcm.h | File | 991 B | 0644 |
|
| text-patching.h | File | 438 B | 0644 |
|
| therm.h | File | 655 B | 0644 |
|
| thread_info.h | File | 5.07 KB | 0644 |
|
| thread_notify.h | File | 1.06 KB | 0644 |
|
| timex.h | File | 431 B | 0644 |
|
| tlb.h | File | 1.28 KB | 0644 |
|
| tlbflush.h | File | 17.66 KB | 0644 |
|
| tls.h | File | 3.31 KB | 0644 |
|
| topology.h | File | 1.14 KB | 0644 |
|
| traps.h | File | 1.38 KB | 0644 |
|
| uaccess-asm.h | File | 3.72 KB | 0644 |
|
| uaccess.h | File | 16.99 KB | 0644 |
|
| ucontext.h | File | 2.68 KB | 0644 |
|
| unified.h | File | 979 B | 0644 |
|
| unistd.h | File | 1.51 KB | 0644 |
|
| unwind.h | File | 1.28 KB | 0644 |
|
| uprobes.h | File | 948 B | 0644 |
|
| user.h | File | 4.06 KB | 0644 |
|
| v7m.h | File | 3.21 KB | 0644 |
|
| vdso.h | File | 507 B | 0644 |
|
| vermagic.h | File | 800 B | 0644 |
|
| vfp.h | File | 2.89 KB | 0644 |
|
| vfpmacros.h | File | 1.72 KB | 0644 |
|
| vga.h | File | 351 B | 0644 |
|
| virt.h | File | 1.81 KB | 0644 |
|
| vmalloc.h | File | 87 B | 0644 |
|
| vmlinux.lds.h | File | 4.52 KB | 0644 |
|
| word-at-a-time.h | File | 2.11 KB | 0644 |
|
| xor.h | File | 5.63 KB | 0644 |
|