From: Andi Kleen <ak@suse.de>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>, Andi Kleen <ak@suse.de>,
Pete Zaitcev <zaitcev@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: bidulock@openss7.org
Subject: Re: export of sys_call_table
Date: Fri, 4 Oct 2002 21:26:59 +0200 [thread overview]
Message-ID: <20021004212659.A18954@wotan.suse.de> (raw)
In-Reply-To: <20021004131547.B2369@openss7.org>
On Fri, Oct 04, 2002 at 01:15:47PM -0600, Brian F. G. Bidulock wrote:
> Alan,
>
> On Fri, 04 Oct 2002, Alan Cox wrote:
> >
> > AFS patches a collection of random syscalls in pretty icky ways. Again
> > afssyscall wants doing the right way - with a kernel stub like NFS has
> >
>
> Attached is an untested patch for LiS. AK doesn't like the read/write_lock.
> AFAIK it will work for LiS but might not work for AFS. Also LiS doesn't need
> module load like nfsd, perhaps afs does. If someone could add an afs patch we
> could kill these two birds with one stone. Patch is against 2.4.18 but should
> move up fine.
>
> --brian
>
> kernel/ksyms.c | 2 ++
> kernel/sys.c | 39 +++++++++++++++++++++++++++++++++++++++
> arch/alpha/kernel/entry.S | 2 ++
> arch/arm/kernel/calls.S | 4 !!!!
> arch/cris/kernel/entry.S | 4 !!!!
> arch/i386/kernel/entry.S | 4 !!!!
> arch/ia64/kernel/entry.S | 4 !!!!
> arch/m68k/kernel/entry.S | 4 !!!!
> arch/mips/kernel/syscalls.h | 4 !!!!
> arch/mips64/kernel/scall_64.S | 4 !!!!
> arch/parisc/kernel/syscall.S | 4 !!!!
> arch/ppc/kernel/misc.S | 4 !!!!
> arch/s390/kernel/entry.S | 4 !!!!
> arch/s390x/kernel/entry.S | 4 !!!!
> arch/sh/kernel/entry.S | 4 !!!!
> arch/sparc/kernel/systbls.S | 4 !!!!
> arch/sparc64/kernel/systbls.S | 6 !!!!!!
> include/asm-alpha/unistd.h | 2 ++
> include/asm-arm/unistd.h | 4 !!!!
> include/asm-sh/unistd.h | 4 !!!!
> include/asm-sparc/unistd.h | 4 !!!!
> include/asm-sparc64/unistd.h | 4 !!!!
> 22 files changed, 45 insertions(+), 74 modifications(!)
>
>
> Index: kernel/ksyms.c
> ===================================================================
> RCS file: /home/common/cvsroot/linux/kernel/ksyms.c,v
> retrieving revision 1.1.3.1
> diff -c -r1.1.3.1 ksyms.c
> *** kernel/ksyms.c 25 Feb 2002 19:38:13 -0000 1.1.3.1
> --- kernel/ksyms.c 4 Oct 2002 17:17:09 -0000
> ***************
> *** 469,474 ****
> --- 469,476 ----
> #ifndef __mips__
> EXPORT_SYMBOL(sys_call_table);
> #endif
> + EXPORT_SYMBOL(register_streams_calls);
> + EXPORT_SYMBOL(unregister_streams_calls);
> EXPORT_SYMBOL(machine_restart);
> EXPORT_SYMBOL(machine_halt);
> EXPORT_SYMBOL(machine_power_off);
> Index: kernel/sys.c
> ===================================================================
> RCS file: /home/common/cvsroot/linux/kernel/sys.c,v
> retrieving revision 1.1.3.1
> diff -c -r1.1.3.1 sys.c
> *** kernel/sys.c 25 Feb 2002 19:38:13 -0000 1.1.3.1
> --- kernel/sys.c 4 Oct 2002 18:45:03 -0000
> ***************
> *** 167,172 ****
> --- 167,211 ----
> return notifier_chain_unregister(&reboot_notifier_list, nb);
> }
>
> + static int (*do_putpmsg) (int, void *, void *, int, int) = NULL;
> + static int (*do_getpmsg) (int, void *, void *, int, int) = NULL;
> +
> + static rwlock_t streams_call_lock = RW_LOCK_UNLOCKED;
> +
> + long asmlinkage sys_putpmsg(int fd, void *ctlptr, void *datptr, int band, int flags)
> + {
> + int ret = -ENOSYS;
> + read_lock(&streams_call_lock);
Really you cannot use a spinlock here, because that would disallow
do_putpmsg from ever sleeping. Please review the mails I wrote
earlier.
Either use atomic_inc(&some_counter) or a rw semaphore. I would likely
choose the atomic_inc. Alternatively you could use the RCU infrastructure
and stick a synchronize_kernel into module unload, then everything
would be fine too.
> + if (do_putpmsg)
> + ret = (*do_putpmsg) (fd, ctrlptr, datptr, band, flags);
> + read_unlock(&streams_call_lock);
> + return ret;
Same problem in the other stubs.
-Andi
next prev parent reply other threads:[~2002-10-04 19:21 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20021003153943.E22418@openss7.org.suse.lists.linux.kernel>
[not found] ` <1033682560.28850.32.camel@irongate.swansea.linux.org.uk.suse.lists.linux.kernel>
[not found] ` <20021003170608.A30759@openss7.org.suse.lists.linux.kernel>
[not found] ` <1033722612.1853.1.camel@localhost.localdomain.suse.lists.linux.kernel>
[not found] ` <20021004051932.A13743@openss7.org.suse.lists.linux.kernel>
2002-10-04 13:01 ` Andi Kleen
2002-10-04 13:11 ` Brian F. G. Bidulock
2002-10-04 13:15 ` Andi Kleen
2002-10-04 13:22 ` Brian F. G. Bidulock
2002-10-04 14:11 ` Andi Kleen
2002-10-04 14:31 ` Brian F. G. Bidulock
[not found] ` <20021003221525.GA2221@kroah.com.suse.lists.linux.kernel>
[not found] ` <20021003222716.GB14919@suse.de.suse.lists.linux.kernel>
[not found] ` <1033684027.1247.43.camel@phantasy.suse.lists.linux.kernel>
[not found] ` <20021003233504.GA20570@suse.de.suse.lists.linux.kernel>
[not found] ` <20021003235022.GA82187@compsoc.man.ac.uk.suse.lists.linux.kernel>
[not found] ` <mailman.1033691043.6446.linux-kernel2news@redhat.com.suse.lists.linux.kernel>
[not found] ` <200210040403.g9443Vu03329@devserv.devel.redhat.com.suse.lists.linux.kernel>
[not found] ` <20021003233221.C31444@openss7.org.suse.lists.linux.kernel>
[not found] ` <20021004133657.B17216@devserv.devel.redhat.com.suse.lists.linux.kernel>
2002-10-04 18:14 ` Andi Kleen
2002-10-04 18:46 ` Alan Cox
2002-10-04 18:45 ` Alexander Viro
2002-10-04 19:15 ` Brian F. G. Bidulock
2002-10-04 19:26 ` Andi Kleen [this message]
2002-10-04 19:37 ` Pete Zaitcev
2002-10-04 20:17 ` (off-list) Mail headers (was: Re: export of sys_call_table) Sean Neakums
2002-10-04 20:33 ` Sean Neakums
2002-10-04 19:43 ` export of sys_call_table Robert Love
2002-10-04 22:21 ` David S. Miller
2002-10-04 22:41 ` Brian F. G. Bidulock
2002-10-04 22:38 ` David S. Miller
2002-10-08 22:20 ` [PATCH] " Brian F. G. Bidulock
2002-10-08 22:27 ` Brian F. G. Bidulock
2002-10-08 23:39 ` David S. Miller
2002-10-08 23:18 ` David S. Miller
2002-10-09 0:21 ` Brian F. G. Bidulock
2002-10-09 0:00 ` Robert Love
[not found] ` <mailman.1034119380.19047.linux-kernel2news@redhat.com>
2002-10-09 0:30 ` Pete Zaitcev
2002-10-09 0:40 ` Brian F. G. Bidulock
2002-10-04 21:54 Mark Veltzer
-- strict thread matches above, loose matches on Subject: below --
2002-10-03 21:39 Brian F. G. Bidulock
2002-10-03 22:02 ` Alan Cox
2002-10-03 23:06 ` Brian F. G. Bidulock
2002-10-04 9:10 ` Arjan van de Ven
2002-10-04 11:19 ` Brian F. G. Bidulock
2002-10-04 11:31 ` Arjan van de Ven
2002-10-04 11:55 ` Brian F. G. Bidulock
2002-10-04 13:00 ` Alan Cox
2002-10-03 23:10 ` Michal Jaegermann
2002-10-04 0:32 ` Andy Pfiffer
2002-10-04 9:20 ` Arjan van de Ven
2002-10-06 14:17 ` Kasper Dupont
2003-01-03 8:28 ` Eric W. Biederman
2002-10-04 21:06 ` David S. Miller
2002-10-04 21:44 ` Brian F. G. Bidulock
2002-10-12 5:43 ` Eric Blade
2002-10-03 22:14 ` Robert Love
2002-10-03 22:23 ` Robert Love
2002-10-03 22:24 ` Patrick Mochel
2002-10-03 22:15 ` Greg KH
2002-10-03 22:27 ` Dave Jones
2002-10-03 22:27 ` Robert Love
2002-10-03 22:58 ` John Levon
2002-10-03 23:10 ` Alexander Viro
2002-10-03 23:14 ` John Levon
2002-10-04 4:05 ` Muli Ben-Yehuda
2002-10-04 4:46 ` Greg KH
2002-10-04 4:53 ` Muli Ben-Yehuda
2002-10-03 23:35 ` Dave Jones
2002-10-03 23:50 ` John Levon
2002-10-04 0:17 ` Brian F. G. Bidulock
[not found] ` <mailman.1033691043.6446.linux-kernel2news@redhat.com>
2002-10-04 4:03 ` Pete Zaitcev
2002-10-04 5:32 ` Brian F. G. Bidulock
2002-10-04 11:42 ` John Levon
2002-10-04 12:03 ` Brian F. G. Bidulock
2002-10-04 13:02 ` Alan Cox
2002-10-04 17:36 ` Pete Zaitcev
2002-10-05 1:39 ` John Levon
2002-10-04 13:58 ` Christoph Hellwig
2002-10-04 15:15 ` Brian F. G. Bidulock
2002-10-04 15:28 ` Christoph Hellwig
2002-10-04 16:19 ` Brian F. G. Bidulock
2002-10-04 16:25 ` Christoph Hellwig
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=20021004212659.A18954@wotan.suse.de \
--to=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bidulock@openss7.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zaitcev@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®