Unverified Commit 7962c2ed authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Arnd Bergmann
Browse files

arch: remove unused function syscall_set_arguments()



This function appears to have been unused since it was first introduced in
commit 828c365c ("tracehook: asm/syscall.h").

Signed-off-by: default avatarPeter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/I8ce04f002903a37c0b6c1d16e9b2a3afa716c097


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 6880fa6c
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -77,16 +77,6 @@ static inline void syscall_get_arguments(struct task_struct *task,
	memcpy(args, &regs->ARM_r0 + 1, 5 * sizeof(args[0]));
}

static inline void syscall_set_arguments(struct task_struct *task,
					 struct pt_regs *regs,
					 const unsigned long *args)
{
	regs->ARM_ORIG_r0 = args[0];
	args++;

	memcpy(&regs->ARM_r0 + 1, args, 5 * sizeof(args[0]));
}

static inline int syscall_get_arch(struct task_struct *task)
{
	/* ARM tasks don't change audit architectures on the fly. */
+0 −10
Original line number Diff line number Diff line
@@ -73,16 +73,6 @@ static inline void syscall_get_arguments(struct task_struct *task,
	memcpy(args, &regs->regs[1], 5 * sizeof(args[0]));
}

static inline void syscall_set_arguments(struct task_struct *task,
					 struct pt_regs *regs,
					 const unsigned long *args)
{
	regs->orig_x0 = args[0];
	args++;

	memcpy(&regs->regs[1], args, 5 * sizeof(args[0]));
}

/*
 * We don't care about endianness (__AUDIT_ARCH_LE bit) here because
 * AArch64 has the same system calls both on little- and big- endian.
+0 −9
Original line number Diff line number Diff line
@@ -59,15 +59,6 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
	memcpy(args, &regs->a1, 5 * sizeof(args[0]));
}

static inline void
syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
		      const unsigned long *args)
{
	regs->orig_a0 = args[0];
	args++;
	memcpy(&regs->a1, args, 5 * sizeof(regs->a1));
}

static inline int
syscall_get_arch(struct task_struct *task)
{
+2 −15
Original line number Diff line number Diff line
@@ -55,21 +55,8 @@ static inline void syscall_set_return_value(struct task_struct *task,
	}
}

extern void ia64_syscall_get_set_arguments(struct task_struct *task,
	struct pt_regs *regs, unsigned long *args, int rw);
static inline void syscall_get_arguments(struct task_struct *task,
					 struct pt_regs *regs,
					 unsigned long *args)
{
	ia64_syscall_get_set_arguments(task, regs, args, 0);
}

static inline void syscall_set_arguments(struct task_struct *task,
					 struct pt_regs *regs,
					 unsigned long *args)
{
	ia64_syscall_get_set_arguments(task, regs, args, 1);
}
extern void syscall_get_arguments(struct task_struct *task,
	struct pt_regs *regs, unsigned long *args);

static inline int syscall_get_arch(struct task_struct *task)
{
+12 −19
Original line number Diff line number Diff line
@@ -2001,17 +2001,16 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *tsk)
	return &user_ia64_view;
}

struct syscall_get_set_args {
struct syscall_get_args {
	unsigned int i;
	unsigned int n;
	unsigned long *args;
	struct pt_regs *regs;
	int rw;
};

static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data)
static void syscall_get_args_cb(struct unw_frame_info *info, void *data)
{
	struct syscall_get_set_args *args = data;
	struct syscall_get_args *args = data;
	struct pt_regs *pt = args->regs;
	unsigned long *krbs, cfm, ndirty, nlocals, nouts;
	int i, count;
@@ -2042,37 +2041,31 @@ static void syscall_get_set_args_cb(struct unw_frame_info *info, void *data)
	/* Iterate over outs. */
	for (i = 0; i < count; i++) {
		int j = ndirty + nlocals + i + args->i;
		if (args->rw)
			*ia64_rse_skip_regs(krbs, j) = args->args[i];
		else
		args->args[i] = *ia64_rse_skip_regs(krbs, j);
	}

	if (!args->rw) {
	while (i < args->n) {
		args->args[i] = 0;
		i++;
	}
}
}

void ia64_syscall_get_set_arguments(struct task_struct *task,
	struct pt_regs *regs, unsigned long *args, int rw)
void syscall_get_arguments(struct task_struct *task,
	struct pt_regs *regs, unsigned long *args)
{
	struct syscall_get_set_args data = {
	struct syscall_get_args data = {
		.i = 0,
		.n = 6,
		.args = args,
		.regs = regs,
		.rw = rw,
	};

	if (task == current)
		unw_init_running(syscall_get_set_args_cb, &data);
		unw_init_running(syscall_get_args_cb, &data);
	else {
		struct unw_frame_info ufi;
		memset(&ufi, 0, sizeof(ufi));
		unw_init_from_blocked_task(&ufi, task);
		syscall_get_set_args_cb(&ufi, &data);
		syscall_get_args_cb(&ufi, &data);
	}
}
Loading