mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
This commit is contained in:
@@ -2877,6 +2877,17 @@
|
||||
/sys/module/printk/parameters/console_suspend) to
|
||||
turn on/off it dynamically.
|
||||
|
||||
novmcoredd [KNL,KDUMP]
|
||||
Disable device dump. Device dump allows drivers to
|
||||
append dump data to vmcore so you can collect driver
|
||||
specified debug info. Drivers can append the data
|
||||
without any limit and this data is stored in memory,
|
||||
so this may cause significant memory stress. Disabling
|
||||
device dump can help save memory but the driver debug
|
||||
data will be no longer available. This parameter
|
||||
is only available when CONFIG_PROC_VMCORE_DEVICE_DUMP
|
||||
is set.
|
||||
|
||||
noaliencache [MM, NUMA, SLAB] Disables the allocation of alien
|
||||
caches in the slab allocator. Saves per-node memory,
|
||||
but will impact performance.
|
||||
|
||||
@@ -4,7 +4,7 @@ OHCI
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "samsung,s3c2410-ohci" for USB host controller
|
||||
- reg: address and lenght of the controller memory mapped region
|
||||
- reg: address and length of the controller memory mapped region
|
||||
- interrupts: interrupt number for the USB OHCI controller
|
||||
- clocks: Should reference the bus and host clocks
|
||||
- clock-names: Should contain two strings
|
||||
|
||||
@@ -481,7 +481,10 @@ kernel support.
|
||||
|
||||
|
||||
|
||||
|
||||
struct coda_timespec {
|
||||
int64_t tv_sec; /* seconds */
|
||||
long tv_nsec; /* nanoseconds */
|
||||
};
|
||||
|
||||
struct coda_vattr {
|
||||
enum coda_vtype va_type; /* vnode type (for create) */
|
||||
@@ -493,9 +496,9 @@ kernel support.
|
||||
long va_fileid; /* file id */
|
||||
u_quad_t va_size; /* file size in bytes */
|
||||
long va_blocksize; /* blocksize preferred for i/o */
|
||||
struct timespec va_atime; /* time of last access */
|
||||
struct timespec va_mtime; /* time of last modification */
|
||||
struct timespec va_ctime; /* time file changed */
|
||||
struct coda_timespec va_atime; /* time of last access */
|
||||
struct coda_timespec va_mtime; /* time of last modification */
|
||||
struct coda_timespec va_ctime; /* time file changed */
|
||||
u_long va_gen; /* generation number of file */
|
||||
u_long va_flags; /* flags defined for file */
|
||||
dev_t va_rdev; /* device special file represents */
|
||||
|
||||
@@ -93,11 +93,6 @@ static inline void * phys_to_virt(unsigned long address)
|
||||
|
||||
#define page_to_phys(page) page_to_pa(page)
|
||||
|
||||
static inline dma_addr_t __deprecated isa_page_to_bus(struct page *page)
|
||||
{
|
||||
return page_to_phys(page);
|
||||
}
|
||||
|
||||
/* Maximum PIO space address supported? */
|
||||
#define IO_SPACE_LIMIT 0xffff
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#ifndef _ASM_ARC_PGTABLE_H
|
||||
#define _ASM_ARC_PGTABLE_H
|
||||
|
||||
#include <linux/const.h>
|
||||
#include <linux/bits.h>
|
||||
#define __ARCH_USE_5LEVEL_HACK
|
||||
#include <asm-generic/pgtable-nopmd.h>
|
||||
#include <asm/page.h>
|
||||
@@ -215,11 +215,11 @@
|
||||
#define BITS_FOR_PTE (PGDIR_SHIFT - PAGE_SHIFT)
|
||||
#define BITS_FOR_PGD (32 - PGDIR_SHIFT)
|
||||
|
||||
#define PGDIR_SIZE _BITUL(PGDIR_SHIFT) /* vaddr span, not PDG sz */
|
||||
#define PGDIR_SIZE BIT(PGDIR_SHIFT) /* vaddr span, not PDG sz */
|
||||
#define PGDIR_MASK (~(PGDIR_SIZE-1))
|
||||
|
||||
#define PTRS_PER_PTE _BITUL(BITS_FOR_PTE)
|
||||
#define PTRS_PER_PGD _BITUL(BITS_FOR_PGD)
|
||||
#define PTRS_PER_PTE BIT(BITS_FOR_PTE)
|
||||
#define PTRS_PER_PGD BIT(BITS_FOR_PGD)
|
||||
|
||||
/*
|
||||
* Number of entries a user land program use.
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#error "Incorrect ctop.h include"
|
||||
#endif
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/types.h>
|
||||
#include <soc/nps/common.h>
|
||||
|
||||
@@ -51,19 +52,19 @@
|
||||
#define CTOP_INST_AXOR_DI_R2_R2_R3 0x4A664C06
|
||||
|
||||
/* Do not use D$ for address in 2G-3G */
|
||||
#define HW_COMPLY_KRN_NOT_D_CACHED _BITUL(28)
|
||||
#define HW_COMPLY_KRN_NOT_D_CACHED BIT(28)
|
||||
|
||||
#define NPS_MSU_EN_CFG 0x80
|
||||
#define NPS_CRG_BLKID 0x480
|
||||
#define NPS_CRG_SYNC_BIT _BITUL(0)
|
||||
#define NPS_CRG_SYNC_BIT BIT(0)
|
||||
#define NPS_GIM_BLKID 0x5C0
|
||||
|
||||
/* GIM registers and fields*/
|
||||
#define NPS_GIM_UART_LINE _BITUL(7)
|
||||
#define NPS_GIM_DBG_LAN_EAST_TX_DONE_LINE _BITUL(10)
|
||||
#define NPS_GIM_DBG_LAN_EAST_RX_RDY_LINE _BITUL(11)
|
||||
#define NPS_GIM_DBG_LAN_WEST_TX_DONE_LINE _BITUL(25)
|
||||
#define NPS_GIM_DBG_LAN_WEST_RX_RDY_LINE _BITUL(26)
|
||||
#define NPS_GIM_UART_LINE BIT(7)
|
||||
#define NPS_GIM_DBG_LAN_EAST_TX_DONE_LINE BIT(10)
|
||||
#define NPS_GIM_DBG_LAN_EAST_RX_RDY_LINE BIT(11)
|
||||
#define NPS_GIM_DBG_LAN_WEST_TX_DONE_LINE BIT(25)
|
||||
#define NPS_GIM_DBG_LAN_WEST_RX_RDY_LINE BIT(26)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/* Functional registers definition */
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
* ISA I/O bus memory addresses are 1:1 with the physical address.
|
||||
*/
|
||||
#define isa_virt_to_bus virt_to_phys
|
||||
#define isa_page_to_bus page_to_phys
|
||||
#define isa_bus_to_virt phys_to_virt
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,28 +27,6 @@
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!user_mode(regs)) {
|
||||
/* kprobe_running() needs smp_processor_id() */
|
||||
preempt_disable();
|
||||
if (kprobe_running() && kprobe_fault_handler(regs, fsr))
|
||||
ret = 1;
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static inline int notify_page_fault(struct pt_regs *regs, unsigned int fsr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is useful to dump out the page tables associated with
|
||||
* 'addr' in mm 'mm'.
|
||||
@@ -265,7 +243,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
vm_fault_t fault;
|
||||
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
||||
|
||||
if (notify_page_fault(regs, fsr))
|
||||
if (kprobe_page_fault(regs, fsr))
|
||||
return 0;
|
||||
|
||||
tsk = current;
|
||||
|
||||
@@ -24,6 +24,7 @@ config ARM64
|
||||
select ARCH_HAS_KCOV
|
||||
select ARCH_HAS_KEEPINITRD
|
||||
select ARCH_HAS_MEMBARRIER_SYNC_CORE
|
||||
select ARCH_HAS_PTE_DEVMAP
|
||||
select ARCH_HAS_PTE_SPECIAL
|
||||
select ARCH_HAS_SETUP_DMA_OPS
|
||||
select ARCH_HAS_SET_DIRECT_MAP
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#define PTE_WRITE (PTE_DBM) /* same as DBM (51) */
|
||||
#define PTE_DIRTY (_AT(pteval_t, 1) << 55)
|
||||
#define PTE_SPECIAL (_AT(pteval_t, 1) << 56)
|
||||
#define PTE_DEVMAP (_AT(pteval_t, 1) << 57)
|
||||
#define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
@@ -79,6 +79,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
||||
#define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE))
|
||||
#define pte_user_exec(pte) (!(pte_val(pte) & PTE_UXN))
|
||||
#define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT))
|
||||
#define pte_devmap(pte) (!!(pte_val(pte) & PTE_DEVMAP))
|
||||
|
||||
#define pte_cont_addr_end(addr, end) \
|
||||
({ unsigned long __boundary = ((addr) + CONT_PTE_SIZE) & CONT_PTE_MASK; \
|
||||
@@ -206,6 +207,11 @@ static inline pmd_t pmd_mkcont(pmd_t pmd)
|
||||
return __pmd(pmd_val(pmd) | PMD_SECT_CONT);
|
||||
}
|
||||
|
||||
static inline pte_t pte_mkdevmap(pte_t pte)
|
||||
{
|
||||
return set_pte_bit(pte, __pgprot(PTE_DEVMAP));
|
||||
}
|
||||
|
||||
static inline void set_pte(pte_t *ptep, pte_t pte)
|
||||
{
|
||||
WRITE_ONCE(*ptep, pte);
|
||||
@@ -388,6 +394,11 @@ static inline int pmd_protnone(pmd_t pmd)
|
||||
|
||||
#define pmd_mkhuge(pmd) (__pmd(pmd_val(pmd) & ~PMD_TABLE_BIT))
|
||||
|
||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||
#define pmd_devmap(pmd) pte_devmap(pmd_pte(pmd))
|
||||
#endif
|
||||
#define pmd_mkdevmap(pmd) pte_pmd(pte_mkdevmap(pmd_pte(pmd)))
|
||||
|
||||
#define __pmd_to_phys(pmd) __pte_to_phys(pmd_pte(pmd))
|
||||
#define __phys_to_pmd_val(phys) __phys_to_pte_val(phys)
|
||||
#define pmd_pfn(pmd) ((__pmd_to_phys(pmd) & PMD_MASK) >> PAGE_SHIFT)
|
||||
@@ -673,6 +684,16 @@ static inline int pmdp_set_access_flags(struct vm_area_struct *vma,
|
||||
{
|
||||
return ptep_set_access_flags(vma, address, (pte_t *)pmdp, pmd_pte(entry), dirty);
|
||||
}
|
||||
|
||||
static inline int pud_devmap(pud_t pud)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int pgd_devmap(pgd_t pgd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifndef __ASM_SYSREG_H
|
||||
#define __ASM_SYSREG_H
|
||||
|
||||
#include <linux/const.h>
|
||||
#include <linux/bits.h>
|
||||
#include <linux/stringify.h>
|
||||
|
||||
/*
|
||||
@@ -478,31 +478,31 @@
|
||||
#define SYS_CNTV_CVAL_EL02 sys_reg(3, 5, 14, 3, 2)
|
||||
|
||||
/* Common SCTLR_ELx flags. */
|
||||
#define SCTLR_ELx_DSSBS (_BITUL(44))
|
||||
#define SCTLR_ELx_ENIA (_BITUL(31))
|
||||
#define SCTLR_ELx_ENIB (_BITUL(30))
|
||||
#define SCTLR_ELx_ENDA (_BITUL(27))
|
||||
#define SCTLR_ELx_EE (_BITUL(25))
|
||||
#define SCTLR_ELx_IESB (_BITUL(21))
|
||||
#define SCTLR_ELx_WXN (_BITUL(19))
|
||||
#define SCTLR_ELx_ENDB (_BITUL(13))
|
||||
#define SCTLR_ELx_I (_BITUL(12))
|
||||
#define SCTLR_ELx_SA (_BITUL(3))
|
||||
#define SCTLR_ELx_C (_BITUL(2))
|
||||
#define SCTLR_ELx_A (_BITUL(1))
|
||||
#define SCTLR_ELx_M (_BITUL(0))
|
||||
#define SCTLR_ELx_DSSBS (BIT(44))
|
||||
#define SCTLR_ELx_ENIA (BIT(31))
|
||||
#define SCTLR_ELx_ENIB (BIT(30))
|
||||
#define SCTLR_ELx_ENDA (BIT(27))
|
||||
#define SCTLR_ELx_EE (BIT(25))
|
||||
#define SCTLR_ELx_IESB (BIT(21))
|
||||
#define SCTLR_ELx_WXN (BIT(19))
|
||||
#define SCTLR_ELx_ENDB (BIT(13))
|
||||
#define SCTLR_ELx_I (BIT(12))
|
||||
#define SCTLR_ELx_SA (BIT(3))
|
||||
#define SCTLR_ELx_C (BIT(2))
|
||||
#define SCTLR_ELx_A (BIT(1))
|
||||
#define SCTLR_ELx_M (BIT(0))
|
||||
|
||||
#define SCTLR_ELx_FLAGS (SCTLR_ELx_M | SCTLR_ELx_A | SCTLR_ELx_C | \
|
||||
SCTLR_ELx_SA | SCTLR_ELx_I | SCTLR_ELx_IESB)
|
||||
|
||||
/* SCTLR_EL2 specific flags. */
|
||||
#define SCTLR_EL2_RES1 ((_BITUL(4)) | (_BITUL(5)) | (_BITUL(11)) | (_BITUL(16)) | \
|
||||
(_BITUL(18)) | (_BITUL(22)) | (_BITUL(23)) | (_BITUL(28)) | \
|
||||
(_BITUL(29)))
|
||||
#define SCTLR_EL2_RES0 ((_BITUL(6)) | (_BITUL(7)) | (_BITUL(8)) | (_BITUL(9)) | \
|
||||
(_BITUL(10)) | (_BITUL(13)) | (_BITUL(14)) | (_BITUL(15)) | \
|
||||
(_BITUL(17)) | (_BITUL(20)) | (_BITUL(24)) | (_BITUL(26)) | \
|
||||
(_BITUL(27)) | (_BITUL(30)) | (_BITUL(31)) | \
|
||||
#define SCTLR_EL2_RES1 ((BIT(4)) | (BIT(5)) | (BIT(11)) | (BIT(16)) | \
|
||||
(BIT(18)) | (BIT(22)) | (BIT(23)) | (BIT(28)) | \
|
||||
(BIT(29)))
|
||||
#define SCTLR_EL2_RES0 ((BIT(6)) | (BIT(7)) | (BIT(8)) | (BIT(9)) | \
|
||||
(BIT(10)) | (BIT(13)) | (BIT(14)) | (BIT(15)) | \
|
||||
(BIT(17)) | (BIT(20)) | (BIT(24)) | (BIT(26)) | \
|
||||
(BIT(27)) | (BIT(30)) | (BIT(31)) | \
|
||||
(0xffffefffUL << 32))
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
@@ -524,23 +524,23 @@
|
||||
#endif
|
||||
|
||||
/* SCTLR_EL1 specific flags. */
|
||||
#define SCTLR_EL1_UCI (_BITUL(26))
|
||||
#define SCTLR_EL1_E0E (_BITUL(24))
|
||||
#define SCTLR_EL1_SPAN (_BITUL(23))
|
||||
#define SCTLR_EL1_NTWE (_BITUL(18))
|
||||
#define SCTLR_EL1_NTWI (_BITUL(16))
|
||||
#define SCTLR_EL1_UCT (_BITUL(15))
|
||||
#define SCTLR_EL1_DZE (_BITUL(14))
|
||||
#define SCTLR_EL1_UMA (_BITUL(9))
|
||||
#define SCTLR_EL1_SED (_BITUL(8))
|
||||
#define SCTLR_EL1_ITD (_BITUL(7))
|
||||
#define SCTLR_EL1_CP15BEN (_BITUL(5))
|
||||
#define SCTLR_EL1_SA0 (_BITUL(4))
|
||||
#define SCTLR_EL1_UCI (BIT(26))
|
||||
#define SCTLR_EL1_E0E (BIT(24))
|
||||
#define SCTLR_EL1_SPAN (BIT(23))
|
||||
#define SCTLR_EL1_NTWE (BIT(18))
|
||||
#define SCTLR_EL1_NTWI (BIT(16))
|
||||
#define SCTLR_EL1_UCT (BIT(15))
|
||||
#define SCTLR_EL1_DZE (BIT(14))
|
||||
#define SCTLR_EL1_UMA (BIT(9))
|
||||
#define SCTLR_EL1_SED (BIT(8))
|
||||
#define SCTLR_EL1_ITD (BIT(7))
|
||||
#define SCTLR_EL1_CP15BEN (BIT(5))
|
||||
#define SCTLR_EL1_SA0 (BIT(4))
|
||||
|
||||
#define SCTLR_EL1_RES1 ((_BITUL(11)) | (_BITUL(20)) | (_BITUL(22)) | (_BITUL(28)) | \
|
||||
(_BITUL(29)))
|
||||
#define SCTLR_EL1_RES0 ((_BITUL(6)) | (_BITUL(10)) | (_BITUL(13)) | (_BITUL(17)) | \
|
||||
(_BITUL(27)) | (_BITUL(30)) | (_BITUL(31)) | \
|
||||
#define SCTLR_EL1_RES1 ((BIT(11)) | (BIT(20)) | (BIT(22)) | (BIT(28)) | \
|
||||
(BIT(29)))
|
||||
#define SCTLR_EL1_RES0 ((BIT(6)) | (BIT(10)) | (BIT(13)) | (BIT(17)) | \
|
||||
(BIT(27)) | (BIT(30)) | (BIT(31)) | \
|
||||
(0xffffefffUL << 32))
|
||||
|
||||
#ifdef CONFIG_CPU_BIG_ENDIAN
|
||||
@@ -756,13 +756,13 @@
|
||||
#define ZCR_ELx_LEN_SIZE 9
|
||||
#define ZCR_ELx_LEN_MASK 0x1ff
|
||||
|
||||
#define CPACR_EL1_ZEN_EL1EN (_BITUL(16)) /* enable EL1 access */
|
||||
#define CPACR_EL1_ZEN_EL0EN (_BITUL(17)) /* enable EL0 access, if EL1EN set */
|
||||
#define CPACR_EL1_ZEN_EL1EN (BIT(16)) /* enable EL1 access */
|
||||
#define CPACR_EL1_ZEN_EL0EN (BIT(17)) /* enable EL0 access, if EL1EN set */
|
||||
#define CPACR_EL1_ZEN (CPACR_EL1_ZEN_EL1EN | CPACR_EL1_ZEN_EL0EN)
|
||||
|
||||
|
||||
/* Safe value for MPIDR_EL1: Bit31:RES1, Bit30:U:0, Bit24:MT:0 */
|
||||
#define SYS_MPIDR_SAFE_VAL (_BITUL(31))
|
||||
#define SYS_MPIDR_SAFE_VAL (BIT(31))
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -59,28 +59,6 @@ static inline const struct fault_info *esr_to_debug_fault_info(unsigned int esr)
|
||||
return debug_fault_info + DBG_ESR_EVT(esr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
static inline int notify_page_fault(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* kprobe_running() needs smp_processor_id() */
|
||||
if (!user_mode(regs)) {
|
||||
preempt_disable();
|
||||
if (kprobe_running() && kprobe_fault_handler(regs, esr))
|
||||
ret = 1;
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static inline int notify_page_fault(struct pt_regs *regs, unsigned int esr)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void data_abort_decode(unsigned int esr)
|
||||
{
|
||||
pr_alert("Data abort info:\n");
|
||||
@@ -434,7 +412,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
|
||||
unsigned long vm_flags = VM_READ | VM_WRITE;
|
||||
unsigned int mm_flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
||||
|
||||
if (notify_page_fault(regs, esr))
|
||||
if (kprobe_page_fault(regs, esr))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
||||
@@ -942,6 +942,11 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys)
|
||||
return dt_virt;
|
||||
}
|
||||
|
||||
int __init arch_ioremap_p4d_supported(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __init arch_ioremap_pud_supported(void)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#define _ASM_HEXAGON_SYSCALL_H
|
||||
|
||||
#include <uapi/linux/audit.h>
|
||||
#include <linux/err.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
||||
typedef long (*syscall_fn)(unsigned long, unsigned long,
|
||||
unsigned long, unsigned long,
|
||||
@@ -31,6 +33,18 @@ static inline void syscall_get_arguments(struct task_struct *task,
|
||||
memcpy(args, &(®s->r00)[0], 6 * sizeof(args[0]));
|
||||
}
|
||||
|
||||
static inline long syscall_get_error(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return IS_ERR_VALUE(regs->r00) ? regs->r00 : 0;
|
||||
}
|
||||
|
||||
static inline long syscall_get_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return regs->r00;
|
||||
}
|
||||
|
||||
static inline int syscall_get_arch(struct task_struct *task)
|
||||
{
|
||||
return AUDIT_ARCH_HEXAGON;
|
||||
|
||||
@@ -21,28 +21,6 @@
|
||||
|
||||
extern int die(char *, struct pt_regs *, long);
|
||||
|
||||
#ifdef CONFIG_KPROBES
|
||||
static inline int notify_page_fault(struct pt_regs *regs, int trap)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!user_mode(regs)) {
|
||||
/* kprobe_running() needs smp_processor_id() */
|
||||
preempt_disable();
|
||||
if (kprobe_running() && kprobe_fault_handler(regs, trap))
|
||||
ret = 1;
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
static inline int notify_page_fault(struct pt_regs *regs, int trap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if ADDRESS points at a page in the kernel's mapped segment
|
||||
* (inside region 5, on ia64) and that page is present.
|
||||
@@ -116,7 +94,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re
|
||||
/*
|
||||
* This is to handle the kprobes on user space access instructions
|
||||
*/
|
||||
if (notify_page_fault(regs, TRAP_BRKPT))
|
||||
if (kprobe_page_fault(regs, TRAP_BRKPT))
|
||||
return;
|
||||
|
||||
if (user_mode(regs))
|
||||
|
||||
@@ -149,8 +149,6 @@ static inline void *isa_bus_to_virt(unsigned long address)
|
||||
return phys_to_virt(address);
|
||||
}
|
||||
|
||||
#define isa_page_to_bus page_to_phys
|
||||
|
||||
/*
|
||||
* However PCI ones are not necessarily 1:1 and therefore these interfaces
|
||||
* are forbidden in portable PCI drivers.
|
||||
|
||||
@@ -41,6 +41,7 @@ do { \
|
||||
#define kretprobe_blacklist_size 0
|
||||
|
||||
void arch_remove_kprobe(struct kprobe *p);
|
||||
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
|
||||
|
||||
/* Architecture specific copy of original instruction*/
|
||||
struct arch_specific_insn {
|
||||
|
||||
@@ -89,6 +89,12 @@ static inline unsigned long mips_get_syscall_arg(unsigned long *arg,
|
||||
unreachable();
|
||||
}
|
||||
|
||||
static inline long syscall_get_error(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return regs->regs[7] ? -regs->regs[2] : 0;
|
||||
}
|
||||
|
||||
static inline long syscall_get_return_value(struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
||||
@@ -398,7 +398,7 @@ out:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
|
||||
{
|
||||
struct kprobe *cur = kprobe_running();
|
||||
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user