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]
Date:	Wed, 04 Oct 2006 09:50:51 -0700
From:	Suzuki Kp <suzuki@...ibm.com>
To:	Erik Mouw <erik@...ddisk-recovery.com>
CC:	lkml <linux-kernel@...r.kernel.org>, linux-fsdevel@...r.kernel.org,
	Andrew Morton <akpm@...l.org>, andmike@...ibm.com
Subject: Re: [RFC] PATCH to fix rescan_partitions to return errors properly

Erik Mouw wrote:
> On Tue, Oct 03, 2006 at 06:00:36PM -0700, Suzuki Kp wrote:
> 
>>Currently the rescan_partition returns 0 (success), even if it is unable
>>to rescan the partition information ( may be due to disks offline, I/O
>>error reading the table or unknown partition ). This would make ioctl()
>>calls succeed for BLKRRPART requests even if partitions were not scanned
>>properly, which is not a good thing to do.
>>
>>Attached here is patch to fix the issue. The patch makes
>>rescan_partition to return -EINVAL for unknown partitions and -EIO for
>>disk I/O errors ( or when disks are offline ).
> 
> 
> I don't think it's a good idea to return an error when there's an
> unknown partition table. How do you differentiate between a device that
> isn't partitioned at all and a device with an unknown partition table?

Returning -EINVAL in both the above cases would inform the user that, 
the partition table was not read properly due to an invalid arguemnt 
(the disk) passed, which holds good for both the above cases.

What do you think ?

> Better return 0 on an unknown partition table.
> 
> 
> Erik
> 

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