diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index d847cbbcee4..a128a1f89e6 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h @@ -98,19 +98,23 @@ #define TASK_UNMAPPED_BASE UL(0x00000000) #endif +#ifndef PHYS_OFFSET +#define PHYS_OFFSET UL(CONFIG_DRAM_BASE) +#endif + #ifndef END_MEM #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) #endif #ifndef PAGE_OFFSET -#define PAGE_OFFSET PLAT_PHYS_OFFSET +#define PAGE_OFFSET (PHYS_OFFSET) #endif /* * The module can be at any place in ram in nommu mode. */ #define MODULES_END (END_MEM) -#define MODULES_VADDR PAGE_OFFSET +#define MODULES_VADDR (PHYS_OFFSET) #define XIP_VIRT_ADDR(physaddr) (physaddr) @@ -137,16 +141,6 @@ #define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page))) #define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys))) -/* - * PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical - * memory. This is used for XIP and NoMMU kernels, or by kernels which - * have their own mach/memory.h. Assembly code must always use - * PLAT_PHYS_OFFSET and not PHYS_OFFSET. - */ -#ifndef PLAT_PHYS_OFFSET -#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) -#endif - #ifndef __ASSEMBLY__ /* @@ -189,15 +183,22 @@ static inline unsigned long __phys_to_virt(unsigned long x) return t; } #else - -#define PHYS_OFFSET PLAT_PHYS_OFFSET - #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) +#endif +#endif +#endif /* __ASSEMBLY__ */ +#ifndef PHYS_OFFSET +#ifdef PLAT_PHYS_OFFSET +#define PHYS_OFFSET PLAT_PHYS_OFFSET +#else +#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) #endif #endif +#ifndef __ASSEMBLY__ + /* * PFNs are used to describe any physical page; this means * PFN 0 == physical address 0. @@ -281,4 +282,4 @@ static inline __deprecated void *bus_to_virt(unsigned long x) #include -#endif +#endif \ No newline at end of file diff --git a/crypto/blkcipher.c b/crypto/blkcipher.c index 09b24322c8b..496557a15f7 100644 --- a/crypto/blkcipher.c +++ b/crypto/blkcipher.c @@ -233,8 +233,6 @@ static int blkcipher_walk_next(struct blkcipher_desc *desc, return blkcipher_walk_done(desc, walk, -EINVAL); } - bsize = min(walk->blocksize, n); - walk->flags &= ~(BLKCIPHER_WALK_SLOW | BLKCIPHER_WALK_COPY | BLKCIPHER_WALK_DIFF); if (!scatterwalk_aligned(&walk->in, walk->alignmask) || diff --git a/fs/exec.c b/fs/exec.c index ae2718e540f..fd2778918e8 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1305,9 +1305,6 @@ static void bprm_fill_uid(struct linux_binprm *bprm) if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) return; - if (current->no_new_privs) - return; - inode = file_inode(bprm->file); mode = ACCESS_ONCE(inode->i_mode); if (!(mode & (S_ISUID|S_ISGID))) diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 567ad1f0e2d..35cc1f40b82 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -438,37 +438,6 @@ posix_acl_create(struct posix_acl **acl, gfp_t gfp, umode_t *mode_p) } EXPORT_SYMBOL(posix_acl_create); -/** - * posix_acl_update_mode - update mode in set_acl - * - * Update the file mode when setting an ACL: compute the new file permission - * bits based on the ACL. In addition, if the ACL is equivalent to the new - * file mode, set *acl to NULL to indicate that no ACL should be set. - * - * As with chmod, clear the setgit bit if the caller is not in the owning group - * or capable of CAP_FSETID (see inode_change_ok). - * - * Called from set_acl inode operations. - */ -int posix_acl_update_mode(struct inode *inode, umode_t *mode_p, - struct posix_acl **acl) -{ - umode_t mode = inode->i_mode; - int error; - - error = posix_acl_equiv_mode(*acl, &mode); - if (error < 0) - return error; - if (error == 0) - *acl = NULL; - if (!in_group_p(inode->i_gid) && - !capable_wrt_inode_uidgid(inode, CAP_FSETID)) - mode &= ~S_ISGID; - *mode_p = mode; - return 0; -} -EXPORT_SYMBOL(posix_acl_update_mode); - int posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode) { diff --git a/kernel/power/power.h b/kernel/power/power.h index 4c21e724161..f1a2afbc26f 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h @@ -190,12 +190,14 @@ struct pm_sleep_state { /* kernel/power/suspend.c */ extern struct pm_sleep_state pm_states[]; +extern bool valid_state(suspend_state_t state); extern int suspend_devices_and_enter(suspend_state_t state); #else /* !CONFIG_SUSPEND */ static inline int suspend_devices_and_enter(suspend_state_t state) { return -ENOSYS; } +static inline bool valid_state(suspend_state_t state) { return false; } #endif /* !CONFIG_SUSPEND */ #ifdef CONFIG_PM_TEST_SUSPEND diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index b554a91fdee..f4979aed57e 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -66,7 +66,7 @@ void freeze_wake(void) } EXPORT_SYMBOL_GPL(freeze_wake); -static bool valid_state(suspend_state_t state) +bool valid_state(suspend_state_t state) { /* * PM_SUSPEND_STANDBY and PM_SUSPEND_MEM states need low level