[PATCH] mismatched syscall protos.

From: Dave Jones (davej_at_redhat.com)
Date: 03/05/04

  • Next message: Peter Williams: "Re: Problems with WLAN orinoco_pci"
    Date:	Fri, 5 Mar 2004 22:55:56 +0000
    To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
    
    

    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,
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Peter Williams: "Re: Problems with WLAN orinoco_pci"

    Relevant Pages

    • [NEWS] D-Link DWL-G700AP httpd DoS
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... By crafting a special HTTP GET string, attackers can DoS the D-Link ... int check_httpd; ... if(connect(sockfd, (struct sockaddr *)&servaddr, ...
      (Securiteam)
    • [EXPL] Telindus Router 10xx and 11xx Remote Exploit
      ... The 11xx router series by Telindus has a very serious remotely exploitable ... struct sockaddr sa; ... int len; ... signal(SIGINT, exitnow); ...
      (Securiteam)
    • Re: Call to native function from C#
      ... You cannot marshal a structure with a nested array in .NETCF, ... static extern int rtBind; ... > int rtBind (uint s, struct sockaddr *addr, int namelen); ... > static extern int rtBind(uint s, ref sockaddr name, int namelen); ...
      (microsoft.public.dotnet.framework.compactframework)
    • surprisingly slow accept/connect cycle time
      ... The program forks and the child attempts to accept 1000 connections. ... socket_or_die (int domain, int type, int protocol) ... connect_or_die (int fd, const struct sockaddr *addrp, socklen_t len) ...
      (Linux-Kernel)
    • [PATCH] syscalls.h update #9 (open/close)
      ... extern int do_truncate ... extern struct file * dentry_open; ... asmlinkage long sys_setsockopt(int fd, int level, int optname, ... asmlinkage long sys_connect(int, struct sockaddr *, int); ...
      (Linux-Kernel)