mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
Merge branch 'akpm' (patches from Andrew)
Merge first patchbomb from Andrew Morton: - arch/sh updates - ocfs2 updates - kernel/watchdog feature - about half of mm/ * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (122 commits) Documentation: update arch list in the 'memtest' entry Kconfig: memtest: update number of test patterns up to 17 arm: add support for memtest arm64: add support for memtest memtest: use phys_addr_t for physical addresses mm: move memtest under mm mm, hugetlb: abort __get_user_pages if current has been oom killed mm, mempool: do not allow atomic resizing memcg: print cgroup information when system panics due to panic_on_oom mm: numa: remove migrate_ratelimited mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE mm: split ET_DYN ASLR from mmap ASLR s390: redefine randomize_et_dyn for ELF_ET_DYN_BASE mm: expose arch_mmap_rnd when available s390: standardize mmap_rnd() usage powerpc: standardize mmap_rnd() usage mips: extract logic for mmap_rnd() arm64: standardize mmap_rnd() usage x86: standardize mmap_rnd() usage arm: factor out mmap ASLR into mmap_rnd ...
This commit is contained in:
commit
1dcf58d6e6
153 changed files with 2312 additions and 1419 deletions
|
|
@ -5,6 +5,10 @@
|
|||
#include <linux/exportfs.h>
|
||||
#include <linux/mm.h>
|
||||
|
||||
#define CLEANCACHE_NO_POOL -1
|
||||
#define CLEANCACHE_NO_BACKEND -2
|
||||
#define CLEANCACHE_NO_BACKEND_SHARED -3
|
||||
|
||||
#define CLEANCACHE_KEY_MAX 6
|
||||
|
||||
/*
|
||||
|
|
@ -33,10 +37,9 @@ struct cleancache_ops {
|
|||
void (*invalidate_fs)(int);
|
||||
};
|
||||
|
||||
extern struct cleancache_ops *
|
||||
cleancache_register_ops(struct cleancache_ops *ops);
|
||||
extern int cleancache_register_ops(struct cleancache_ops *ops);
|
||||
extern void __cleancache_init_fs(struct super_block *);
|
||||
extern void __cleancache_init_shared_fs(char *, struct super_block *);
|
||||
extern void __cleancache_init_shared_fs(struct super_block *);
|
||||
extern int __cleancache_get_page(struct page *);
|
||||
extern void __cleancache_put_page(struct page *);
|
||||
extern void __cleancache_invalidate_page(struct address_space *, struct page *);
|
||||
|
|
@ -78,10 +81,10 @@ static inline void cleancache_init_fs(struct super_block *sb)
|
|||
__cleancache_init_fs(sb);
|
||||
}
|
||||
|
||||
static inline void cleancache_init_shared_fs(char *uuid, struct super_block *sb)
|
||||
static inline void cleancache_init_shared_fs(struct super_block *sb)
|
||||
{
|
||||
if (cleancache_enabled)
|
||||
__cleancache_init_shared_fs(uuid, sb);
|
||||
__cleancache_init_shared_fs(sb);
|
||||
}
|
||||
|
||||
static inline int cleancache_get_page(struct page *page)
|
||||
|
|
|
|||
|
|
@ -16,16 +16,16 @@
|
|||
struct cma;
|
||||
|
||||
extern unsigned long totalcma_pages;
|
||||
extern phys_addr_t cma_get_base(struct cma *cma);
|
||||
extern unsigned long cma_get_size(struct cma *cma);
|
||||
extern phys_addr_t cma_get_base(const struct cma *cma);
|
||||
extern unsigned long cma_get_size(const struct cma *cma);
|
||||
|
||||
extern int __init cma_declare_contiguous(phys_addr_t base,
|
||||
phys_addr_t size, phys_addr_t limit,
|
||||
phys_addr_t alignment, unsigned int order_per_bit,
|
||||
bool fixed, struct cma **res_cma);
|
||||
extern int cma_init_reserved_mem(phys_addr_t base,
|
||||
phys_addr_t size, int order_per_bit,
|
||||
extern int cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
|
||||
unsigned int order_per_bit,
|
||||
struct cma **res_cma);
|
||||
extern struct page *cma_alloc(struct cma *cma, int count, unsigned int align);
|
||||
extern bool cma_release(struct cma *cma, struct page *pages, int count);
|
||||
extern struct page *cma_alloc(struct cma *cma, unsigned int count, unsigned int align);
|
||||
extern bool cma_release(struct cma *cma, const struct page *pages, unsigned int count);
|
||||
#endif
|
||||
|
|
|
|||
22
include/linux/elf-randomize.h
Normal file
22
include/linux/elf-randomize.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef _ELF_RANDOMIZE_H
|
||||
#define _ELF_RANDOMIZE_H
|
||||
|
||||
struct mm_struct;
|
||||
|
||||
#ifndef CONFIG_ARCH_HAS_ELF_RANDOMIZE
|
||||
static inline unsigned long arch_mmap_rnd(void) { return 0; }
|
||||
# if defined(arch_randomize_brk) && defined(CONFIG_COMPAT_BRK)
|
||||
# define compat_brk_randomized
|
||||
# endif
|
||||
# ifndef arch_randomize_brk
|
||||
# define arch_randomize_brk(mm) (mm->brk)
|
||||
# endif
|
||||
#else
|
||||
extern unsigned long arch_mmap_rnd(void);
|
||||
extern unsigned long arch_randomize_brk(struct mm_struct *mm);
|
||||
# ifdef CONFIG_COMPAT_BRK
|
||||
# define compat_brk_randomized
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -57,8 +57,10 @@ struct vm_area_struct;
|
|||
* _might_ fail. This depends upon the particular VM implementation.
|
||||
*
|
||||
* __GFP_NOFAIL: The VM implementation _must_ retry infinitely: the caller
|
||||
* cannot handle allocation failures. This modifier is deprecated and no new
|
||||
* users should be added.
|
||||
* cannot handle allocation failures. New users should be evaluated carefully
|
||||
* (and the flag should be used only when there is no reasonable failure policy)
|
||||
* but it is definitely preferable to use the flag rather than opencode endless
|
||||
* loop around allocator.
|
||||
*
|
||||
* __GFP_NORETRY: The VM implementation must not retry indefinitely.
|
||||
*
|
||||
|
|
@ -117,16 +119,6 @@ struct vm_area_struct;
|
|||
__GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN | \
|
||||
__GFP_NO_KSWAPD)
|
||||
|
||||
/*
|
||||
* GFP_THISNODE does not perform any reclaim, you most likely want to
|
||||
* use __GFP_THISNODE to allocate from a given node without fallback!
|
||||
*/
|
||||
#ifdef CONFIG_NUMA
|
||||
#define GFP_THISNODE (__GFP_THISNODE | __GFP_NOWARN | __GFP_NORETRY)
|
||||
#else
|
||||
#define GFP_THISNODE ((__force gfp_t)0)
|
||||
#endif
|
||||
|
||||
/* This mask makes up all the page movable related flags */
|
||||
#define GFP_MOVABLE_MASK (__GFP_RECLAIMABLE|__GFP_MOVABLE)
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@ static inline int ioremap_page_range(unsigned long addr, unsigned long end,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_ARCH_HUGE_VMAP
|
||||
void __init ioremap_huge_init(void);
|
||||
int arch_ioremap_pud_supported(void);
|
||||
int arch_ioremap_pmd_supported(void);
|
||||
#else
|
||||
static inline void ioremap_huge_init(void) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Managed iomap interface
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -365,6 +365,14 @@ static inline unsigned long memblock_region_reserved_end_pfn(const struct memblo
|
|||
#define __initdata_memblock
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MEMTEST
|
||||
extern void early_memtest(phys_addr_t start, phys_addr_t end);
|
||||
#else
|
||||
static inline void early_memtest(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
static inline phys_addr_t memblock_alloc(phys_addr_t size, phys_addr_t align)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ extern void get_page_bootmem(unsigned long ingo, struct page *page,
|
|||
void get_online_mems(void);
|
||||
void put_online_mems(void);
|
||||
|
||||
void mem_hotplug_begin(void);
|
||||
void mem_hotplug_done(void);
|
||||
|
||||
#else /* ! CONFIG_MEMORY_HOTPLUG */
|
||||
/*
|
||||
* Stub functions for when hotplug is off
|
||||
|
|
@ -231,6 +234,9 @@ static inline int try_online_node(int nid)
|
|||
static inline void get_online_mems(void) {}
|
||||
static inline void put_online_mems(void) {}
|
||||
|
||||
static inline void mem_hotplug_begin(void) {}
|
||||
static inline void mem_hotplug_done(void) {}
|
||||
|
||||
#endif /* ! CONFIG_MEMORY_HOTPLUG */
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTREMOVE
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
|
|||
mempool_free_t *free_fn, void *pool_data,
|
||||
gfp_t gfp_mask, int nid);
|
||||
|
||||
extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
|
||||
extern int mempool_resize(mempool_t *pool, int new_min_nr);
|
||||
extern void mempool_destroy(mempool_t *pool);
|
||||
extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
|
||||
extern void mempool_free(void *element, mempool_t *pool);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
|
|||
extern bool pmd_trans_migrating(pmd_t pmd);
|
||||
extern int migrate_misplaced_page(struct page *page,
|
||||
struct vm_area_struct *vma, int node);
|
||||
extern bool migrate_ratelimited(int node);
|
||||
#else
|
||||
static inline bool pmd_trans_migrating(pmd_t pmd)
|
||||
{
|
||||
|
|
@ -80,10 +79,6 @@ static inline int migrate_misplaced_page(struct page *page,
|
|||
{
|
||||
return -EAGAIN; /* can't migrate now */
|
||||
}
|
||||
static inline bool migrate_ratelimited(int node)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_NUMA_BALANCING */
|
||||
|
||||
#if defined(CONFIG_NUMA_BALANCING) && defined(CONFIG_TRANSPARENT_HUGEPAGE)
|
||||
|
|
|
|||
|
|
@ -1294,9 +1294,11 @@ int __set_page_dirty_no_writeback(struct page *page);
|
|||
int redirty_page_for_writepage(struct writeback_control *wbc,
|
||||
struct page *page);
|
||||
void account_page_dirtied(struct page *page, struct address_space *mapping);
|
||||
void account_page_cleaned(struct page *page, struct address_space *mapping);
|
||||
int set_page_dirty(struct page *page);
|
||||
int set_page_dirty_lock(struct page *page);
|
||||
int clear_page_dirty_for_io(struct page *page);
|
||||
|
||||
int get_cmdline(struct task_struct *task, char *buffer, int buflen);
|
||||
|
||||
/* Is the vma a continuation of the stack vma above it? */
|
||||
|
|
@ -2109,7 +2111,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma,
|
|||
#define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */
|
||||
#define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO
|
||||
* and return without waiting upon it */
|
||||
#define FOLL_MLOCK 0x40 /* mark page as mlocked */
|
||||
#define FOLL_POPULATE 0x40 /* fault in page */
|
||||
#define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */
|
||||
#define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
|
||||
#define FOLL_NUMA 0x200 /* force NUMA hinting page fault */
|
||||
|
|
|
|||
|
|
@ -364,7 +364,9 @@ struct mm_struct {
|
|||
atomic_t mm_users; /* How many users with user space? */
|
||||
atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
|
||||
atomic_long_t nr_ptes; /* PTE page table pages */
|
||||
#if CONFIG_PGTABLE_LEVELS > 2
|
||||
atomic_long_t nr_pmds; /* PMD page table pages */
|
||||
#endif
|
||||
int map_count; /* number of VMAs */
|
||||
|
||||
spinlock_t page_table_lock; /* Protects page tables and some counters */
|
||||
|
|
|
|||
|
|
@ -25,16 +25,11 @@ static inline void touch_nmi_watchdog(void)
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_HARDLOCKUP_DETECTOR)
|
||||
extern void watchdog_enable_hardlockup_detector(bool val);
|
||||
extern bool watchdog_hardlockup_detector_is_enabled(void);
|
||||
extern void hardlockup_detector_disable(void);
|
||||
#else
|
||||
static inline void watchdog_enable_hardlockup_detector(bool val)
|
||||
static inline void hardlockup_detector_disable(void)
|
||||
{
|
||||
}
|
||||
static inline bool watchdog_hardlockup_detector_is_enabled(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -68,12 +63,20 @@ static inline bool trigger_allbutself_cpu_backtrace(void)
|
|||
#ifdef CONFIG_LOCKUP_DETECTOR
|
||||
int hw_nmi_is_cpu_stuck(struct pt_regs *);
|
||||
u64 hw_nmi_get_sample_period(int watchdog_thresh);
|
||||
extern int nmi_watchdog_enabled;
|
||||
extern int soft_watchdog_enabled;
|
||||
extern int watchdog_user_enabled;
|
||||
extern int watchdog_thresh;
|
||||
extern int sysctl_softlockup_all_cpu_backtrace;
|
||||
struct ctl_table;
|
||||
extern int proc_dowatchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_nmi_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_soft_watchdog(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
extern int proc_watchdog_thresh(struct ctl_table *, int ,
|
||||
void __user *, size_t *, loff_t *);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAVE_ACPI_APEI_NMI
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ extern bool oom_zonelist_trylock(struct zonelist *zonelist, gfp_t gfp_flags);
|
|||
extern void oom_zonelist_unlock(struct zonelist *zonelist, gfp_t gfp_flags);
|
||||
|
||||
extern void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
|
||||
int order, const nodemask_t *nodemask);
|
||||
int order, const nodemask_t *nodemask,
|
||||
struct mem_cgroup *memcg);
|
||||
|
||||
extern enum oom_scan_t oom_scan_process_thread(struct task_struct *task,
|
||||
unsigned long totalpages, const nodemask_t *nodemask,
|
||||
|
|
|
|||
|
|
@ -328,8 +328,6 @@ static inline void SetPageUptodate(struct page *page)
|
|||
|
||||
CLEARPAGEFLAG(Uptodate, uptodate)
|
||||
|
||||
extern void cancel_dirty_page(struct page *page, unsigned int account_size);
|
||||
|
||||
int test_clear_page_writeback(struct page *page);
|
||||
int __test_set_page_writeback(struct page *page, bool keep_write);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
/*
|
||||
* Flags to pass to kmem_cache_create().
|
||||
* The ones marked DEBUG are only valid if CONFIG_SLAB_DEBUG is set.
|
||||
* The ones marked DEBUG are only valid if CONFIG_DEBUG_SLAB is set.
|
||||
*/
|
||||
#define SLAB_DEBUG_FREE 0x00000100UL /* DEBUG: Perform (expensive) checks on free */
|
||||
#define SLAB_RED_ZONE 0x00000400UL /* DEBUG: Red zone objs in a cache */
|
||||
|
|
|
|||
Loading…
Reference in a new issue