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>] [day] [month] [year] [list]
Date:	Sun, 22 Jun 2014 17:42:12 +0000
From:	"Drokin, Oleg" <oleg.drokin@...el.com>
To:	Fredrick John Berchmans <fredrickprashanth@...il.com>
CC:	"greg@...ah.com KH" <greg@...ah.com>,
	"Dilger, Andreas" <andreas.dilger@...el.com>,
	Tao Peng <tao.peng@....com>,
	"hpdd-discuss@...ts.01.org" <hpdd-discuss@...ts.01.org>,
	"linux-kernel@...r.kernel.org Kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: lustre use kernel socket sockopt apis

So I came back to this patch (now part of Greg's tree)

On May 2, 2014, at 10:50 PM, Fredrick John Berchmans wrote:

> Change old way of ops->setsockopt or ops->getsockopt in kernel
> to kernel_setsockopt or kernel_getsockopt.
> 
> --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> @@ -56,21 +56,8 @@ libcfs_sock_ioctl(int cmd, unsigned long arg)
> 		CERROR ("Can't create socket: %d\n", rc);
> 		return rc;
> 	}
> -
> -	sock_filp = sock_alloc_file(sock, 0, NULL);
> -	if (IS_ERR(sock_filp)) {
> -		sock_release(sock);
> -		rc = PTR_ERR(sock_filp);
> -		goto out;
> -	}
> -
> -	set_fs(KERNEL_DS);
> -	if (sock_filp->f_op->unlocked_ioctl)
> -		rc = sock_filp->f_op->unlocked_ioctl(sock_filp, cmd, arg);
> -	set_fs(oldmm);
> -
> -	fput(sock_filp);
> -out:
> +	rc = kernel_sock_ioctl(sock, cmd, arg);
> +	sock_release(sock);
> 	return rc;
> }

This part totally breaks lustre, we use this to also call things like SIOCGIFCONF that are not available from socket proto_ops because this is really coming from dev_ioctl and I do not see any better way to access it.
So I'd like this to be reverted or if there is a better way to access this, I am interested to learn it.

Bye,
    Oleg--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ