Re: [dm-devel] don't use ->bd_inode to access the block device size

2021-10-14 Thread Wol
On 14/10/2021 16:14, Kees Cook wrote: I don't really mind bdev_size since it's analogous to i_size, but bdev_nr_bytes seems good to me. I much prefer bdev_nr_bytes(), as "size" has no units. Does it mean size IN bytes, or size OF A byte? :-) Cheers, Wol -- dm-devel mailing list

Re: [dm-devel] don't use ->bd_inode to access the block device size

2021-10-14 Thread Kees Cook
On Thu, Oct 14, 2021 at 08:13:59AM -0500, Dave Kleikamp wrote: > On 10/14/21 4:32AM, Anton Altaparmakov wrote: > > Hi Christoph, > > > > > On 14 Oct 2021, at 07:28, Christoph Hellwig wrote: > > > > > > On Wed, Oct 13, 2021 at 07:10:13AM +0200, Christoph Hellwig wrote: > > > > I wondered about

Re: [dm-devel] [PATCH 06/29] nvmet: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig > --- Looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 07/29] target/iblock: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig > --- Bodo's comment is good for the code reliability. Either way, looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list

Re: [dm-devel] [PATCH 08/29] fs: use bdev_nr_sectors instead of open coding it in blkdev_max_block

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig > --- Looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 11/29] btrfs: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig Looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 02/29] drbd: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig Looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 23/29] block: use bdev_nr_sectors instead of open coding it in blkdev_fallocate

2021-10-14 Thread Chaitanya Kulkarni
On 10/12/2021 10:10 PM, Christoph Hellwig wrote: > Use the proper helper to read the block device size. > > Signed-off-by: Christoph Hellwig Looks good. Reviewed-by: Chaitanya Kulkarni -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 11/29] btrfs: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Keith Busch
On Wed, Oct 13, 2021 at 07:10:24AM +0200, Christoph Hellwig wrote: > Use the proper helper to read the block device size. Just IMO, this patch looks like it wants a new bdev_nr_bytes() helper instead of using the double shifting sectors back to bytes. -- dm-devel mailing list dm-devel@redhat.com

Re: [dm-devel] [PATCH 04/29] md: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Song Liu
On Tue, Oct 12, 2021 at 11:12 PM Kees Cook wrote: > > On Wed, Oct 13, 2021 at 07:10:17AM +0200, Christoph Hellwig wrote: > > Use the proper helper to read the block device size. > > > > Signed-off-by: Christoph Hellwig > > I think it might make sense, as you suggest earlier, to add a "bytes" >

Re: [dm-devel] [RFC PATCH v7 05/16] ipe: add LSM hooks on execution and kernel read

2021-10-14 Thread Casey Schaufler
On 10/13/2021 12:06 PM, deven.de...@linux.microsoft.com wrote: > From: Deven Bowers > > IPE's initial goal is to control both execution and the loading of > kernel modules based on the system's definition of trust. It > accomplishes this by plugging into the security hooks for execve, > mprotect,

Re: [dm-devel] [PATCH 16/29] jfs: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Dave Kleikamp
On 10/13/21 12:10AM, Christoph Hellwig wrote: Use the proper helper to read the block device size. Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp --- fs/jfs/resize.c | 2 +- fs/jfs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [dm-devel] [RFC PATCH v7 07/16] ipe: add auditing support

2021-10-14 Thread Steve Grubb
Hello, On Wednesday, October 13, 2021 3:06:26 PM EDT deven.de...@linux.microsoft.com wrote: > Users of IPE require a way to identify when and why an operation fails, > allowing them to both respond to violations of policy and be notified > of potentially malicious actions on their systens with

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-10-14 Thread Javier González
Chaitanya, Did you have a chance to look at the answers below? I would like to start finding candidate dates throughout the next couple of weeks. Thanks, Javier On 06.10.2021 12:01, Javier González wrote: On 30.09.2021 09:43, Chaitanya Kulkarni wrote: Javier, Hi all, Since we are not

Re: [dm-devel] [PATCH 22/29] squashfs: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Phillip Lougher
On 13/10/2021 06:10, Christoph Hellwig wrote: Use the proper helper to read the block device size. Signed-off-by: Christoph Hellwig Acked-by: Phillip Lougher -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 07/29] target/iblock: use bdev_nr_sectors instead of open coding it

2021-10-14 Thread Bodo Stroesser
On 13.10.21 07:10, Christoph Hellwig wrote: Use the proper helper to read the block device size. Signed-off-by: Christoph Hellwig --- drivers/target/target_core_iblock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_iblock.c

Re: [dm-devel] don't use ->bd_inode to access the block device size

2021-10-14 Thread Christoph Hellwig
On Wed, Oct 13, 2021 at 07:10:13AM +0200, Christoph Hellwig wrote: > I wondered about adding a helper for looking at the size in byte units > to avoid the SECTOR_SHIFT shifts in various places. But given that > I could not come up with a good name and block devices fundamentally > work in sector