public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Michael Cree <cree@waikato.ac.nz>
Cc: Richard Henderson <rth@twiddle.net>,
	linux-kernel@vger.kernel.org, ink@jurassic.park.msu.ru,
	mattst88@gmail.com, linux-alpha@vger.kernel.org
Subject: Re: [PATCH 0/7] Minor Alpha updates for 3.11
Date: Mon, 22 Jul 2013 21:31:41 -0500	[thread overview]
Message-ID: <1374546701.3719.33@driftwood> (raw)
In-Reply-To: <20130717000347.GB2483@stolen.phys.waikato.ac.nz> (from cree@waikato.ac.nz on Tue Jul 16 19:03:47 2013)

On 07/16/2013 07:03:47 PM, Michael Cree wrote:
> On Tue, Jul 16, 2013 at 06:35:07PM -0500, Rob Landley wrote:
> > On 07/16/2013 12:04:33 PM, Richard Henderson wrote:
> > >Here's a set of minor updates for arch/alpha that should not
> > >be controversial.
> >
> > I also note that I had to do this to get busybox to build against
> > uClibc:
> > -#define __NR_umount		 22
> > +#define __NR_umount2		 22
> > -#define __NR_oldumount		321
> > +#define __NR_umount		321
> 
> I anticipate that this will likely break userspace.

Haven't seen it so far. It's the same semantics all the other targets  
have. Haven't built the whole of linux from scratch against it yet  
though. (Most of my package builds are native and I'm still tweaking my  
build environment to get a native toolchain built.)

> busybox should be fixed to test for __NR_oldumount and then call the
> correct functions, namely oldumount and umount if __NR_oldumount is  
> defined
> and umount and umount2 if it is not defined.

The man page for umount and umount2 doesn't mention "oldumount":

$ man 2 umount | grep old
$

Only three kernel targets mention it, alpha, powerpc, and x86:

$ find arch/*/include -type f | xargs grep oldumount
arch/alpha/include/uapi/asm/unistd.h:#define __NR_oldumount		 
321
arch/powerpc/include/asm/systbl.h:SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
arch/x86/include/generated/asm/syscalls_32.h:__SYSCALL_I386(22,  
sys_oldumount, sys_oldumount)

And the other two export umount2:

$ find arch/*/include -type f | xargs grep umount2 | egrep "powerpc|x86"
arch/powerpc/include/uapi/asm/unistd.h:#define  
__NR_umount2		 52
arch/x86/include/generated/asm/unistd_32_ia32.h:#define  
__NR_ia32_umount2 52
arch/x86/include/generated/uapi/asm/unistd_x32.h:#define __NR_umount2  
(__X32_SYSCALL_BIT + 166)
arch/x86/include/generated/uapi/asm/unistd_32.h:#define __NR_umount2 52
arch/x86/include/generated/uapi/asm/unistd_64.h:#define __NR_umount2 166

So really what you're saying is busybox should #ifdef alpha/workaround  
target-specific breakage/#unifdef, and what this says to _me_ is that  
nobody's tried to build busybox on Alpha since it started using  
umount2(). How long ago was that?

   commit 6c5f2c602174c7fe0830a1fc4fe5b3dde5ed7068
   Author: Erik Andersen <andersen@codepoet.org>
   Date:   Fri May 5 19:49:33 2000 +0000

I.E. nobody's tried to build busybox umount for Alpha (except me) for  
thirteen years.

There are waaaaay more busybox installations out there than even  
_emulated_ alpha systems, and this is trivial to fix with a local patch  
to the kernel. So I'll just do that. Your idea of the "correct" thing  
to do to "fix" this seems entirely backwards to me.

Rob

  reply	other threads:[~2013-07-23  2:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 17:04 [PATCH 0/7] Minor Alpha updates for 3.11 Richard Henderson
2013-07-16 17:04 ` [PATCH 1/7] alpha: Add kcmp and finit_module syscalls Richard Henderson
2013-07-16 17:04 ` [PATCH 2/7] alpha: Eliminate compiler warning from memset macro Richard Henderson
2013-07-17 19:54   ` Matt Turner
2013-07-16 17:04 ` [PATCH 3/7] alpha: Modernize lib/mpi/longlong.h Richard Henderson
2013-07-16 17:19   ` Joe Perches
2013-07-16 18:55     ` Richard Henderson
2013-07-16 17:04 ` [PATCH 4/7] alpha: Improve atomic_add_unless Richard Henderson
2013-07-16 17:04 ` [PATCH 5/7] alpha: Implement atomic64_dec_if_positive Richard Henderson
2013-07-16 17:04 ` [PATCH 6/7] alpha: Generate dwarf2 unwind info for various kernel entry points Richard Henderson
2013-07-16 17:04 ` [PATCH 7/7] alpha: Fix type compatibility warning for marvel_map_irq Richard Henderson
2013-07-16 23:35 ` [PATCH 0/7] Minor Alpha updates for 3.11 Rob Landley
2013-07-17  0:03   ` Michael Cree
2013-07-23  2:31     ` Rob Landley [this message]
2013-07-23  3:25       ` Michael Cree
2013-07-23 15:20         ` Richard Henderson
2013-07-24 10:25           ` Michael Cree
2013-07-24 17:55             ` Richard Henderson
2013-07-17  4:29 ` Matt Turner
2013-07-17 13:02   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374546701.3719.33@driftwood \
    --to=rob@landley.net \
    --cc=cree@waikato.ac.nz \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox