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: <Pine.LNX.4.64.0801091313231.29244@fbirervta.pbzchgretzou.qr>
Date:	Wed, 9 Jan 2008 13:14:25 +0100 (CET)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Nikanth Karthikesan <knikanth@...e.de>
cc:	grant@...que.net, tim@...erelk.net,
	Christoph Hellwig <hch@...radead.org>, Valdis.Kletnieks@...edu,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] Change paride driver to use unlocked_ioctl instead of
 ioctl


On Jan 10 2008 14:25, Nikanth Karthikesan wrote:
>-static int pt_ioctl(struct inode *inode, struct file *file,
>-	 unsigned int cmd, unsigned long arg)
>+static long pt_ioctl(struct file *file, unsigned int cmd,
>+		unsigned long arg)
> {
> 	struct pt_unit *tape = file->private_data;
> 	struct mtop __user *p = (void __user *)arg;
> 	struct mtop mtop;
>+	long err = 0;
>+
>+	lock_kernel();
> 
> 	switch (cmd) {
> 	case MTIOCTOP:
>-		if (copy_from_user(&mtop, p, sizeof(struct mtop)))
>-			return -EFAULT;
>+		if (copy_from_user(&mtop, p, sizeof(struct mtop))) {
>+			err = -EFAULT;
>+			break;
>+		}

I wonder why a simple copy_from_user() requires the BKL.. if pt
does need locking, then probably some mutex inside pt.

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