lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200906220003.22458.arnd@arndb.de>
Date:	Mon, 22 Jun 2009 00:03:22 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC/HACK] net/compat/wext: allow sending different messages to compat tasks

On Sunday 21 June 2009, Johannes Berg wrote:
> --- wireless-testing.orig/net/compat.c  2009-06-19 17:50:30.000000000 +0200
> +++ wireless-testing/net/compat.c       2009-06-19 17:53:13.000000000 +0200
> @@ -782,16 +782,18 @@ asmlinkage long compat_sys_socketcall(in
>                 ret = sys_socketpair(a0, a1, a[2], compat_ptr(a[3]));
>                 break;
>         case SYS_SEND:
> -               ret = sys_send(a0, compat_ptr(a1), a[2], a[3]);
> +               ret = sys_send(a0, compat_ptr(a1), a[2], a[3] | MSG_CMSG_COMPAT);
>                 break;
>         case SYS_SENDTO:
> -               ret = sys_sendto(a0, compat_ptr(a1), a[2], a[3], compat_ptr(a[4]), a[5]);
> +               ret = sys_sendto(a0, compat_ptr(a1), a[2], a[3] | MSG_CMSG_COMPAT,
> +                                compat_ptr(a[4]), a[5]);
>                 break;
>         case SYS_RECV:
> -               ret = sys_recv(a0, compat_ptr(a1), a[2], a[3]);
> +               ret = sys_recv(a0, compat_ptr(a1), a[2], a[3] | MSG_CMSG_COMPAT);
>                 break;
>         case SYS_RECVFROM:
> -               ret = sys_recvfrom(a0, compat_ptr(a1), a[2], a[3], compat_ptr(a[4]), compat_ptr(a[5]));
> +               ret = sys_recvfrom(a0, compat_ptr(a1), a[2], a[3] | MSG_CMSG_COMPAT,
> +                                  compat_ptr(a[4]), compat_ptr(a[5]));
>                 break;
>         case SYS_SHUTDOWN:
>                 ret = sys_shutdown(a0,a1);

I suppose if you do this, you also need to introduce a
compat_sys_{send,sendto,recv,recvfrom} entry point
for architectures that do not go through sys_socket but
call sys_{send,sendto,recv,recvfrom} directly. I think
this is only sparc and mips.

	Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ