All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Brian F. G. Bidulock" <bidulock@openss7.org>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org, LiS <linux-streams@gsyc.escet.urjc.es>
Subject: Re: [PATCH] Re: export of sys_call_table
Date: Tue, 8 Oct 2002 18:21:19 -0600	[thread overview]
Message-ID: <20021008182119.A17372@openss7.org> (raw)
In-Reply-To: <20021008.161838.15299897.davem@redhat.com>; from davem@redhat.com on Tue, Oct 08, 2002 at 04:18:38PM -0700

David,

On Tue, 08 Oct 2002, David S. Miller wrote:

> Oh really?

Many apologies.  Of course it is the wrong patch...
(My excuse: Finger trouble late in the day.)

Here is the correct patch:

--- arch/i386/kernel/entry.S.orig	2002-08-02 19:39:42.000000000 -0500
+++ arch/i386/kernel/entry.S	2002-10-08 15:43:08.000000000 -0500
@@ -584,8 +584,8 @@
 	.long SYMBOL_NAME(sys_capset)           /* 185 */
 	.long SYMBOL_NAME(sys_sigaltstack)
 	.long SYMBOL_NAME(sys_sendfile)
-	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
-	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
+	.long SYMBOL_NAME(sys_getpmsg)		/* streams1 */
+	.long SYMBOL_NAME(sys_putpmsg)		/* streams2 */
 	.long SYMBOL_NAME(sys_vfork)            /* 190 */
 	.long SYMBOL_NAME(sys_getrlimit)
 	.long SYMBOL_NAME(sys_mmap2)
--- kernel/ksyms.c.orig	2002-08-02 19:39:46.000000000 -0500
+++ kernel/ksyms.c	2002-10-08 15:44:37.000000000 -0500
@@ -497,6 +497,11 @@
 EXPORT_SYMBOL(seq_release);
 EXPORT_SYMBOL(seq_read);
 EXPORT_SYMBOL(seq_lseek);
+extern void register_streams_calls(int (*putpmsg) (int,void *,void *,int,int),
+				   int (*getpmsg) (int,void *,void *,int,int));
+extern void unregister_streams_calls(void);
+EXPORT_SYMBOL(register_streams_calls);
+EXPORT_SYMBOL(unregister_streams_calls);
 
 /* Program loader interfaces */
 EXPORT_SYMBOL(setup_arg_pages);
--- kernel/sys.c.orig	2002-08-02 19:39:46.000000000 -0500
+++ kernel/sys.c	2002-10-08 16:46:55.000000000 -0500
@@ -167,6 +167,45 @@
 	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 DECLARE_RWSEM(streams_call_sem) ;
+
+long asmlinkage sys_putpmsg(int fd, void *ctlptr, void *datptr, int band, int flags)
+{
+	int ret = -ENOSYS;
+	down_read(&streams_call_sem);
+	if (do_putpmsg)
+		ret = (*do_putpmsg) (fd, ctlptr, datptr, band, flags);
+	up_read(&streams_call_sem);
+	return ret;
+}
+
+long asmlinkage sys_getpmsg(int fd, void *ctlptr, void *datptr, int band, int flags)
+{
+	int ret = -ENOSYS;
+	down_read(&streams_call_sem);
+	if (do_getpmsg)
+		ret = (*do_getpmsg) (fd, ctlptr, datptr, band, flags);
+	up_read(&streams_call_sem);
+	return ret;
+}
+
+void register_streams_calls(int (*putpmsg) (int, void *, void *, int, int),
+			    int (*getpmsg) (int, void *, void *, int, int))
+{
+	down_write(&streams_call_sem);
+	do_putpmsg = putpmsg;
+	do_getpmsg = getpmsg;
+	up_write(&streams_call_sem);
+}
+
+void unregister_streams_calls(void)
+{
+	register_streams_calls(NULL, NULL);
+}
+
 asmlinkage long sys_ni_syscall(void)
 {
 	return -ENOSYS;


-- 
Brian F. G. Bidulock    ¦ The reasonable man adapts himself to the ¦
bidulock@openss7.org    ¦ world; the unreasonable one persists in  ¦
http://www.openss7.org/ ¦ trying  to adapt the  world  to himself. ¦
                        ¦ Therefore  all  progress  depends on the ¦
                        ¦ unreasonable man. -- George Bernard Shaw ¦

  reply	other threads:[~2002-10-09  0:15 UTC|newest]

Thread overview: 28+ 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         ` export of sys_call_table 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
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 [this message]
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-09 12:20 Petr Vandrovec
2002-10-09 19:54 ` Brian F. G. Bidulock

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=20021008182119.A17372@openss7.org \
    --to=bidulock@openss7.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-streams@gsyc.escet.urjc.es \
    /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.