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:   Fri, 5 Feb 2021 15:30:07 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Christoph Hellwig <hch@....de>
Cc:     Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, "Ewan D . Milne" <emilne@...hat.com>
Subject: Re: [PATCH 2/2] block: avoid to drop & re-add partitions if
 partitions aren't changed

On Fri, Feb 05, 2021 at 08:14:29AM +0100, Christoph Hellwig wrote:
> On Fri, Feb 05, 2021 at 10:17:08AM +0800, Ming Lei wrote:
> > block ioctl(BLKRRPART) always drops current partitions and adds
> > partitions again, even though there isn't any change in partitions table.
> > 
> > ioctl(BLKRRPART) may be called by systemd-udevd and some disk utilities
> > frequently.
> 
> Err, why?  We should probably fix udev to not do stupid things first.

It is one standard syscall, and the command is just for re-read
partition table, and it can be called by any application, fdisk
calls it too even though no any change done on the disk data,
same with parted, and there should be more.

	#define BLKRRPART  _IO(0x12,95) /* re-read partition table */

IMO, this syscall isn't supposed to drop partitions if user doesn't
touch the partition table, do you think it is one sane behavior to
drop partitions at will?

-- 
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ