Thread (11 messages) 11 messages, 3 authors, 2016-09-16

Re: [PATCH v3 1/3] syscalls,x86 Expose arch_prctl on x86-32.

flat view

From: Kyle Huey <hidden>
Date: 2016-09-16 15:56:41
Also in: linux-um, lkml

On Fri, Sep 16, 2016 at 12:50 AM, Thomas Gleixner [off-list ref] wrote:
On Thu, 15 Sep 2016, Kyle Huey wrote:

First of all, please add a cover letter [PATCH 0/N] to your patch series
and send it with something which provides proper mail threading.
See: git-send-email, quilt
I did ... seems like using git-send-email with
--cc-cmd=scripts/get_maintainer.pl is not a good idea since people get
CCd to some parts of the thread and not others.

https://lkml.org/lkml/2016/9/15/811
quoted
arch_prctl is currently 64-bit only. Wire it up for 32-bits, as a no-op for
now. Rename the second arg to a more generic name.
This changelog is useless.

- it does not provide any rationale for this change, i.e. why this is
  required. Just because its 64bit only is not a reason.

- "Rename the second arg to a more generic name" does not give
  any useful information.

Misleading information is worse than no information.

Further your patch does 5 things at once. It wants to be split into parts:

1) Rename do_arch_prctl() and change the argument name,
quoted
-long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
+long do_arch_prctl_64(struct task_struct *task, int code, unsigned long arg2)
2) Provide do_arch_prctl_common() and hook it up to the arch_prctl syscall
quoted
-long sys_arch_prctl(int code, unsigned long addr)
+SYSCALL_DEFINE2(arch_prctl, int, code, unsigned long, arg2)
 {
-     return do_arch_prctl(current, code, addr);
+     long ret;
+
+     ret = do_arch_prctl_64(current, code, arg2);
+     if (ret == -EINVAL)
+             ret = do_arch_prctl_common(current, code, arg2);
+
+     return ret;
 }
3) Implement the compat version
Ok.

- Kyle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help