All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Hirst <rhirst@linuxcare.com>
To: Matt Taggart <taggart@carmen.fc.hp.com>
Cc: randolph@tausq.org, lamont@hp.com,
	debian-buildd@list.parisc-linux.org,
	parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] rpc.lockd hangs  (was Re: portmap deb)
Date: Sat, 7 Apr 2001 00:15:00 +0100	[thread overview]
Message-ID: <20010407001500.Z9198@linuxcare.com> (raw)
In-Reply-To: <20010406210401.7685C37CDB@carmen.fc.hp.com>; from taggart@carmen.fc.hp.com on Fri, Apr 06, 2001 at 03:04:01PM -0600

On Fri, Apr 06, 2001 at 03:04:01PM -0600, Matt Taggart wrote:
> nfs-common is currently having problems with rpc.lockd, Richard is looking in 
> to it.

Ugh.  nfs-common tries to invoke nfsservctl() and quotactl() via calls
to syscall() in glibc, such as:

    return syscall(SYS_quotactl, cmd, special, id, addr);

For most architectures, glibc as an asm implementation of syscall(),
and our would be in

glibc/sysdeps/unix/sysv/linux/hppa/syscall.S

except that it is just a cpu loop at the moment - hence rpc.lockd
hangs eating cpu.

I guess a one time glibc didn't provide nfsservctl() and quotactl()
wrappers, so syscall() was used.

Options (somone who knows the area better than me can correct
these):

a) Implement syscall() in glibc - I made an initial stab at that,
included below, but I didn't get as far as building it.  Not sure
if my approach was valid for hppa, with some args on stack, etc.

b) change nfs-common to use the proper glibc wrappers for these
functions, rather than syscall().

c) change nfs-common to use INLINE_SYSCALL or something..


I tried a quick hack at (b) and rebuilt.  I didn't get as far as trying
the new binaries yet, because I was doing this on a 64 bit machine, and...
both nfsservctl and quotactl are unimplemented on 64 bit :(

So, we need to implement wrappers for those, and fix either glibc or
nfs-common.

Richard


==================== quick'n'dirty patch to nfs-common =====================

diff -ur nfs-utils.ori/support/nfs/nfsctl.c nfs-utils/support/nfs/nfsctl.c
--- nfs-utils.ori/support/nfs/nfsctl.c	Mon Oct 18 17:21:12 1999
+++ nfs-utils/support/nfs/nfsctl.c	Fri Apr  6 16:02:28 2001
@@ -20,5 +20,9 @@
 int
 nfsctl (int cmd, struct nfsctl_arg * argp, union nfsctl_res * resp)
 {
+#ifdef __hppa__
+  return nfsservctl(cmd, argp, resp);
+#else
   return syscall (__NR_nfsctl, cmd, argp, resp);
+#endif
 }
diff -ur nfs-utils.ori/utils/rquotad/quotactl.c nfs-utils/utils/rquotad/quotactl.c
--- nfs-utils.ori/utils/rquotad/quotactl.c	Mon Oct 18 17:21:12 1999
+++ nfs-utils/utils/rquotad/quotactl.c	Fri Apr  6 15:58:19 2001
@@ -24,7 +24,9 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 
+#ifndef __hppa__
 int quotactl(int cmd, const char * special, int id, caddr_t addr)
 {
 	return syscall(SYS_quotactl, cmd, special, id, addr);
 }
+#endif

============================================================================


===================== initial attempt at syscall for glibc =================

ENTRY(syscall)
        copy %r26,%r20
        copy %r25,%r26
        copy %r24,%r25
        copy %r23,%r24
        ldw -52(%r30),%r23
#if 0
        /* Hmm, can we be sure there is space for two args on the stack,
         * when the syscall() was called with fewer args?  How many args
	 * must we allow for?
         */
        ldw -56(%r30),%r22
        stw %r22,-52(%r30)
#endif
        ble  0x100(%sr2,%r0)
        nop
        ldi -0x1000,%r1
        cmpb,>>=,n %r1,%ret0,0f
        stw %rp, -20(%sr0,%r30)
        stw %ret0, -24(%sr0,%r30)
        .import __errno_location,code
        bl __errno_location,%rp
        ldo 64(%r30), %r30
        ldo -64(%r30), %r30
        ldw -24(%r30), %r26
        sub %r0, %r26, %r26
        stw %r26, 0(%sr0,%ret0)
        ldo -1(%r0), %ret0
        ldw -20(%r30), %rp
0:
	ret,n

============================================================================

       reply	other threads:[~2001-04-06 23:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010406210401.7685C37CDB@carmen.fc.hp.com>
2001-04-06 23:15 ` Richard Hirst [this message]
2001-04-08 19:20   ` [parisc-linux] rpc.lockd hangs (was Re: portmap deb) Matthew Wilcox
2001-04-09  9:56     ` Richard Hirst
2001-04-09 14:21       ` Matthew Wilcox
2001-04-10 14:03         ` Richard Hirst
2001-04-10 16:58           ` Ulrich Drepper
2001-04-10 17:08             ` Matthew Wilcox

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=20010407001500.Z9198@linuxcare.com \
    --to=rhirst@linuxcare.com \
    --cc=debian-buildd@list.parisc-linux.org \
    --cc=lamont@hp.com \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=randolph@tausq.org \
    --cc=taggart@carmen.fc.hp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.