All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] mismatched syscall protos.
Date: Fri, 5 Mar 2004 22:55:56 +0000	[thread overview]
Message-ID: <20040305225556.GA18732@redhat.com> (raw)

Sparse noticed a bunch of mismatched prototypes in the new syscalls.h file
when compiling net/socket.c  Whilst most of them are just missing __user
tags, the last argument of sys_socketpair was completely different.

		Dave

--- bk-linus/include/linux/syscalls.h~	Fri Mar  5 17:52:01 2004
+++ bk-linus/include/linux/syscalls.h	Fri Mar  5 17:55:40 2004
@@ -386,24 +386,24 @@
 				unsigned int count);
 
 asmlinkage long sys_setsockopt(int fd, int level, int optname,
-				char *optval, int optlen);
+				char __user *optval, int optlen);
 asmlinkage long sys_getsockopt(int fd, int level, int optname,
 				char __user *optval, int __user *optlen);
-asmlinkage long sys_bind(int, struct sockaddr *, int);
-asmlinkage long sys_connect(int, struct sockaddr *, int);
-asmlinkage long sys_accept(int, struct sockaddr *, int *);
-asmlinkage long sys_getsockname(int, struct sockaddr *, int *);
-asmlinkage long sys_getpeername(int, struct sockaddr *, int *);
-asmlinkage long sys_send(int, void *, size_t, unsigned);
-asmlinkage long sys_sendto(int, void *, size_t, unsigned,
-				struct sockaddr *, int);
+asmlinkage long sys_bind(int, struct sockaddr __user *, int);
+asmlinkage long sys_connect(int, struct sockaddr __user *, int);
+asmlinkage long sys_accept(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_getsockname(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_getpeername(int, struct sockaddr __user *, int __user *);
+asmlinkage long sys_send(int, void __user *, size_t, unsigned);
+asmlinkage long sys_sendto(int, void __user *, size_t, unsigned,
+				struct sockaddr __user *, int);
 asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags);
-asmlinkage long sys_recv(int, void *, size_t, unsigned);
-asmlinkage long sys_recvfrom(int, void *, size_t, unsigned,
-				struct sockaddr *, int *);
+asmlinkage long sys_recv(int, void __user *, size_t, unsigned);
+asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned,
+				struct sockaddr __user *, int __user *);
 asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, unsigned flags);
 asmlinkage long sys_socket(int, int, int);
-asmlinkage long sys_socketpair(int, int, int, int [2]);
+asmlinkage long sys_socketpair(int, int, int, int __user *);
 asmlinkage long sys_socketcall(int call, unsigned long __user *args);
 asmlinkage long sys_listen(int, int);
 asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,

                 reply	other threads:[~2004-03-05 22:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040305225556.GA18732@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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.