mbox series

[git,pull] sparc syscall stuff

Message ID 20180407204414.GC30522@ZenIV.linux.org.uk
State Not Applicable
Delegated to: David Miller
Headers show
Series [git,pull] sparc syscall stuff | expand

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git misc.sparc

Message

Al Viro April 7, 2018, 8:44 p.m. UTC
sparc syscall stuff - killing pointless wrappers, conversions to
{COMPAT_,}SYSCALL_DEFINE.

	Conflicts in arch/sparc/kernel/sys_sparc32.c are not hard to resolve,
but keep in mind that casts to u64 are needed there.  I'd pushed a variant of
resolution into #test-merge.

The following changes since commit 0c8efd610b58cb23cefdfa12015799079aef94ae:

  Linux 4.16-rc5 (2018-03-11 17:25:09 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git misc.sparc

for you to fetch changes up to 47db69752b22de2ac315d094fd09fac31b0d3bfc:

  sparc: get rid of asm wrapper for nis_syscall() (2018-03-20 12:05:17 -0400)

----------------------------------------------------------------
Al Viro (11):
      sparc: get rid of sys_sparc_pipe() wrappers
      sparc: kill useless SIGN... wrappers
      sparc: get rid of remaining SIGN... wrappers
      sparc: bury a zombie extern that had been that way for twenty years
      sparc: trivial conversions to {COMPAT_,}SYSCALL_DEFINE()
      sparc: get rid of memory_ordering(2) wrapper
      switch sparc_remap_file_pages() to SYSCALL_DEFINE
      convert compat sync_file_range() to COMPAT_SYSCALL_DEFINE
      sparc: switch compat pread64 and pwrite64 to COMPAT_SYSCALL_DEFINE
      sparc: switch compat {f,}truncate64() to COMPAT_SYSCALL_DEFINE
      sparc: get rid of asm wrapper for nis_syscall()

 arch/sparc/kernel/entry.S        | 15 -------
 arch/sparc/kernel/sys32.S        | 38 ------------------
 arch/sparc/kernel/sys_sparc32.c  | 87 ++++++++++++++++------------------------
 arch/sparc/kernel/sys_sparc_32.c | 31 +++++++-------
 arch/sparc/kernel/sys_sparc_64.c | 18 ++++-----
 arch/sparc/kernel/syscalls.S     |  9 -----
 arch/sparc/kernel/systbls.h      | 53 ++++++++++++------------
 arch/sparc/kernel/systbls_32.S   |  2 +-
 arch/sparc/kernel/systbls_64.S   | 24 +++++------
 9 files changed, 97 insertions(+), 180 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Linus Torvalds April 7, 2018, 9:37 p.m. UTC | #1
On Sat, Apr 7, 2018 at 1:44 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
>         Conflicts in arch/sparc/kernel/sys_sparc32.c are not hard to resolve,
> but keep in mind that casts to u64 are needed there.  I'd pushed a variant of
> resolution into #test-merge.

You say "keep in mind that casts to u64 are needed there", but then
you seem to be missing them yourself in your test merge (see
[f]truncate64).

I only noticed because I decided to check my merge against yours. I
strive to always do the merge resolution, but if people give me a test
merge, I then double-check against it after-the-fack.

Hmm?

           Linus
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Al Viro April 7, 2018, 11:02 p.m. UTC | #2
On Sat, Apr 07, 2018 at 02:37:24PM -0700, Linus Torvalds wrote:
> On Sat, Apr 7, 2018 at 1:44 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> >         Conflicts in arch/sparc/kernel/sys_sparc32.c are not hard to resolve,
> > but keep in mind that casts to u64 are needed there.  I'd pushed a variant of
> > resolution into #test-merge.
> 
> You say "keep in mind that casts to u64 are needed there", but then
> you seem to be missing them yourself in your test merge (see
> [f]truncate64).
> 
> I only noticed because I decided to check my merge against yours. I
> strive to always do the merge resolution, but if people give me a test
> merge, I then double-check against it after-the-fack.
> 
> Hmm?

Merge fuckup; mine ;-/  FWIW, the corresponding part in my branch (in 3d0e354e4e51) is

-asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low)
+COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, low)
 {
-       if ((int)high < 0)
-               return -EINVAL;
-       else
-               return sys_truncate(path, (high << 32) | low);
+       return sys_truncate(path, ((u64)high << 32) | low);
 }

linux-next resolution is the right one -
git diff v4.16..HEAD -- arch/sparc/kernel/sys_sparc32.c
gives
-asmlinkage long sys32_truncate64(const char __user * path, unsigned long high, unsigned long low)
+COMPAT_SYSCALL_DEFINE3(truncate64, const char __user *, path, u32, high, u32, low)
 {
-       if ((int)high < 0)
-               return -EINVAL;
-       else
-               return sys_truncate(path, (high << 32) | low);
+       return ksys_truncate(path, ((u64)high << 32) | low);
 }
etc. in there.  Again, my apologies.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html