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] [day] [month] [year] [list]
Message-ID: <87sizykdjg.fsf@devron.myhome.or.jp>
Date:	Mon, 01 Jul 2013 15:19:31 +0900
From:	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:	bintian.wang@...aro.org
Cc:	linux-kernel@...r.kernel.org, Mike Lockwood <lockwood@...roid.com>,
	dmitry pervushin <dpervushin@...il.com>,
	Colin Cross <ccross@...roid.com>,
	Android Kernel Team <kernel-team@...roid.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH RFC] Add FAT_IOCTL_GET_VOLUME_ID

OGAWA Hirofumi <hirofumi@...l.parknet.co.jp> writes:

>> +	case FAT_IOCTL_GET_VOLUME_ID:
>> +		id = fat_ioctl_volume_id(inode);
>> +		return copy_to_user((unsigned int *)arg, &id, sizeof(id));
>
>> +	case FAT_IOCTL_GET_VOLUME_ID:
>> +		id = fat_ioctl_volume_id(inode);
>> +		return copy_to_user((unsigned int *)arg, &id, sizeof(id));
>
> This pattern seems to from put_user().
>
> Unnecessary cast of 1st arg. And copy_to_user() returns remaining bytes
> when fail (not error code).

Ah, actually, this needs cast, but it is to annotate for sparse. Well,
is there any reason to restrict this only on the directory?

For now, fat_generic_ioctl() looks easier way to do this.
(fat_generic_ioctl() should work for the both of compat code and dir/file)

Thanks.
-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
--
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