data_type
large_stringclasses
3 values
source
large_stringclasses
29 values
code
large_stringlengths
98
49.4M
filepath
large_stringlengths
5
161
message
large_stringclasses
234 values
commit
large_stringclasses
234 values
subject
large_stringclasses
418 values
critique
large_stringlengths
101
1.26M
metadata
dict
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * This may not use any stack, nor any variable that is not "NoSave": * * Its rewriting one kernel image with another. What is stack in "old" * image could very well be data page in "new" image, and overwriting * your own stack under you is bad idea. */ #include <linux/li...
arch/x86/power/hibernate_asm_32.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Hibernation support for x86-64 * * Copyright 2007 Rafael J. Wysocki <rjw@sisk.pl> * Copyright 2005 Andi Kleen <ak@suse.de> * Copyright 2004 Pavel Machek <pavel@suse.cz> * * swsusp_arch_resume must not use any stack or any nonlocal variables while * copying pages:...
arch/x86/power/hibernate_asm_64.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com) * Copyright (C) 2014 Red Hat Inc. * Author(s): Vivek Goyal <vgoyal@redhat.com> * * This code has been taken from kexec-tools. */ #include <linux/linkage.h> .text .balign 16 .code64 SYM_CODE_STA...
arch/x86/purgatory/entry64.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ .section .rodata, "a" .align 8 kexec_purgatory: .globl kexec_purgatory .incbin "arch/x86/purgatory/purgatory.ro" .Lkexec_purgatory_end: .align 8 kexec_purgatory_size: .globl kexec_purgatory_size .quad .Lkexec_purgatory_end - kexec_purgatory
arch/x86/purgatory/kexec-purgatory.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * purgatory: Runs between two kernels * * Copyright (C) 2014 Red Hat Inc. * * Author: * Vivek Goyal <vgoyal@redhat.com> */ #include <linux/bug.h> #include <linux/kernel.h> #include <linux/types.h> #include <crypto/sha2.h> #include <asm/purgatory.h> #include ".....
arch/x86/purgatory/purgatory.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ /* * purgatory: setup code * * Copyright (C) 2003,2004 Eric Biederman (ebiederm@xmission.com) * Copyright (C) 2014 Red Hat Inc. * * This code has been taken from kexec-tools. */ #include <linux/linkage.h> #include <asm/purgatory.h> .text .balign 16 .code64 SYM_C...
arch/x86/purgatory/setup-x86_64.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0-only */ /* * purgatory: stack * * Copyright (C) 2014 Red Hat Inc. */ #include <linux/linkage.h> /* A stack for the loaded kernel. * Separate and in the data section so it can be prepopulated. */ .data .balign 4096 SYM_DATA_START(stack) .skip 4096 SYM_DATA_END_LABEL(st...
arch/x86/purgatory/stack.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/io.h> #include <linux/slab.h> #include <linux/memblock.h> #include <linux/cc_platform.h> #include <linux/pgtable.h> #include <asm/set_memory.h> #include <asm/realmode.h> #include <asm/tlbflush.h> #include <asm/crash.h> #include <asm/msr.h> #include <asm/sev.h> struc...
arch/x86/realmode/init.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Wrapper script for the realmode binary as a transport object * before copying to low memory. */ #include <linux/linkage.h> #include <asm/page_types.h> .section ".init.data","aw" .balign PAGE_SIZE SYM_DATA_START(real_mode_blob) .incbin "arch/x86/realmode/rm/realmode.b...
arch/x86/realmode/rmpiggy.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Real-mode blob header; this should match realmode.h and be * readonly; for mutable data instead add pointers into the .data * or .bss sections as appropriate. */ #include <linux/linkage.h> #include <asm/page_types.h> #include <asm/segment.h> #include "realmode.h" .se...
arch/x86/realmode/rm/header.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef ARCH_X86_REALMODE_RM_REALMODE_H #define ARCH_X86_REALMODE_RM_REALMODE_H #ifdef __ASSEMBLER__ /* * 16-bit ljmpw to the real_mode_seg * * This must be open-coded since gas will choke on using a * relocatable symbol for the segment portion. */ #define LJMPW_RM(to) .byt...
arch/x86/realmode/rm/realmode.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * realmode.lds.S * * Linker script for the real-mode code */ #include <asm/page_types.h> #undef i386 OUTPUT_FORMAT("elf32-i386") OUTPUT_ARCH(i386) ENTRY(pa_text_start) SECTIONS { real_mode_seg = 0; . = 0; .header : { pa_real_mode_base = .; *(.header) } . = AL...
arch/x86/realmode/rm/realmode.lds.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #include <asm/desc_defs.h> #include <asm/segment.h> #include <asm/page_types.h> #include <asm/processor-flags.h> #include <asm/msr-index.h> #include "realmode.h" /* * The following code and data reboots the machine by switching to real * mode and jump...
arch/x86/realmode/rm/reboot.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Common heap and stack allocations */ #include <linux/linkage.h> .data SYM_DATA(HEAP, .long rm_heap) SYM_DATA(heap_end, .long rm_stack) .bss .balign 16 SYM_DATA(rm_heap, .space 2048) SYM_DATA_START(rm_stack) .space 2048 SYM_DATA_END_LABEL(rm_stack, SYM_L_GLOBAL, rm_...
arch/x86/realmode/rm/stack.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * * Trampoline.S Derived from Setup.S by Linus Torvalds * * 4 Jan 1997 Michael Chastain: changed to gnu as. * * This is only used for booting secondary CPUs in SMP machine * * Entry: CS:IP point to the start of our code, we are * in real mode with no stack, but the res...
arch/x86/realmode/rm/trampoline_32.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * * Trampoline.S Derived from Setup.S by Linus Torvalds * * 4 Jan 1997 Michael Chastain: changed to gnu as. * 15 Sept 2005 Eric Biederman: 64bit PIC support * * Entry: CS:IP point to the start of our code, we are * in real mode with no stack, but the rest of the * tram...
arch/x86/realmode/rm/trampoline_64.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ .section ".rodata","a" .balign 16 /* * When a bootloader hands off to the kernel in 32-bit mode an * IDT with a 2-byte limit and 4-byte base is needed. When a boot * loader hands off to a kernel 64-bit mode the base address * extends to 8-bytes. Reserve enough space for eit...
arch/x86/realmode/rm/trampoline_common.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include "wakeup.h" #include "boot.h" static void udelay(int loops) { while (loops--) io_delay(); /* Approximately 1 us */ } static void beep(unsigned int hz) { u8 enable; if (!hz) { enable = 0x00; /* Turn off speaker */ } else { u16 div = 1193181/hz; outb(0xb6, 0x43...
arch/x86/realmode/rm/wakemain.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Definitions for the wakeup data structure at the head of the * wakeup code. */ #ifndef ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H #define ARCH_X86_KERNEL_ACPI_RM_WAKEUP_H #ifndef __ASSEMBLER__ #include <linux/types.h> /* This must match data at wakeup.S */ struct wakeup_header { ...
arch/x86/realmode/rm/wakeup.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * ACPI wakeup real mode startup stub */ #include <linux/linkage.h> #include <asm/segment.h> #include <asm/msr-index.h> #include <asm/page_types.h> #include <asm/pgtable_types.h> #include <asm/processor-flags.h> #include "realmode.h" #include "wakeup.h" .code16 /* This shou...
arch/x86/realmode/rm/wakeup_asm.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-or-later /* * * Copyright (C) IBM Corporation, 2009 */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <unistd.h> #include <stdarg.h> #include <linux/kallsyms.h> #include <asm/insn.h> #include <inat.c> #include <insn.c> /* * Test of inst...
arch/x86/tools/insn_decoder_test.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-or-later /* * x86 decoder sanity test - based on test_get_insn.c * * Copyright (C) IBM Corporation, 2009 * Copyright (C) Hitachi, Ltd., 2011 */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <unistd.h> #include <sys/types.h> #include <sy...
arch/x86/tools/insn_sanity.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* This is included from relocs_32/64.c */ #define ElfW(type) _ElfW(ELF_BITS, type) #define _ElfW(bits, type) __ElfW(bits, type) #define __ElfW(bits, type) Elf##bits##_##type #define Elf_Addr ElfW(Addr) #define Elf_Ehdr ElfW(Ehdr) #define Elf_Phdr ElfW(Phdr) #define Elf_Shdr E...
arch/x86/tools/relocs.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef RELOCS_H #define RELOCS_H #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <elf.h> #include <byteswap.h> #define USE_BSD #include <endian.h> #include <r...
arch/x86/tools/relocs.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include "relocs.h" #define ELF_BITS 32 #define ELF_MACHINE EM_386 #define ELF_MACHINE_NAME "i386" #define SHT_REL_TYPE SHT_REL #define Elf_Rel ElfW(Rel) #define ELF_CLASS ELFCLASS32 #define ELF_R_SYM(val) ELF32_R_SYM(val) #define ELF_R_TYPE(val) ELF32_R_TYPE(val) #define E...
arch/x86/tools/relocs_32.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include "relocs.h" #define ELF_BITS 64 #define ELF_MACHINE EM_X86_64 #define ELF_MACHINE_NAME "x86_64" #define SHT_REL_TYPE SHT_RELA #define Elf_Rel Elf64_Rela #define ELF_CLASS ELFCLASS64 #define ELF_R_SYM(val) ...
arch/x86/tools/relocs_64.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include "relocs.h" void die(char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); exit(1); } static void usage(void) { die("relocs [--abs-syms|--abs-relocs|--reloc-info|--text|--realmode]" \ " vmlinux\n"); } int main(int argc, char **a...
arch/x86/tools/relocs_common.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * vdso2c - A vdso image preparation tool * Copyright (c) 2014 Andy Lutomirski and others * * vdso2c requires stripped and unstripped input. It would be trivial * to fully strip the input in here, but, for reasons described below, * we need to write a section table. Do...
arch/x86/tools/vdso2c.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * This file is included twice from vdso2c.c. It generates code for 32-bit * and 64-bit vDSOs. We need both for 64-bit builds, since 32-bit vDSOs * are built for 32-bit userspace. */ static void BITSFUNC(copy)(FILE *outfile, const unsigned char *data, size_t len) { size_...
arch/x86/tools/vdso2c.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <arch.h> #include <signal.h> #include <kern_util.h> #include <longjmp.h> #include <sysdep/ptrace.h> #include <generated/asm-offsets.h> /* Set during early boot */ static int host_has_cmov = 1; static jmp...
arch/x86/um/bugs_32.c
null
null
null
null
null
source
linux
/* * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #include <arch.h> #include <sysdep/ptrace.h> void arch_check_bugs(void) { } void arch_examine_signal(int sig, struct uml_pt_regs *regs) { }
arch/x86/um/bugs_64.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Richard Weinberger <richrd@nod.at> * Mostly copied from arch/x86/lib/delay.c */ #include <linux/export.h> #include <linux/kernel.h> #include <linux/delay.h> #include <asm/param.h> void __delay(unsigned long loops) { asm volatile( "test %0,%0\n" ...
arch/x86/um/delay.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <arch.h> #include <sysdep/ptrace.h> /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ struct exception_table_entry { unsigned long insn; unsigned long fixup; }; const struct e...
arch/x86/um/fault.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/mm.h> #include <asm/elf.h> const char *arch_vma_name(struct vm_area_struct *vma) { if (vma->vm_mm && vma->vm_start == um_vdso_addr) return "[vdso]"; return NULL; }
arch/x86/um/mem_64.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/sched.h> #include <linux/elf.h> #include <linux/regset.h> #include <asm/user32.h> #include <asm/sigcontext.h> #ifdef CONFIG_X86_32 /* * FPU tag word conversions. */ static inline unsigned short twd_i387_to_fxsr(unsigned short twd) { unsigned int tmp; /* to avoid...
arch/x86/um/ptrace.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <linux/mm.h> #include <linux/sched.h> #include <linux/uaccess.h> #include <linux/regset.h> #include <asm/ptrace-abi.h> #include <registers.h> #include <skas.h> void arch_switch_to(struct task_struct *to)...
arch/x86/um/ptrace_32.c
null
null
null
null
null
source
linux
/* * Copyright 2003 PathScale, Inc. * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * * Licensed under the GPL */ #include <linux/mm.h> #include <linux/sched.h> #include <linux/errno.h> #include <linux/regset.h> #define __FRAME_OFFSETS #include <asm/ptrace.h> #include <linux/uaccess.h> #in...
arch/x86/um/ptrace_64.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <errno.h> #include <ptrace_user.h> int ptrace_getregs(long pid, unsigned long *regs_out) { if (ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0) return -errno; return 0; } int ptrace_setregs(long pid, u...
arch/x86/um/ptrace_user.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ # # arch/i386/setjmp.S # # setjmp/longjmp for the i386 architecture # # # The jmp_buf is assumed to contain the following, in order: # %ebx # %esp # %ebp # %esi # %edi # <return address> # .text .align 4 .globl kernel_setjmp .type kernel_setjmp, @function kernel_setjmp: #ifd...
arch/x86/um/setjmp_32.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ # # arch/x86_64/setjmp.S # # setjmp/longjmp for the x86-64 architecture # # # The jmp_buf is assumed to contain the following, in order: # %rbx # %rsp (post-return) # %rbp # %r12 # %r13 # %r14 # %r15 # <return address> # .text .align 4 .globl kernel_setjmp .type kernel_setjm...
arch/x86/um/setjmp_64.S
null
null
null
null
null
source
linux
/* * Copyright (C) 2003 PathScale, Inc. * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <linux/personality.h> #include <linux/ptrace.h> #include <linux/kernel.h> #include <linux/syscalls.h> #include <asm/unistd.h> #include <linux/uaccess.h> #include <as...
arch/x86/um/signal.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <sysdep/stub.h> #include <sysdep/faultinfo.h> #include <sysdep/mcontext.h> #include <sys/ucontext.h> void __attribute__ ((__section__ (".__syscall_stub"))) stub_segv_handler(int sig, siginfo_t *info, voi...
arch/x86/um/stub_segv.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * System call table for UML/i386, copied from arch/x86/kernel/syscall_*.c * with some changes for UML. */ #include <linux/linkage.h> #include <linux/sys.h> #include <linux/cache.h> #include <asm/syscall.h> extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, ...
arch/x86/um/sys_call_table_32.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * System call table for UML/x86-64, copied from arch/x86/kernel/syscall_*.c * with some changes for UML. */ #include <linux/linkage.h> #include <linux/sys.h> #include <linux/cache.h> #include <asm/syscall.h> extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, ...
arch/x86/um/sys_call_table_64.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/syscalls.h> #include <os.h> SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, arg2) { return -EINVAL; }
arch/x86/um/syscalls_32.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #include <linux/sched.h> #include <linux/sched/mm.h> #include <linux/syscalls.h> #include <linux/uaccess.h> #include <asm/prctl.h> /* XXX This should get the constants from lib...
arch/x86/um/syscalls_64.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2001 - 2003 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ #include <linux/kernel.h> #include <linux/smp.h> #include <linux/sched.h> #include <linux/sched/debug.h> #include <linux/kallsyms.h> #include <asm/ptrace.h> /* This is declared by <linux/sched.h> */ void show_regs(struct pt_re...
arch/x86/um/sysrq_32.c
null
null
null
null
null
source
linux
/* * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/pid.h> #include <linux/sched.h> #include <linux/sched/debug.h> #include <linux/utsname.h> #include <asm/current.h> #include <asm/ptrace.h> void show_regs(struct pt_regs *regs) { p...
arch/x86/um/sysrq_64.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2005 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> * Licensed under the GPL */ #include <linux/percpu.h> #include <linux/sched.h> #include <linux/syscalls.h> #include <linux/uaccess.h> #include <asm/ptrace-abi.h> #include <os.h> #include <skas.h> #include <sysdep/tls.h> #include <asm/des...
arch/x86/um/tls_32.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <linux/sched.h> #include <asm/ptrace-abi.h> void clear_flushed_tls(struct task_struct *task) { } int arch_set_tls(struct task_struct *t, unsigned long tls) { /* * If CLONE_SETTLS is set, we need to save the thread id * so it can be set during context switches. */ t...
arch/x86/um/tls_64.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stddef.h> #include <signal.h> #include <poll.h> #include <sys/mman.h> #include <sys/user.h> #define __FRAME_OFFSETS #include <linux/ptrace.h> #include <asm/types.h> #include <linux/kbuild.h> #define DEFINE_LONGS(sym, val) \ COMMENT(#val " / sizeof(unsig...
arch/x86/um/user-offsets.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_UM_HWEIGHT_H #define _ASM_UM_HWEIGHT_H #include <asm-generic/bitops/arch_hweight.h> #endif
arch/x86/um/asm/arch_hweight.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_UM_BARRIER_H_ #define _ASM_UM_BARRIER_H_ #include <asm/cpufeatures.h> #include <asm/alternative.h> /* * Force strict CPU ordering. * And yes, this is required on UP too when we're talking * to devices. */ #ifdef CONFIG_X86_32 #define mb() alternative("lock addl...
arch/x86/um/asm/barrier.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_CHECKSUM_H #define __UM_CHECKSUM_H #include <linux/string.h> #include <linux/in6.h> #include <linux/uaccess.h> /* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit) * * returns a 32-bit number suitable for feeding into it...
arch/x86/um/asm/checksum.h
null
null
null
null
null
source
linux
/* * Licensed under the GPL */ #ifndef __UM_SYSDEP_CHECKSUM_H #define __UM_SYSDEP_CHECKSUM_H static inline __sum16 ip_compute_csum(const void *buff, int len) { return csum_fold (csum_partial(buff, len, 0)); } #define _HAVE_ARCH_IPV6_CSUM static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, ...
arch/x86/um/asm/checksum_32.h
null
null
null
null
null
source
linux
/* * Licensed under the GPL */ #ifndef __UM_SYSDEP_CHECKSUM_H #define __UM_SYSDEP_CHECKSUM_H static inline unsigned add32_with_carry(unsigned a, unsigned b) { asm("addl %2,%0\n\t" "adcl $0,%0" : "=r" (a) : "0" (a), "r" (b)); return a; } extern __sum16 ip_compute_...
arch/x86/um/asm/checksum_64.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_DESC_H #define __UM_DESC_H /* Taken from asm-i386/desc.h, it's the only thing we need. The rest wouldn't * compile, and has never been used. */ #define LDT_empty(info) (\ (info)->base_addr == 0 && \ (info)->limit == 0 && \ (info)->contents == 0 && \ (info)->rea...
arch/x86/um/asm/desc.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #ifndef __UM_ELF_X86_H #define __UM_ELF_X86_H #include <asm/user.h> #include <skas.h> #define CORE_DUMP_USE_REGSET #ifdef CONFIG_X86_32 #define R_386_NONE 0 #define R_386_32 1 #define R_386_PC32 2 #define R_386...
arch/x86/um/asm/elf.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ #ifndef __UM_IRQ_VECTORS_H #define __UM_IRQ_VECTORS_H #endif
arch/x86/um/asm/irq_vectors.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_PROCESSOR_H #define __UM_PROCESSOR_H #include <linux/time-internal.h> /* include faultinfo structure */ #include <sysdep/faultinfo.h> #ifdef CONFIG_X86_32 # include "processor_32.h" #else # include "processor_64.h" #endif #define KSTK_EIP(tsk) KSTK_REG(tsk, HOST_IP...
arch/x86/um/asm/processor.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Licensed under the GPL */ #ifndef __UM_PROCESSOR_I386_H #define __UM_PROCESSOR_I386_H #include <linux/string.h> #include <asm/segment.h> #include <asm/ldt.h> extern int host_has_cmov; struct uml_tls_struct { struct user_desc tls; unsigned flushed:1; unsig...
arch/x86/um/asm/processor_32.h
null
null
null
null
null
source
linux
/* * Copyright 2003 PathScale, Inc. * * Licensed under the GPL */ #ifndef __UM_PROCESSOR_X86_64_H #define __UM_PROCESSOR_X86_64_H struct arch_thread { unsigned long debugregs[8]; int debugregs_seq; struct faultinfo faultinfo; }; #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0...
arch/x86/um/asm/processor_64.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_X86_PTRACE_H #define __UM_X86_PTRACE_H /* This is here because signal.c needs the REGSET_FP_LEGACY definition */ enum { REGSET_GENERAL, #ifdef CONFIG_X86_32 REGSET_FP_LEGACY, #endif REGSET_FP, REGSET_XSTATE, }; #include <linux/compiler.h> #ifndef CONFIG_X86_32 #...
arch/x86/um/asm/ptrace.h
null
null
null
null
null
source
linux
#ifndef __UM_REQUIRED_FEATURES_H #define __UM_REQUIRED_FEATURES_H /* * Nothing to see, just need something for the i386 and x86_64 asm * headers to include. */ #endif
arch/x86/um/asm/required-features.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_SEGMENT_H #define __UM_SEGMENT_H extern int host_gdt_entry_tls_min; #define GDT_ENTRY_TLS_ENTRIES 3 #define GDT_ENTRY_TLS_MIN host_gdt_entry_tls_min #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1) #endif
arch/x86/um/asm/segment.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ASM_UM_SPINLOCK_H #define __ASM_UM_SPINLOCK_H #include <asm/qspinlock.h> #include <asm/qrwlock.h> #endif /* __ASM_UM_SPINLOCK_H */
arch/x86/um/asm/spinlock.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __UM_ASM_SYSCALL_H #define __UM_ASM_SYSCALL_H #include <asm/syscall-generic.h> #include <uapi/linux/audit.h> typedef asmlinkage long (*sys_call_ptr_t)(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long); extern const s...
arch/x86/um/asm/syscall.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) * Copyright 2003 PathScale, Inc. * Licensed under the GPL */ #ifndef __VM_FLAGS_X86_H #define __VM_FLAGS_X86_H #ifdef CONFIG_X86_32 #define VM_DATA_DEFAULT_FLAGS VM_DATA_FLAGS_TSK_EXEC #else #define VM_STACK_DEFAULT_FLAGS (VM_GROWSDOWN | VM_DATA_FLAGS_EXEC)...
arch/x86/um/asm/vm-flags.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #define __FRAME_OFFSETS #include <linux/errno.h> #include <linux/string.h> #include <sys/ucontext.h> #include <asm/ptrace.h> #include <asm/sigcontext.h> #include <sysdep/ptrace.h> #include <sysdep/mcontext.h> #include <arch.h> void get_regs_from_mc(struct uml_pt_regs *regs, mcontext...
arch/x86/um/os-Linux/mcontext.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 PathScale, Inc * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #include <errno.h> #include <stdlib.h> #include <sys/ptrace.h> #ifdef __i386__ #include <sys/user.h> #endif #include <longjmp.h> #include <sysdep/ptrace_user.h> #include <sys/u...
arch/x86/um/os-Linux/registers.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 #include <errno.h> #include <linux/unistd.h> #include <sys/ptrace.h> #include <sys/syscall.h> #include <unistd.h> #include <os.h> #include <sysdep/tls.h> #ifndef PTRACE_GET_THREAD_AREA #define PTRACE_GET_THREAD_AREA 25 #endif #ifndef PTRACE_SET_THREAD_AREA #define PTRACE_SET_THRE...
arch/x86/um/os-Linux/tls.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __X86_UM_SYSDEP_ARCHSETJMP_H #define __X86_UM_SYSDEP_ARCHSETJMP_H #ifdef __i386__ #include "archsetjmp_32.h" #else #include "archsetjmp_64.h" #endif unsigned long get_thread_reg(int reg, jmp_buf *buf); #endif /* __X86_UM_SYSDEP_ARCHSETJMP_H */
arch/x86/um/shared/sysdep/archsetjmp.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * arch/um/include/sysdep-i386/archsetjmp.h */ #ifndef _KLIBC_ARCHSETJMP_H #define _KLIBC_ARCHSETJMP_H struct __jmp_buf { unsigned int __ebx; unsigned int __esp; unsigned int __ebp; unsigned int __esi; unsigned int __edi; unsigned int __eip; }; typedef struct __jmp_bu...
arch/x86/um/shared/sysdep/archsetjmp_32.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * arch/um/include/sysdep-x86_64/archsetjmp.h */ #ifndef _KLIBC_ARCHSETJMP_H #define _KLIBC_ARCHSETJMP_H struct __jmp_buf { unsigned long __rbx; unsigned long __rsp; unsigned long __rbp; unsigned long __r12; unsigned long __r13; unsigned long __r14; unsigned long __r1...
arch/x86/um/shared/sysdep/archsetjmp_64.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifdef __i386__ #include "faultinfo_32.h" #else #include "faultinfo_64.h" #endif
arch/x86/um/shared/sysdep/faultinfo.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 Fujitsu Siemens Computers GmbH * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> * Licensed under the GPL */ #ifndef __FAULTINFO_I386_H #define __FAULTINFO_I386_H /* this structure contains the full arch-specific faultinfo * from the traps. * On i386, ptrace_faultinfo unfortunate...
arch/x86/um/shared/sysdep/faultinfo_32.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 Fujitsu Siemens Computers GmbH * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> * Licensed under the GPL */ #ifndef __FAULTINFO_X86_64_H #define __FAULTINFO_X86_64_H /* this structure contains the full arch-specific faultinfo * from the traps. * On i386, ptrace_faultinfo unfortu...
arch/x86/um/shared/sysdep/faultinfo_64.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #ifndef __SYS_SIGCONTEXT_X86_H #define __SYS_SIGCONTEXT_X86_H #include <stub-data.h> extern void get_regs_from_mc(struct uml_pt_regs *, mcontext_t *); extern void get_mc_from_regs(struct uml_pt_regs *regs, mcon...
arch/x86/um/shared/sysdep/mcontext.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __SYSDEP_X86_PTRACE_H #define __SYSDEP_X86_PTRACE_H #include <generated/user_constants.h> #include <sysdep/faultinfo.h> #define MAX_REG_OFFSET (UM_FRAME_SIZE) #define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long)) #define REGS_IP(r) ((r)[HOST_IP]) #define REGS_SP...
arch/x86/um/shared/sysdep/ptrace.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #ifndef __SYSDEP_I386_PTRACE_H #define __SYSDEP_I386_PTRACE_H #define UPT_SYSCALL_ARG1(r) UPT_BX(r) #define UPT_SYSCALL_ARG2(r) UPT_CX(r) #define UPT_SYSCALL_ARG3(r) UPT_DX(r) #define UPT_SYSCALL_ARG4(r) UPT_SI(r...
arch/x86/um/shared/sysdep/ptrace_32.h
null
null
null
null
null
source
linux
/* * Copyright 2003 PathScale, Inc. * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * * Licensed under the GPL */ #ifndef __SYSDEP_X86_64_PTRACE_H #define __SYSDEP_X86_64_PTRACE_H #define REGS_R8(r) ((r)[HOST_R8]) #define REGS_R9(r) ((r)[HOST_R9]) #define REGS_R10(r) ((r)[HOST_R10]) #defi...
arch/x86/um/shared/sysdep/ptrace_64.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <generated/user_constants.h> #define PT_OFFSET(r) ((r) * sizeof(long)) #define PT_SYSCALL_NR(regs) ((regs)[HOST_ORIG_AX]) #define PT_SYSCALL_NR_OFFSET PT_OFFSET(HOST_ORIG_AX) #define PT_SYSCALL_RET_OFFSET PT_OFFSET(HOST_AX) #define REGS_IP_INDEX HOST_IP #define REGS_S...
arch/x86/um/shared/sysdep/ptrace_user.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __ARCH_STUB_DATA_H #define __ARCH_STUB_DATA_H #ifdef __i386__ #include <generated/asm-offsets.h> #include <asm/ldt.h> struct stub_data_arch { int sync; struct user_desc tls[UM_KERN_GDT_ENTRY_TLS_ENTRIES]; }; #else #define STUB_SYNC_FS_BASE (1 << 0) #define STUB_SYNC_GS...
arch/x86/um/shared/sysdep/stub-data.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <asm/unistd.h> #include <sys/mman.h> #include <signal.h> #include <as-layout.h> #include <stub-data.h> #ifdef __i386__ #include "stub_32.h" #else #include "stub_64.h" #endif extern void stub_segv_handler(int, siginfo_t *, void *); extern void stub_syscall_handler(void);...
arch/x86/um/shared/sysdep/stub.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ #ifndef __SYSDEP_STUB_H #define __SYSDEP_STUB_H #include <stddef.h> #include <asm/ptrace.h> #include <generated/asm-offsets.h> #define STUB_MMAP_NR __NR_mmap2 #define MMAP_OFFSET(o) ((o) >> UM_KERN_PAGE_SHIFT) static __always_inlin...
arch/x86/um/shared/sysdep/stub_32.h
null
null
null
null
null
source
linux
/* * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) * Licensed under the GPL */ #ifndef __SYSDEP_STUB_H #define __SYSDEP_STUB_H #include <stddef.h> #include <sysdep/ptrace_user.h> #include <generated/asm-offsets.h> #include <linux/stddef.h> #include <asm/prctl.h> #define STUB_MMAP_NR __NR_mmap #define MMAP_OFFS...
arch/x86/um/shared/sysdep/stub_64.h
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _SYSDEP_TLS_H #define _SYSDEP_TLS_H #ifdef __UM_HOST__ /* Change name to avoid conflicts with the original one from <asm/ldt.h>, which * may be named user_desc (but in 2.4 and in header matching its API was named * modify_ldt_ldt_s). */ typedef struct um_dup_user_desc...
arch/x86/um/shared/sysdep/tls.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Richard Weinberger <richrd@nod.at> * * This vDSO turns all calls into a syscall so that UML can trap them. */ /* Disable profiling for userspace code */ #define DISABLE_BRANCH_PROFILING #include <vdso/gettime.h> #include <linux/time.h> #include <as...
arch/x86/um/vdso/um_vdso.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Linker script for vDSO. This is an ELF shared object prelinked to * its virtual address, and with only one read-only segment. * This script controls its layout. */ SECTIONS { . = VDSO_PRELINK + SIZEOF_HEADERS; .hash : { *(.hash) } :text .gnu.hash : { *(.gnu.hash)...
arch/x86/um/vdso/vdso-layout.lds.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/init.h> #include <linux/linkage.h> __INITDATA SYM_DATA_START(vdso_start) .incbin "arch/x86/um/vdso/vdso.so" SYM_DATA_END_LABEL(vdso_start, SYM_L_GLOBAL, vdso_end) __FINIT
arch/x86/um/vdso/vdso.S
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ /* * Linker script for 64-bit vDSO. * We #include the file to define the layout details. * Here we only choose the prelinked virtual address. * * This file defines the version script giving the user-exported symbols in * the DSO. We can define local symbols here called VDSO...
arch/x86/um/vdso/vdso.lds.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Richard Weinberger <richrd@nod.at> */ #include <linux/slab.h> #include <linux/sched.h> #include <linux/mm.h> #include <asm/page.h> #include <asm/elf.h> #include <linux/init.h> unsigned long um_vdso_addr; static struct page *um_vdso; extern unsigned l...
arch/x86/um/vdso/vma.c
null
null
null
null
null
source
linux
/* * Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. * */ #include <linux/module.h> #include <linux/pci.h> #include <linux/sysfb.h> #in...
arch/x86/video/video-common.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * AMD SVM-SEV command line parsing support * * Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. * * Author: Michael Roth <michael.roth@amd.com> */ #include <linux/string.h> #include <linux/printk.h> #include <linux/cache.h> #include <linux/cpufeature.h> #include...
arch/x86/virt/svm/cmdline.c
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0-only /* * AMD SVM-SEV Host Support. * * Copyright (C) 2023 Advanced Micro Devices, Inc. * * Author: Ashish Kalra <ashish.kalra@amd.com> * */ #include <linux/cc_platform.h> #include <linux/printk.h> #include <linux/mm_types.h> #include <linux/set_memory.h> #include <linux/memb...
arch/x86/virt/svm/sev.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <linux/linkage.h> #include <asm/frame.h> #include "tdxcall.S" /* * __seamcall() - Host-side interface functions to SEAM software * (the P-SEAMLDR or the TDX module). * * __seamcall() function ABI: * * @fn (RDI) - SEAMCALL Leaf number, moved to RAX * @args (RSI...
arch/x86/virt/vmx/tdx/seamcall.S
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Copyright(c) 2023 Intel Corporation. * * Intel Trusted Domain Extensions (TDX) support */ #include "asm/page_types.h" #define pr_fmt(fmt) "virt/tdx: " fmt #include <linux/types.h> #include <linux/cache.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/pri...
arch/x86/virt/vmx/tdx/tdx.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _X86_VIRT_TDX_H #define _X86_VIRT_TDX_H #include <linux/bits.h> /* * This file contains both macros and data structures defined by the TDX * architecture and Linux defined software data structures and functions. * The two should not be mixed together for better readab...
arch/x86/virt/vmx/tdx/tdx.h
null
null
null
null
null
source
linux
// SPDX-License-Identifier: GPL-2.0 /* * Automatically generated functions to read TDX global metadata. * * This file doesn't compile on its own as it lacks of inclusion * of SEAMCALL wrapper primitive which reads global metadata. * Include this file to other C file instead. */ static int get_tdx_sys_info_featur...
arch/x86/virt/vmx/tdx/tdx_global_metadata.c
null
null
null
null
null
source
linux
/* SPDX-License-Identifier: GPL-2.0 */ #include <asm/asm-offsets.h> #include <asm/frame.h> #include <asm/asm.h> #include <asm/tdx.h> /* * TDCALL and SEAMCALL are supported in Binutils >= 2.36. */ #define tdcall .byte 0x66,0x0f,0x01,0xcc #define seamcall .byte 0x66,0x0f,0x01,0xcf /* * TDX_MODULE_CALL - common help...
arch/x86/virt/vmx/tdx/tdxcall.S
null
null
null
null
null