Skip to content

Commit

Permalink
binfmt_flat: remove flat_set_persistent
Browse files Browse the repository at this point in the history
This helper is a no-op on all architectures, remove it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
  • Loading branch information
Christoph Hellwig authored and Greg Ungerer committed Jun 23, 2019
1 parent 9ee24b2 commit 2f3196d
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion arch/arm/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
}

#define flat_get_relocate_addr(rel) (rel)
#define flat_set_persistent(relval, p) 0

#endif /* __ARM_FLAT_H__ */
1 change: 0 additions & 1 deletion arch/c6x/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
return 0;
}
#define flat_get_relocate_addr(rel) (rel)
#define flat_set_persistent(relval, p) 0

#endif /* __ASM_C6X_FLAT_H */
1 change: 0 additions & 1 deletion arch/h8300/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#define flat_argvp_envp_on_stack() 1
#define flat_old_ram_flag(flags) 1
#define flat_set_persistent(relval, p) 0

/*
* on the H8 a couple of the relocations have an instruction in the
Expand Down
5 changes: 0 additions & 5 deletions arch/m68k/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
}
#define flat_get_relocate_addr(rel) (rel)

static inline int flat_set_persistent(u32 relval, u32 *persistent)
{
return 0;
}

#define FLAT_PLAT_INIT(regs) \
do { \
if (current->mm) \
Expand Down
1 change: 0 additions & 1 deletion arch/microblaze/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#define flat_argvp_envp_on_stack() 0
#define flat_old_ram_flag(flags) (flags)
#define flat_set_persistent(relval, p) 0

/*
* Microblaze works a little differently from other arches, because
Expand Down
1 change: 0 additions & 1 deletion arch/sh/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
return 0;
}
#define flat_get_relocate_addr(rel) (rel)
#define flat_set_persistent(relval, p) ({ (void)p; 0; })

#define FLAT_PLAT_INIT(_r) \
do { _r->regs[0]=0; _r->regs[1]=0; _r->regs[2]=0; _r->regs[3]=0; \
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/include/asm/flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ static inline int flat_put_addr_at_rp(u32 __user *rp, u32 addr, u32 rel)
return 0;
}
#define flat_get_relocate_addr(rel) (rel)
#define flat_set_persistent(relval, p) 0

#endif /* __ASM_XTENSA_FLAT_H */
2 changes: 0 additions & 2 deletions fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@ static int load_flat_file(struct linux_binprm *bprm,
if (get_user(relval, reloc + i))
return -EFAULT;
relval = ntohl(relval);
if (flat_set_persistent(relval, &persistent))
continue;
addr = flat_get_relocate_addr(relval);
rp = (u32 __user *)calc_reloc(addr, libinfo, id, 1);
if (rp == (u32 __user *)RELOC_FAILED) {
Expand Down

0 comments on commit 2f3196d

Please sign in to comment.