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: <20080425.143845.24767700.yoshfuji@linux-ipv6.org>
Date:	Fri, 25 Apr 2008 14:38:45 +0900 (JST)
From:	YOSHIFUJI Hideaki / 吉藤英明 
	<yoshfuji@...ux-ipv6.org>
To:	dlstevens@...ibm.com
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	yoshfuji@...ux-ipv6.org
Subject: Re: [GIT PULL] [IPV6] COMPAT: Fix SSM applications on 64bit
 kernels.

In article <OF3A37018B.9EFE360C-ON88257435.00614684-88257435.00622448@...ibm.com> (at Thu, 24 Apr 2008 11:52:01 -0600), David Stevens <dlstevens@...ibm.com> says:

>  #ifdef CONFIG_COMPAT
> +
> +struct compat_group_req {
> +       __u32                                   gr_interface;
> +       struct __kernel_sockaddr_storage        gr_group;
> +} __attribute__ ((packed));
> +
:

I prefer __compat_sockaddr_storage{} which has definition closer to
one on 32bit platform.  "packed" seems overkill to me.

>  int compat_ipv6_setsockopt(struct sock *sk, int level, int optname,
>                            char __user *optval, int optlen)
>  {
> @@ -769,6 +791,95 @@ int compat_ipv6_setsockopt(struct sock *
>         if (level != SOL_IPV6)
>                 return -ENOPROTOOPT;
>  
> +                   __put_user(interface, &kgr->gr_interface) ||
> +                   __copy_tofrom_user(&kgr->gr_group, &gr32->gr_group,
> +                               sizeof(kgr->gr_group)))
:

Unfortunately this cannot work.
__copy_tofrom_user is not available on x86_64 etc.

And this will increase copy operation, and I really dislike it, anyway.

--yoshfuji
--
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