* [GIT PULL for-6.3] Block updates for 6.3
@ 2023-02-17 2:54 Jens Axboe
2023-02-17 19:23 ` Jens Axboe
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Jens Axboe @ 2023-02-17 2:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-block@vger.kernel.org
Hi Linus,
Here are the main block updates for the 6.3 merge window. Note that this
will throw a trivial merge conflict due to a late fix for BFQ in the 6.2
release, both are trivial to resolve and just in case there are
questions, I've pushed a merged branch here:
https://git.kernel.dk/cgit/linux-block/log/?h=for-6.3/block-merged
which resolves those two as-of your git tree today.
This pull request contains:
- NVMe updates via Christoph:
- Small improvements to the logging functionality (Amit Engel)
- Authentication cleanups (Hannes Reinecke)
- Cleanup and optimize the DMA mapping cod in the PCIe driver
(Keith Busch)
- Work around the command effects for Format NVM (Keith Busch)
- Misc cleanups (Keith Busch, Christoph Hellwig)
- Fix and cleanup freeing single sgl (Keith Busch)
- MD updates via Song:
- Fix a rare crash during the takeover process
- Don't update recovery_cp when curr_resync is ACTIVE
- Free writes_pending in md_stop
- Change active_io to percpu
- Series updating drbd, inching us closer to unifying the out-of-tree
driver with the in-tree one (Andreas, Christoph, Lars, Robert)
- BFQ update adding support for multi-actuator drives (Paolo, Federico,
Davide)
- Make brd compliant with REQ_NOWAIT (me)
- Fix for IOPOLL and queue entering, fixing stalled IO waiting on
timeouts (me)
- Fix for REQ_NOWAIT with multiple bios (me)
- Fix memory leak in blktrace cleanup (Greg)
- Series cleaning up sbitmap and fixing a potential hang (Kemeng)
- Series cleaning up some bits in BFQ, and fixing a bug in the request
injection (Kemeng)
- Series cleaning up the request allocation and issue code, and fixing
some bugs related to that (Kemeng)
- ublk updates and fixes:
- Add support for unprivileged ublk (Ming)
- Improve device deletion handling (Ming)
- Misc (Liu, Ziyang)
- s390 dasd fixes (Alexander, Qiheng)
- Improve utility of request caching and fixes (Anuj, Xiao)
- zoned cleanups (Pankaj)
- More constification for kobjs (Thomas)
- blk-iocost cleanups (Yu)
- Remove bio splitting from drivers that don't need it (Christoph)
- Series switching blk-cgroups using struct gendisk. Some of this is now
incomplete as select late reverts were done. (Christoph)
- Series adding bvec initialization helpers, and converting callers to
use that rather than open-coding it (Christoph)
- Misc fixes and cleanups (Jinke, Keith, Arnd, Bart, Li, Martin,
Matthew, Ulf, Zhong)
Please pull!
The following changes since commit 6d796c50f84ca79f1722bb131799e5a5710c4700:
Linux 6.2-rc6 (2023-01-29 13:59:43 -0800)
are available in the Git repository at:
git://git.kernel.dk/linux.git tags/for-6.3/block-2023-02-16
for you to fetch changes up to f3ca73862453ac1e64fc6968a14bf66d839cd2d8:
block: use proper return value from bio_failfast() (2023-02-16 19:39:15 -0700)
----------------------------------------------------------------
for-6.3/block-2023-02-16
----------------------------------------------------------------
Alexander Gordeev (1):
s390/dasd: sort out physical vs virtual pointers usage
Amit Engel (3):
nvme: add nvme_opcode_str function for all nvme cmd types
nvme-tcp: add additional info for nvme_tcp_timeout log
nvmet: for nvme admin set_features cmd, call nvmet_check_data_len_lte()
Andreas Gruenbacher (1):
drbd: drbd_insert_interval(): Clarify comment
Anuj Gupta (2):
nvme: set REQ_ALLOC_CACHE for uring-passthru request
block: extend bio-cache for non-polled requests
Arnd Bergmann (1):
blk-iocost: avoid 64-bit division in ioc_timer_fn
Bart Van Assche (2):
loop: Improve the hw_queue_depth kernel module parameter implementation
block: Remove the ALLOC_CACHE_SLACK constant
Christoph Böhmwalder (8):
drbd: split off drbd_buildtag into separate file
drbd: drop API_VERSION define
drbd: split off drbd_config into separate file
drbd: adjust drbd_limits license header
drbd: make limits unsigned
drbd: remove unnecessary assignment in vli_encode_bits
drbd: remove macros using require_context
MAINTAINERS: add drbd headers
Christoph Hellwig (54):
ps3vram: remove bio splitting
s390/dcssblk:: don't call bio_split_to_limits
nvme: remove nvme_execute_passthru_rq
block: don't call blk_throtl_stat_add for non-READ/WRITE commands
blk-cgroup: delay blk-cgroup initialization until add_disk
blk-cgroup: improve error unwinding in blkg_alloc
blk-cgroup: simplify blkg freeing from initialization failure paths
blk-cgroup: remove the !bdi->dev check in blkg_dev_name
blk-cgroup: pin the gendisk in struct blkcg_gq
blk-cgroup: store a gendisk to throttle in struct task_struct
blk-wbt: pass a gendisk to wbt_{enable,disable}_default
blk-wbt: pass a gendisk to wbt_init
blk-wbt: move private information from blk-wbt.h to blk-wbt.c
blk-wbt: open code wbt_queue_depth_changed in wbt_init
blk-rq-qos: move rq_qos_add and rq_qos_del out of line
blk-rq-qos: make rq_qos_add and rq_qos_del more useful
blk-rq-qos: constify rq_qos_ops
blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos
blk-cgroup: pass a gendisk to blkcg_{de,}activate_policy
blk-cgroup: pass a gendisk to pd_alloc_fn
blk-cgroup: pass a gendisk to blkg_lookup
blk-cgroup: move the cgroup information to struct gendisk
block: factor out a bvec_set_page helper
block: add a bvec_set_folio helper
block: add a bvec_set_virt helper
sd: factor out a sd_set_special_bvec helper
target: use bvec_set_page to initialize bvecs
nvmet: use bvec_set_page to initialize bvecs
nvme: use bvec_set_virt to initialize special_vec
rbd: use bvec_set_page to initialize the copy up bvec
virtio_blk: use bvec_set_virt to initialize special_vec
zram: use bvec_set_page to initialize bvecs
afs: use bvec_set_folio to initialize a bvec
ceph: use bvec_set_page to initialize a bvec
cifs: use bvec_set_page to initialize bvecs
coredump: use bvec_set_page to initialize a bvec
nfs: use bvec_set_page to initialize bvecs
orangefs: use bvec_set_{page,folio} to initialize bvecs
splice: use bvec_set_page to initialize a bvec
io_uring: use bvec_set_page to initialize a bvec
swap: use bvec_set_page to initialize bvecs
rxrpc: use bvec_set_page to initialize a bvec
sunrpc: use bvec_set_page to initialize bvecs
vringh: use bvec_set_page to initialize a bvec
libceph: use bvec_set_page to initialize bvecs
blk-cgroup: fix freeing NULL blkg in blkg_create
block: stub out and deprecated the capability attribute on the gendisk
blk-cgroup: delay calling blkcg_exit_disk until disk_release
Revert "blk-cgroup: simplify blkg freeing from initialization failure paths"
Revert "blk-cgroup: move the cgroup information to struct gendisk"
Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release"
Revert "blk-cgroup: delay blk-cgroup initialization until add_disk"
Revert "blk-cgroup: pass a gendisk to blkg_lookup"
Revert "blk-cgroup: pin the gendisk in struct blkcg_gq"
Davide Zini (3):
block, bfq: split also async bfq_queues on a per-actuator basis
block, bfq: inject I/O to underutilized actuators
block, bfq: balance I/O injection among underutilized actuators
Federico Gavioli (1):
block, bfq: retrieve independent access ranges from request queue
Greg Kroah-Hartman (1):
trace/blktrace: fix memory leak with using debugfs_lookup()
Hannes Reinecke (2):
nvme-fabrics: clarify AUTHREQ result handling
nvme-auth: don't use NVMe status codes
Hou Tao (2):
md: don't update recovery_cp when curr_resync is ACTIVE
md: use MD_RESYNC_* whenever possible
Jens Axboe (11):
block: add a BUILD_BUG_ON() for adding more bio flags than we have space
block: don't allow multiple bios for IOCB_NOWAIT issue
block: treat poll queue enter similarly to timeouts
Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block
Merge tag 'nvme-6.3-2023-02-07' of git://git.infradead.org/nvme into for-6.3/block
Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block
Merge tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme into for-6.3/block
brd: return 0/-error from brd_insert_page()
brd: check for REQ_NOWAIT and set correct page allocation mask
brd: mark as nowait compatible
block: use proper return value from bio_failfast()
Jinke Han (1):
block: Fix io statistics for cgroup in throttle path
Keith Busch (9):
block: make BLK_DEF_MAX_SECTORS unsigned
block: save user max_sectors limit
nvme-pci: remove SGL segment descriptors
nvme-pci: use mapped entries for sgl decision
nvme-pci: place descriptor addresses in iod
nvme: always initialize known command effects
nvme: mask CSE effects for security receive
nvme-pci: fix freeing single sgl
nvme-pci: remove iod use_sgls
Kemeng Shi (27):
sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow
sbitmap: remove redundant check in __sbitmap_queue_get_batch
sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow
sbitmap: correct wake_batch recalculation to avoid potential IO hung
block, bfq: correctly raise inject limit in bfq_choose_bfqq_for_injection
block, bfq: remove unsed parameter reason in bfq_bfqq_is_slow
block, bfq: initialize bfqq->decrease_time_jif correctly
block, bfq: use helper macro RQ_BFQQ to get bfqq of request
block, bfq: remove unnecessary dereference to get async_bfqq
block, bfq: remove redundant check in bfq_put_cooperator
block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
block, bfq: remove unused bfq_wr_max_time in struct bfq_data
blk-mq: avoid sleep in blk_mq_alloc_request_hctx
blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx
blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait
blk-mq: Fix potential io hung for shared sbitmap per tagset
blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly
blk-mq: remove unncessary from_schedule parameter in blk_mq_plug_issue_direct
blk-mq: make blk_mq_commit_rqs a general function for all commits
blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct
blk-mq: use blk_mq_commit_rqs helper in blk_mq_try_issue_list_directly
blk-mq: simplify flush check in blk_mq_dispatch_rq_list
blk-mq: remove unnecessary error count and check in blk_mq_dispatch_rq_list
blk-mq: remove set of bd->last when get driver tag for next request fails
blk-mq: use switch/case to improve readability in blk_mq_try_issue_list_directly
blk-mq: correct stale comment of .get_budget
Lars Ellenberg (1):
drbd: interval tree: make removing an "empty" interval a no-op
Li Nan (2):
blk-iocost: fix divide by 0 error in calc_lcoefs()
blk-iocost: change div64_u64 to DIV64_U64_ROUND_UP in ioc_refresh_params()
Liu Xiaodong (1):
block: ublk: check IO buffer based on flag need_get_data
Martin K. Petersen (1):
block: bio-integrity: Copy flags when bio_integrity_payload is cloned
Matthew Wilcox (1):
block: Remove mm.h from bvec.h
Ming Lei (10):
ublk_drv: remove nr_aborted_queues from ublk_device
ublk_drv: don't probe partitions if the ubq daemon isn't trusted
ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd
ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT
ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev
ublk_drv: add mechanism for supporting unprivileged ublk device
block: ublk: fix doc build warning
ublk_drv: only allow owner to open unprivileged disk
block: ublk: improve handling device deletion
block: sync mixed merged request's failfast with 1st bio's
Pankaj Raghav (3):
block: remove superfluous check for request queue in bdev_is_zoned()
block: add a new helper bdev_{is_zone_start, offset_from_zone_start}
block: introduce bdev_zone_no helper
Paolo Valente (4):
block, bfq: split sync bfq_queues on a per-actuator basis
block, bfq: forbid stable merging of queues associated with different actuators
block, bfq: move io_cq-persistent bfqq data into a dedicated struct
block, bfq: turn bfqq_data into an array in bfq_io_cq
Qiheng Lin (1):
s390/dasd: Fix potential memleak in dasd_eckd_init()
Robert Altnoeder (1):
drbd: fix DRBD_VOLUME_MAX 65535 -> 65534
Thomas Weißschuh (1):
block: make kobj_type structures constant
Ulf Hansson (1):
block: Default to use cgroup support for BFQ
Xiao Ni (5):
md: Factor out is_md_suspended helper
md: Change active_io to percpu
md: Free writes_pending in md_stop
md: account io_acct_set usage with active_io
block: Merge bio before checking ->cached_rq
Yu Kuai (7):
blk-iocost: check return value of match_u64()
blk-iocost: don't allow to configure bio based device
blk-iocost: read params inside lock in sysfs apis
blk-cgroup: dropping parent refcount after pd_free_fn() is done
blk-cgroup: support to track if policy is online
blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()
block, bfq: cleanup 'bfqg->online'
Zhong Jinghua (1):
blk-mq: cleanup unused methods: blk_mq_hw_sysfs_store
Ziyang Zhang (3):
ublk: remove unnecessary NULL check in ublk_rq_has_data()
ublk: mention WRITE_ZEROES in comment of ublk_complete_rq()
ublk: pass NULL to blk_mq_alloc_disk() as queuedata
Documentation/ABI/stable/sysfs-block | 3 +-
Documentation/block/capability.rst | 10 -
Documentation/block/index.rst | 1 -
Documentation/block/ublk.rst | 55 ++-
MAINTAINERS | 1 +
block/Kconfig.iosched | 1 +
block/bfq-cgroup.c | 105 +++---
block/bfq-iosched.c | 629 +++++++++++++++++++++++------------
block/bfq-iosched.h | 146 ++++++--
block/bfq-wf2q.c | 2 +-
block/bio-integrity.c | 8 +-
block/bio.c | 15 +-
block/blk-cgroup.c | 150 +++++----
block/blk-cgroup.h | 14 +-
block/blk-core.c | 36 +-
block/blk-crypto-sysfs.c | 2 +-
block/blk-ia-ranges.c | 4 +-
block/blk-integrity.c | 2 +-
block/blk-iocost.c | 78 +++--
block/blk-iolatency.c | 37 +--
block/blk-ioprio.c | 6 +-
block/blk-map.c | 6 +-
block/blk-merge.c | 35 +-
block/blk-mq-debugfs.c | 10 +-
block/blk-mq-sched.c | 7 +-
block/blk-mq-sysfs.c | 30 +-
block/blk-mq.c | 152 ++++-----
block/blk-rq-qos.c | 67 ++++
block/blk-rq-qos.h | 66 +---
block/blk-settings.c | 10 +-
block/blk-stat.c | 3 +-
block/blk-sysfs.c | 28 +-
block/blk-throttle.c | 11 +-
block/blk-wbt.c | 116 +++++--
block/blk-wbt.h | 98 +-----
block/blk-zoned.c | 4 +-
block/elevator.c | 4 +-
block/fops.c | 21 +-
block/genhd.c | 5 +-
drivers/block/brd.c | 67 ++--
drivers/block/drbd/Makefile | 2 +-
drivers/block/drbd/drbd_buildtag.c | 22 ++
drivers/block/drbd/drbd_debugfs.c | 2 +-
drivers/block/drbd/drbd_int.h | 13 +-
drivers/block/drbd/drbd_interval.c | 6 +-
drivers/block/drbd/drbd_main.c | 20 +-
drivers/block/drbd/drbd_proc.c | 2 +-
drivers/block/drbd/drbd_vli.h | 2 +-
drivers/block/loop.c | 14 +-
drivers/block/null_blk/main.c | 3 +-
drivers/block/ps3vram.c | 7 -
drivers/block/rbd.c | 7 +-
drivers/block/ublk_drv.c | 405 ++++++++++++++++------
drivers/block/virtio_blk.c | 4 +-
drivers/block/zram/zram_drv.c | 15 +-
drivers/md/md.c | 65 ++--
drivers/md/md.h | 9 +-
drivers/nvme/host/auth.c | 30 +-
drivers/nvme/host/constants.c | 16 +
drivers/nvme/host/core.c | 123 +++----
drivers/nvme/host/fabrics.c | 19 +-
drivers/nvme/host/ioctl.c | 9 +-
drivers/nvme/host/nvme.h | 16 +-
drivers/nvme/host/pci.c | 104 ++----
drivers/nvme/host/tcp.c | 7 +-
drivers/nvme/target/admin-cmd.c | 2 +-
drivers/nvme/target/io-cmd-file.c | 10 +-
drivers/nvme/target/passthru.c | 5 +-
drivers/nvme/target/tcp.c | 5 +-
drivers/nvme/target/zns.c | 3 +-
drivers/s390/block/dasd.c | 5 +-
drivers/s390/block/dasd_3990_erp.c | 10 +-
drivers/s390/block/dasd_alias.c | 6 +-
drivers/s390/block/dasd_eckd.c | 104 +++---
drivers/s390/block/dasd_eer.c | 2 +-
drivers/s390/block/dasd_fba.c | 14 +-
drivers/s390/block/dcssblk.c | 4 -
drivers/scsi/sd.c | 36 +-
drivers/target/target_core_file.c | 18 +-
drivers/vhost/vringh.c | 5 +-
fs/afs/write.c | 8 +-
fs/ceph/file.c | 12 +-
fs/cifs/connect.c | 5 +-
fs/cifs/fscache.c | 16 +-
fs/cifs/misc.c | 5 +-
fs/cifs/smb2ops.c | 6 +-
fs/coredump.c | 7 +-
fs/nfs/fscache.c | 16 +-
fs/orangefs/inode.c | 22 +-
fs/splice.c | 5 +-
include/linux/blkdev.h | 27 +-
include/linux/bvec.h | 41 ++-
include/linux/drbd.h | 7 -
include/linux/drbd_config.h | 16 +
include/linux/drbd_genl_api.h | 2 +-
include/linux/drbd_limits.h | 204 ++++++------
include/linux/sched.h | 2 +-
include/uapi/linux/ublk_cmd.h | 49 ++-
io_uring/rsrc.c | 4 +-
kernel/fork.c | 2 +-
kernel/trace/blktrace.c | 4 +-
lib/sbitmap.c | 102 +++---
mm/page_io.c | 8 +-
mm/swapfile.c | 2 +-
net/ceph/messenger_v1.c | 7 +-
net/ceph/messenger_v2.c | 28 +-
net/rxrpc/rxperf.c | 8 +-
net/sunrpc/svcsock.c | 7 +-
net/sunrpc/xdr.c | 5 +-
109 files changed, 2224 insertions(+), 1599 deletions(-)
delete mode 100644 Documentation/block/capability.rst
create mode 100644 drivers/block/drbd/drbd_buildtag.c
create mode 100644 include/linux/drbd_config.h
--
Jens Axboe
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-17 2:54 [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
@ 2023-02-17 19:23 ` Jens Axboe
2023-02-20 23:00 ` pr-tracker-bot
2023-02-20 22:52 ` Linus Torvalds
2023-02-20 23:00 ` pr-tracker-bot
2 siblings, 1 reply; 13+ messages in thread
From: Jens Axboe @ 2023-02-17 19:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-block@vger.kernel.org
On 2/16/23 7:54?PM, Jens Axboe wrote:
> Hi Linus,
>
> Here are the main block updates for the 6.3 merge window. Note that this
> will throw a trivial merge conflict due to a late fix for BFQ in the 6.2
> release, both are trivial to resolve and just in case there are
> questions, I've pushed a merged branch here:
>
> https://git.kernel.dk/cgit/linux-block/log/?h=for-6.3/block-merged
>
> which resolves those two as-of your git tree today.
A late fix came in that should go with this batch, so I updated the tag
to include that. Here's the updated request-pull output:
Please pull!
The following changes since commit 6d796c50f84ca79f1722bb131799e5a5710c4700:
Linux 6.2-rc6 (2023-01-29 13:59:43 -0800)
are available in the Git repository at:
git://git.kernel.dk/linux.git tags/for-6.3/block-2023-02-16
for you to fetch changes up to 0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b:
brd: use radix_tree_maybe_preload instead of radix_tree_preload (2023-02-17 06:15:53 -0700)
----------------------------------------------------------------
for-6.3/block-2023-02-16
----------------------------------------------------------------
Alexander Gordeev (1):
s390/dasd: sort out physical vs virtual pointers usage
Amit Engel (3):
nvme: add nvme_opcode_str function for all nvme cmd types
nvme-tcp: add additional info for nvme_tcp_timeout log
nvmet: for nvme admin set_features cmd, call nvmet_check_data_len_lte()
Andreas Gruenbacher (1):
drbd: drbd_insert_interval(): Clarify comment
Anuj Gupta (2):
nvme: set REQ_ALLOC_CACHE for uring-passthru request
block: extend bio-cache for non-polled requests
Arnd Bergmann (1):
blk-iocost: avoid 64-bit division in ioc_timer_fn
Bart Van Assche (2):
loop: Improve the hw_queue_depth kernel module parameter implementation
block: Remove the ALLOC_CACHE_SLACK constant
Christoph Böhmwalder (8):
drbd: split off drbd_buildtag into separate file
drbd: drop API_VERSION define
drbd: split off drbd_config into separate file
drbd: adjust drbd_limits license header
drbd: make limits unsigned
drbd: remove unnecessary assignment in vli_encode_bits
drbd: remove macros using require_context
MAINTAINERS: add drbd headers
Christoph Hellwig (54):
ps3vram: remove bio splitting
s390/dcssblk:: don't call bio_split_to_limits
nvme: remove nvme_execute_passthru_rq
block: don't call blk_throtl_stat_add for non-READ/WRITE commands
blk-cgroup: delay blk-cgroup initialization until add_disk
blk-cgroup: improve error unwinding in blkg_alloc
blk-cgroup: simplify blkg freeing from initialization failure paths
blk-cgroup: remove the !bdi->dev check in blkg_dev_name
blk-cgroup: pin the gendisk in struct blkcg_gq
blk-cgroup: store a gendisk to throttle in struct task_struct
blk-wbt: pass a gendisk to wbt_{enable,disable}_default
blk-wbt: pass a gendisk to wbt_init
blk-wbt: move private information from blk-wbt.h to blk-wbt.c
blk-wbt: open code wbt_queue_depth_changed in wbt_init
blk-rq-qos: move rq_qos_add and rq_qos_del out of line
blk-rq-qos: make rq_qos_add and rq_qos_del more useful
blk-rq-qos: constify rq_qos_ops
blk-rq-qos: store a gendisk instead of request_queue in struct rq_qos
blk-cgroup: pass a gendisk to blkcg_{de,}activate_policy
blk-cgroup: pass a gendisk to pd_alloc_fn
blk-cgroup: pass a gendisk to blkg_lookup
blk-cgroup: move the cgroup information to struct gendisk
block: factor out a bvec_set_page helper
block: add a bvec_set_folio helper
block: add a bvec_set_virt helper
sd: factor out a sd_set_special_bvec helper
target: use bvec_set_page to initialize bvecs
nvmet: use bvec_set_page to initialize bvecs
nvme: use bvec_set_virt to initialize special_vec
rbd: use bvec_set_page to initialize the copy up bvec
virtio_blk: use bvec_set_virt to initialize special_vec
zram: use bvec_set_page to initialize bvecs
afs: use bvec_set_folio to initialize a bvec
ceph: use bvec_set_page to initialize a bvec
cifs: use bvec_set_page to initialize bvecs
coredump: use bvec_set_page to initialize a bvec
nfs: use bvec_set_page to initialize bvecs
orangefs: use bvec_set_{page,folio} to initialize bvecs
splice: use bvec_set_page to initialize a bvec
io_uring: use bvec_set_page to initialize a bvec
swap: use bvec_set_page to initialize bvecs
rxrpc: use bvec_set_page to initialize a bvec
sunrpc: use bvec_set_page to initialize bvecs
vringh: use bvec_set_page to initialize a bvec
libceph: use bvec_set_page to initialize bvecs
blk-cgroup: fix freeing NULL blkg in blkg_create
block: stub out and deprecated the capability attribute on the gendisk
blk-cgroup: delay calling blkcg_exit_disk until disk_release
Revert "blk-cgroup: simplify blkg freeing from initialization failure paths"
Revert "blk-cgroup: move the cgroup information to struct gendisk"
Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release"
Revert "blk-cgroup: delay blk-cgroup initialization until add_disk"
Revert "blk-cgroup: pass a gendisk to blkg_lookup"
Revert "blk-cgroup: pin the gendisk in struct blkcg_gq"
Davide Zini (3):
block, bfq: split also async bfq_queues on a per-actuator basis
block, bfq: inject I/O to underutilized actuators
block, bfq: balance I/O injection among underutilized actuators
Federico Gavioli (1):
block, bfq: retrieve independent access ranges from request queue
Greg Kroah-Hartman (1):
trace/blktrace: fix memory leak with using debugfs_lookup()
Hannes Reinecke (2):
nvme-fabrics: clarify AUTHREQ result handling
nvme-auth: don't use NVMe status codes
Hou Tao (2):
md: don't update recovery_cp when curr_resync is ACTIVE
md: use MD_RESYNC_* whenever possible
Jens Axboe (11):
block: add a BUILD_BUG_ON() for adding more bio flags than we have space
block: don't allow multiple bios for IOCB_NOWAIT issue
block: treat poll queue enter similarly to timeouts
Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block
Merge tag 'nvme-6.3-2023-02-07' of git://git.infradead.org/nvme into for-6.3/block
Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.3/block
Merge tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme into for-6.3/block
brd: return 0/-error from brd_insert_page()
brd: check for REQ_NOWAIT and set correct page allocation mask
brd: mark as nowait compatible
block: use proper return value from bio_failfast()
Jinke Han (1):
block: Fix io statistics for cgroup in throttle path
Keith Busch (9):
block: make BLK_DEF_MAX_SECTORS unsigned
block: save user max_sectors limit
nvme-pci: remove SGL segment descriptors
nvme-pci: use mapped entries for sgl decision
nvme-pci: place descriptor addresses in iod
nvme: always initialize known command effects
nvme: mask CSE effects for security receive
nvme-pci: fix freeing single sgl
nvme-pci: remove iod use_sgls
Kemeng Shi (27):
sbitmap: remove unnecessary calculation of alloc_hint in __sbitmap_get_shallow
sbitmap: remove redundant check in __sbitmap_queue_get_batch
sbitmap: rewrite sbitmap_find_bit_in_index to reduce repeat code
sbitmap: add sbitmap_find_bit to remove repeat code in __sbitmap_get/__sbitmap_get_shallow
sbitmap: correct wake_batch recalculation to avoid potential IO hung
block, bfq: correctly raise inject limit in bfq_choose_bfqq_for_injection
block, bfq: remove unsed parameter reason in bfq_bfqq_is_slow
block, bfq: initialize bfqq->decrease_time_jif correctly
block, bfq: use helper macro RQ_BFQQ to get bfqq of request
block, bfq: remove unnecessary dereference to get async_bfqq
block, bfq: remove redundant check in bfq_put_cooperator
block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
block, bfq: remove unused bfq_wr_max_time in struct bfq_data
blk-mq: avoid sleep in blk_mq_alloc_request_hctx
blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx
blk-mq: wait on correct sbitmap_queue in blk_mq_mark_tag_wait
blk-mq: Fix potential io hung for shared sbitmap per tagset
blk-mq: remove unnecessary list_empty check in blk_mq_try_issue_list_directly
blk-mq: remove unncessary from_schedule parameter in blk_mq_plug_issue_direct
blk-mq: make blk_mq_commit_rqs a general function for all commits
blk-mq: remove unncessary error count and commit in blk_mq_plug_issue_direct
blk-mq: use blk_mq_commit_rqs helper in blk_mq_try_issue_list_directly
blk-mq: simplify flush check in blk_mq_dispatch_rq_list
blk-mq: remove unnecessary error count and check in blk_mq_dispatch_rq_list
blk-mq: remove set of bd->last when get driver tag for next request fails
blk-mq: use switch/case to improve readability in blk_mq_try_issue_list_directly
blk-mq: correct stale comment of .get_budget
Lars Ellenberg (1):
drbd: interval tree: make removing an "empty" interval a no-op
Li Nan (2):
blk-iocost: fix divide by 0 error in calc_lcoefs()
blk-iocost: change div64_u64 to DIV64_U64_ROUND_UP in ioc_refresh_params()
Liu Xiaodong (1):
block: ublk: check IO buffer based on flag need_get_data
Martin K. Petersen (1):
block: bio-integrity: Copy flags when bio_integrity_payload is cloned
Matthew Wilcox (1):
block: Remove mm.h from bvec.h
Ming Lei (10):
ublk_drv: remove nr_aborted_queues from ublk_device
ublk_drv: don't probe partitions if the ubq daemon isn't trusted
ublk_drv: move ublk_get_device_from_id into ublk_ctrl_uring_cmd
ublk_drv: add device parameter UBLK_PARAM_TYPE_DEVT
ublk_drv: add module parameter of ublks_max for limiting max allowed ublk dev
ublk_drv: add mechanism for supporting unprivileged ublk device
block: ublk: fix doc build warning
ublk_drv: only allow owner to open unprivileged disk
block: ublk: improve handling device deletion
block: sync mixed merged request's failfast with 1st bio's
Pankaj Raghav (4):
block: remove superfluous check for request queue in bdev_is_zoned()
block: add a new helper bdev_{is_zone_start, offset_from_zone_start}
block: introduce bdev_zone_no helper
brd: use radix_tree_maybe_preload instead of radix_tree_preload
Paolo Valente (4):
block, bfq: split sync bfq_queues on a per-actuator basis
block, bfq: forbid stable merging of queues associated with different actuators
block, bfq: move io_cq-persistent bfqq data into a dedicated struct
block, bfq: turn bfqq_data into an array in bfq_io_cq
Qiheng Lin (1):
s390/dasd: Fix potential memleak in dasd_eckd_init()
Robert Altnoeder (1):
drbd: fix DRBD_VOLUME_MAX 65535 -> 65534
Thomas Weißschuh (1):
block: make kobj_type structures constant
Ulf Hansson (1):
block: Default to use cgroup support for BFQ
Xiao Ni (5):
md: Factor out is_md_suspended helper
md: Change active_io to percpu
md: Free writes_pending in md_stop
md: account io_acct_set usage with active_io
block: Merge bio before checking ->cached_rq
Yu Kuai (7):
blk-iocost: check return value of match_u64()
blk-iocost: don't allow to configure bio based device
blk-iocost: read params inside lock in sysfs apis
blk-cgroup: dropping parent refcount after pd_free_fn() is done
blk-cgroup: support to track if policy is online
blk-cgroup: synchronize pd_free_fn() from blkg_free_workfn() and blkcg_deactivate_policy()
block, bfq: cleanup 'bfqg->online'
Zhong Jinghua (1):
blk-mq: cleanup unused methods: blk_mq_hw_sysfs_store
Ziyang Zhang (3):
ublk: remove unnecessary NULL check in ublk_rq_has_data()
ublk: mention WRITE_ZEROES in comment of ublk_complete_rq()
ublk: pass NULL to blk_mq_alloc_disk() as queuedata
Documentation/ABI/stable/sysfs-block | 3 +-
Documentation/block/capability.rst | 10 -
Documentation/block/index.rst | 1 -
Documentation/block/ublk.rst | 55 ++-
MAINTAINERS | 1 +
block/Kconfig.iosched | 1 +
block/bfq-cgroup.c | 105 +++---
block/bfq-iosched.c | 629 +++++++++++++++++++++++------------
block/bfq-iosched.h | 146 ++++++--
block/bfq-wf2q.c | 2 +-
block/bio-integrity.c | 8 +-
block/bio.c | 15 +-
block/blk-cgroup.c | 150 +++++----
block/blk-cgroup.h | 14 +-
block/blk-core.c | 36 +-
block/blk-crypto-sysfs.c | 2 +-
block/blk-ia-ranges.c | 4 +-
block/blk-integrity.c | 2 +-
block/blk-iocost.c | 78 +++--
block/blk-iolatency.c | 37 +--
block/blk-ioprio.c | 6 +-
block/blk-map.c | 6 +-
block/blk-merge.c | 35 +-
block/blk-mq-debugfs.c | 10 +-
block/blk-mq-sched.c | 7 +-
block/blk-mq-sysfs.c | 30 +-
block/blk-mq.c | 152 ++++-----
block/blk-rq-qos.c | 67 ++++
block/blk-rq-qos.h | 66 +---
block/blk-settings.c | 10 +-
block/blk-stat.c | 3 +-
block/blk-sysfs.c | 28 +-
block/blk-throttle.c | 11 +-
block/blk-wbt.c | 116 +++++--
block/blk-wbt.h | 98 +-----
block/blk-zoned.c | 4 +-
block/elevator.c | 4 +-
block/fops.c | 21 +-
block/genhd.c | 5 +-
drivers/block/brd.c | 67 ++--
drivers/block/drbd/Makefile | 2 +-
drivers/block/drbd/drbd_buildtag.c | 22 ++
drivers/block/drbd/drbd_debugfs.c | 2 +-
drivers/block/drbd/drbd_int.h | 13 +-
drivers/block/drbd/drbd_interval.c | 6 +-
drivers/block/drbd/drbd_main.c | 20 +-
drivers/block/drbd/drbd_proc.c | 2 +-
drivers/block/drbd/drbd_vli.h | 2 +-
drivers/block/loop.c | 14 +-
drivers/block/null_blk/main.c | 3 +-
drivers/block/ps3vram.c | 7 -
drivers/block/rbd.c | 7 +-
drivers/block/ublk_drv.c | 405 ++++++++++++++++------
drivers/block/virtio_blk.c | 4 +-
drivers/block/zram/zram_drv.c | 15 +-
drivers/md/md.c | 65 ++--
drivers/md/md.h | 9 +-
drivers/nvme/host/auth.c | 30 +-
drivers/nvme/host/constants.c | 16 +
drivers/nvme/host/core.c | 123 +++----
drivers/nvme/host/fabrics.c | 19 +-
drivers/nvme/host/ioctl.c | 9 +-
drivers/nvme/host/nvme.h | 16 +-
drivers/nvme/host/pci.c | 104 ++----
drivers/nvme/host/tcp.c | 7 +-
drivers/nvme/target/admin-cmd.c | 2 +-
drivers/nvme/target/io-cmd-file.c | 10 +-
drivers/nvme/target/passthru.c | 5 +-
drivers/nvme/target/tcp.c | 5 +-
drivers/nvme/target/zns.c | 3 +-
drivers/s390/block/dasd.c | 5 +-
drivers/s390/block/dasd_3990_erp.c | 10 +-
drivers/s390/block/dasd_alias.c | 6 +-
drivers/s390/block/dasd_eckd.c | 104 +++---
drivers/s390/block/dasd_eer.c | 2 +-
drivers/s390/block/dasd_fba.c | 14 +-
drivers/s390/block/dcssblk.c | 4 -
drivers/scsi/sd.c | 36 +-
drivers/target/target_core_file.c | 18 +-
drivers/vhost/vringh.c | 5 +-
fs/afs/write.c | 8 +-
fs/ceph/file.c | 12 +-
fs/cifs/connect.c | 5 +-
fs/cifs/fscache.c | 16 +-
fs/cifs/misc.c | 5 +-
fs/cifs/smb2ops.c | 6 +-
fs/coredump.c | 7 +-
fs/nfs/fscache.c | 16 +-
fs/orangefs/inode.c | 22 +-
fs/splice.c | 5 +-
include/linux/blkdev.h | 27 +-
include/linux/bvec.h | 41 ++-
include/linux/drbd.h | 7 -
include/linux/drbd_config.h | 16 +
include/linux/drbd_genl_api.h | 2 +-
include/linux/drbd_limits.h | 204 ++++++------
include/linux/sched.h | 2 +-
include/uapi/linux/ublk_cmd.h | 49 ++-
io_uring/rsrc.c | 4 +-
kernel/fork.c | 2 +-
kernel/trace/blktrace.c | 4 +-
lib/sbitmap.c | 102 +++---
mm/page_io.c | 8 +-
mm/swapfile.c | 2 +-
net/ceph/messenger_v1.c | 7 +-
net/ceph/messenger_v2.c | 28 +-
net/rxrpc/rxperf.c | 8 +-
net/sunrpc/svcsock.c | 7 +-
net/sunrpc/xdr.c | 5 +-
109 files changed, 2224 insertions(+), 1599 deletions(-)
delete mode 100644 Documentation/block/capability.rst
create mode 100644 drivers/block/drbd/drbd_buildtag.c
create mode 100644 include/linux/drbd_config.h
--
Jens Axboe
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-17 2:54 [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
2023-02-17 19:23 ` Jens Axboe
@ 2023-02-20 22:52 ` Linus Torvalds
2023-02-21 6:39 ` Yu Kuai
2023-02-22 0:03 ` [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
2023-02-20 23:00 ` pr-tracker-bot
2 siblings, 2 replies; 13+ messages in thread
From: Linus Torvalds @ 2023-02-20 22:52 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org
On Thu, Feb 16, 2023 at 6:54 PM Jens Axboe <axboe@kernel.dk> wrote:
>
> I've pushed a merged branch here:
>
> https://git.kernel.dk/cgit/linux-block/log/?h=for-6.3/block-merged
Hmm. I do verify against suggested merges after doing my own (even
when your suggested merge was then made stale by another later
addition), and I think your merge was wrong wrt bfq_sync_bfqq_move(),
which in your version does the bfq_release_process_ref() before doing
the bic_set_bfqq().
IOW, I think your merge essentially dropped one of the fixes in commit
b600de2d7d3a ("block, bfq: fix uaf for bfqq in bic_set_bfqq()").
Maybe there were reasons why that ordering wasn't required any more,
but it looks funky (and you appear to have correctly merged the other
case in bfq_check_ioprio_change()).
Anyway, this is just a nit-picky email saying that I'm pretty sure
I've done the merge right, but since it doesn't match what you did, I
thought I'd mention it.
Worth double-checking this, in other words. I realize you're mostly
afk this week, so whenever you're back.
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-17 2:54 [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
2023-02-17 19:23 ` Jens Axboe
2023-02-20 22:52 ` Linus Torvalds
@ 2023-02-20 23:00 ` pr-tracker-bot
2 siblings, 0 replies; 13+ messages in thread
From: pr-tracker-bot @ 2023-02-20 23:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linus Torvalds, linux-block@vger.kernel.org
The pull request you sent on Thu, 16 Feb 2023 19:54:31 -0700:
> git://git.kernel.dk/linux.git tags/for-6.3/block-2023-02-16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0aa2988e4fd23c0c8b33999d7b47dfbc5e6bf24b
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-17 19:23 ` Jens Axboe
@ 2023-02-20 23:00 ` pr-tracker-bot
0 siblings, 0 replies; 13+ messages in thread
From: pr-tracker-bot @ 2023-02-20 23:00 UTC (permalink / raw)
To: Jens Axboe; +Cc: Linus Torvalds, linux-block@vger.kernel.org
The pull request you sent on Fri, 17 Feb 2023 12:23:48 -0700:
> git://git.kernel.dk/linux.git tags/for-6.3/block-2023-02-16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/5b0ed5964928b0aaf0d644c17c886c7f5ea4bb3f
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-20 22:52 ` Linus Torvalds
@ 2023-02-21 6:39 ` Yu Kuai
2023-02-21 8:29 ` [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move() Yu Kuai
2023-02-22 0:03 ` [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
1 sibling, 1 reply; 13+ messages in thread
From: Yu Kuai @ 2023-02-21 6:39 UTC (permalink / raw)
To: Linus Torvalds, Jens Axboe, Jan Kara, Paolo Valente
Cc: linux-block@vger.kernel.org, yukuai (C)
Hi,
在 2023/02/21 6:52, Linus Torvalds 写道:
> On Thu, Feb 16, 2023 at 6:54 PM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> I've pushed a merged branch here:
>>
>> https://git.kernel.dk/cgit/linux-block/log/?h=for-6.3/block-merged
>
> Hmm. I do verify against suggested merges after doing my own (even
> when your suggested merge was then made stale by another later
> addition), and I think your merge was wrong wrt bfq_sync_bfqq_move(),
> which in your version does the bfq_release_process_ref() before doing
> the bic_set_bfqq().
It's right this is wrong, I think this happened as following:
1) bfq_sync_bfqq_move() is introduced in commit 9778369a2d6c ("block,
bfq: split sync bfq_queues on a per-actuator basis"), which is merged to
for-6.3 branch.
2) commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'")
is merged to mainline.
3) later, the fix for 2) b600de2d7d3a ("block, bfq: fix uaf for bfqq in
bic_set_bfqq()") is merged to mainline as well, however, I missed the
change in bfq_sync_bfqq_move() in for-6.3 brach.
4) At last, 1) is merged to mainline with some rebase, this is how
bfq_check_ioprio_change() is fixed, however, bfq_sync_bfqq_move() is
still problematic.
Thanks,
Kuai
>
> IOW, I think your merge essentially dropped one of the fixes in commit
> b600de2d7d3a ("block, bfq: fix uaf for bfqq in bic_set_bfqq()").
>
> Maybe there were reasons why that ordering wasn't required any more,
> but it looks funky (and you appear to have correctly merged the other
> case in bfq_check_ioprio_change()).
>
> Anyway, this is just a nit-picky email saying that I'm pretty sure
> I've done the merge right, but since it doesn't match what you did, I
> thought I'd mention it.
>
> Worth double-checking this, in other words. I realize you're mostly
> afk this week, so whenever you're back.
>
> Linus
> .
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move()
2023-02-21 6:39 ` Yu Kuai
@ 2023-02-21 8:29 ` Yu Kuai
2023-02-21 9:14 ` Damien Le Moal
2023-02-22 0:04 ` Jens Axboe
0 siblings, 2 replies; 13+ messages in thread
From: Yu Kuai @ 2023-02-21 8:29 UTC (permalink / raw)
To: jack, axboe, paolo.valente, damien.lemoal
Cc: linux-block, linux-kernel, yukuai3, yukuai1, yi.zhang, yangerkun
From: Yu Kuai <yukuai3@huawei.com>
As explained in commit b600de2d7d3a ("block, bfq: fix uaf for bfqq in
bic_set_bfqq()"), bfqq should not be freed before bic_set_bfqq().
However, this is broken while merging commit 9778369a2d6c ("block, bfq:
split sync bfq_queues on a per-actuator basis") from branch
for-6.3/block.
Fixes: 9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator basis")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
block/bfq-cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
index ea3638e06e04..89ffb3aa992c 100644
--- a/block/bfq-cgroup.c
+++ b/block/bfq-cgroup.c
@@ -746,8 +746,8 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
* old cgroup.
*/
bfq_put_cooperator(sync_bfqq);
- bfq_release_process_ref(bfqd, sync_bfqq);
bic_set_bfqq(bic, NULL, true, act_idx);
+ bfq_release_process_ref(bfqd, sync_bfqq);
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move()
2023-02-21 8:29 ` [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move() Yu Kuai
@ 2023-02-21 9:14 ` Damien Le Moal
2023-02-21 9:35 ` Yu Kuai
2023-02-22 0:04 ` Jens Axboe
1 sibling, 1 reply; 13+ messages in thread
From: Damien Le Moal @ 2023-02-21 9:14 UTC (permalink / raw)
To: Yu Kuai, jack, axboe, paolo.valente
Cc: linux-block, linux-kernel, yukuai3, yi.zhang, yangerkun
On 2/21/23 17:29, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> As explained in commit b600de2d7d3a ("block, bfq: fix uaf for bfqq in
> bic_set_bfqq()"), bfqq should not be freed before bic_set_bfqq().
> However, this is broken while merging commit 9778369a2d6c ("block, bfq:
> split sync bfq_queues on a per-actuator basis") from branch
> for-6.3/block.
The patch looks OK to me, but the commit message is not super clear. What is
broken exactly ?
>
> Fixes: 9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator basis")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
> block/bfq-cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
> index ea3638e06e04..89ffb3aa992c 100644
> --- a/block/bfq-cgroup.c
> +++ b/block/bfq-cgroup.c
> @@ -746,8 +746,8 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
> * old cgroup.
> */
> bfq_put_cooperator(sync_bfqq);
> - bfq_release_process_ref(bfqd, sync_bfqq);
> bic_set_bfqq(bic, NULL, true, act_idx);
> + bfq_release_process_ref(bfqd, sync_bfqq);
> }
> }
>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move()
2023-02-21 9:14 ` Damien Le Moal
@ 2023-02-21 9:35 ` Yu Kuai
0 siblings, 0 replies; 13+ messages in thread
From: Yu Kuai @ 2023-02-21 9:35 UTC (permalink / raw)
To: Damien Le Moal, Yu Kuai, jack, axboe, paolo.valente
Cc: linux-block, linux-kernel, yi.zhang, yangerkun, yukuai (C)
Hi,
在 2023/02/21 17:14, Damien Le Moal 写道:
> On 2/21/23 17:29, Yu Kuai wrote:
>> From: Yu Kuai <yukuai3@huawei.com>
>>
>> As explained in commit b600de2d7d3a ("block, bfq: fix uaf for bfqq in
>> bic_set_bfqq()"), bfqq should not be freed before bic_set_bfqq().
>> However, this is broken while merging commit 9778369a2d6c ("block, bfq:
>> split sync bfq_queues on a per-actuator basis") from branch
>> for-6.3/block.
>
> The patch looks OK to me, but the commit message is not super clear. What is
> broken exactly ?
1) bfq_sync_bfqq_move() is introduced in commit 9778369a2d6c ("block,
bfq: split sync bfq_queues on a per-actuator basis"), which is merged to
block/for-6.3 branch.
2) commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq->bic'")
is merged to mainline.
3) later, the fix for 2) b600de2d7d3a ("block, bfq: fix uaf for bfqq in
bic_set_bfqq()") is merged to mainline as well, however,
bfq_sync_bfqq_move() in block/for-6.3 branch is not changed.
4) At last, 1) is merged to mainline and bfq_sync_bfqq_move() is
still problematic.
Thanks,
Kuai
>
>>
>> Fixes: 9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator basis")
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>> block/bfq-cgroup.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
>> index ea3638e06e04..89ffb3aa992c 100644
>> --- a/block/bfq-cgroup.c
>> +++ b/block/bfq-cgroup.c
>> @@ -746,8 +746,8 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
>> * old cgroup.
>> */
>> bfq_put_cooperator(sync_bfqq);
>> - bfq_release_process_ref(bfqd, sync_bfqq);
>> bic_set_bfqq(bic, NULL, true, act_idx);
>> + bfq_release_process_ref(bfqd, sync_bfqq);
>> }
>> }
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-20 22:52 ` Linus Torvalds
2023-02-21 6:39 ` Yu Kuai
@ 2023-02-22 0:03 ` Jens Axboe
2023-02-22 1:07 ` Linus Torvalds
1 sibling, 1 reply; 13+ messages in thread
From: Jens Axboe @ 2023-02-22 0:03 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-block@vger.kernel.org, Paolo Valente
On 2/20/23 3:52 PM, Linus Torvalds wrote:
> On Thu, Feb 16, 2023 at 6:54 PM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> I've pushed a merged branch here:
>>
>> https://git.kernel.dk/cgit/linux-block/log/?h=for-6.3/block-merged
>
> Hmm. I do verify against suggested merges after doing my own (even
> when your suggested merge was then made stale by another later
> addition), and I think your merge was wrong wrt bfq_sync_bfqq_move(),
> which in your version does the bfq_release_process_ref() before doing
> the bic_set_bfqq().
>
> IOW, I think your merge essentially dropped one of the fixes in commit
> b600de2d7d3a ("block, bfq: fix uaf for bfqq in bic_set_bfqq()").
>
> Maybe there were reasons why that ordering wasn't required any more,
> but it looks funky (and you appear to have correctly merged the other
> case in bfq_check_ioprio_change()).
>
> Anyway, this is just a nit-picky email saying that I'm pretty sure
> I've done the merge right, but since it doesn't match what you did, I
> thought I'd mention it.
>
> Worth double-checking this, in other words. I realize you're mostly
> afk this week, so whenever you're back.
I'll double check it. The merge doesn't end up touching any of
bfq_sync_bfqq_move(), just conflicting with:
bfq_check_ioprio_change(), where the release ordering should be upheld,
and
__bfq_bic_change_cgroup(), where it's still done after assigning the
async_bfqq.
I'll double check tomorrow...
--
Jens Axboe
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move()
2023-02-21 8:29 ` [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move() Yu Kuai
2023-02-21 9:14 ` Damien Le Moal
@ 2023-02-22 0:04 ` Jens Axboe
1 sibling, 0 replies; 13+ messages in thread
From: Jens Axboe @ 2023-02-22 0:04 UTC (permalink / raw)
To: Yu Kuai, jack, paolo.valente, damien.lemoal
Cc: linux-block, linux-kernel, yukuai3, yi.zhang, yangerkun
On 2/21/23 1:29 AM, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> As explained in commit b600de2d7d3a ("block, bfq: fix uaf for bfqq in
> bic_set_bfqq()"), bfqq should not be freed before bic_set_bfqq().
> However, this is broken while merging commit 9778369a2d6c ("block, bfq:
> split sync bfq_queues on a per-actuator basis") from branch
> for-6.3/block.
>
> Fixes: 9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator basis")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
> block/bfq-cgroup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
> index ea3638e06e04..89ffb3aa992c 100644
> --- a/block/bfq-cgroup.c
> +++ b/block/bfq-cgroup.c
> @@ -746,8 +746,8 @@ static void bfq_sync_bfqq_move(struct bfq_data *bfqd,
> * old cgroup.
> */
> bfq_put_cooperator(sync_bfqq);
> - bfq_release_process_ref(bfqd, sync_bfqq);
> bic_set_bfqq(bic, NULL, true, act_idx);
> + bfq_release_process_ref(bfqd, sync_bfqq);
> }
> }
This is already in -git, see my reply to Linus. Eg this will apply
to for-6.3/block, but it will not apply to current master that
has it merged because we got that from the 6.2 side.
--
Jens Axboe
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-22 0:03 ` [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
@ 2023-02-22 1:07 ` Linus Torvalds
2023-02-22 3:48 ` Jens Axboe
0 siblings, 1 reply; 13+ messages in thread
From: Linus Torvalds @ 2023-02-22 1:07 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org, Paolo Valente
On Tue, Feb 21, 2023 at 4:03 PM Jens Axboe <axboe@kernel.dk> wrote:
>
> I'll double check it. The merge doesn't end up touching any of
> bfq_sync_bfqq_move()
It absolutely does.
Or rather - your merge doesn't end up touching it, and I claim that's
exactly the problem.
My merge *does* touch it, and I think my merge is the right thing to do..
> just conflicting with:
>
> bfq_check_ioprio_change(), where the release ordering should be upheld,
That's the trivial case.
But:
> __bfq_bic_change_cgroup(), where it's still done after assigning the
> async_bfqq.
No.
That's where bfq_sync_bfqq_move() *comes* from. See commit
9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator
basis").
The whole bfq_sync_bfqq_move() function didn't exist at all in the
tree that fixed the bfq_release_process_ref() ordering.
It was split out of the __bfq_bic_change_cgroup() code, so the change
to __bfq_bic_change_cgroup() needed to now instead be done in that
bfq_sync_bfqq_move() code.
Linus
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [GIT PULL for-6.3] Block updates for 6.3
2023-02-22 1:07 ` Linus Torvalds
@ 2023-02-22 3:48 ` Jens Axboe
0 siblings, 0 replies; 13+ messages in thread
From: Jens Axboe @ 2023-02-22 3:48 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-block@vger.kernel.org, Paolo Valente
On 2/21/23 6:07?PM, Linus Torvalds wrote:
> On Tue, Feb 21, 2023 at 4:03 PM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> I'll double check it. The merge doesn't end up touching any of
>> bfq_sync_bfqq_move()
>
> It absolutely does.
>
> Or rather - your merge doesn't end up touching it, and I claim that's
> exactly the problem.
>
> My merge *does* touch it, and I think my merge is the right thing to do..
>
>> just conflicting with:
>>
>> bfq_check_ioprio_change(), where the release ordering should be upheld,
>
> That's the trivial case.
>
> But:
>
>> __bfq_bic_change_cgroup(), where it's still done after assigning the
>> async_bfqq.
>
> No.
>
> That's where bfq_sync_bfqq_move() *comes* from. See commit
> 9778369a2d6c ("block, bfq: split sync bfq_queues on a per-actuator
> basis").
>
> The whole bfq_sync_bfqq_move() function didn't exist at all in the
> tree that fixed the bfq_release_process_ref() ordering.
>
> It was split out of the __bfq_bic_change_cgroup() code, so the change
> to __bfq_bic_change_cgroup() needed to now instead be done in that
> bfq_sync_bfqq_move() code.
Yep I'm being dense, you're totally right and your merge is the right
one.
--
Jens Axboe
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-02-22 3:48 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 2:54 [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
2023-02-17 19:23 ` Jens Axboe
2023-02-20 23:00 ` pr-tracker-bot
2023-02-20 22:52 ` Linus Torvalds
2023-02-21 6:39 ` Yu Kuai
2023-02-21 8:29 ` [PATCH] block, bfq: free 'sync_bfqq' after bic_set_bfqq() in bfq_sync_bfqq_move() Yu Kuai
2023-02-21 9:14 ` Damien Le Moal
2023-02-21 9:35 ` Yu Kuai
2023-02-22 0:04 ` Jens Axboe
2023-02-22 0:03 ` [GIT PULL for-6.3] Block updates for 6.3 Jens Axboe
2023-02-22 1:07 ` Linus Torvalds
2023-02-22 3:48 ` Jens Axboe
2023-02-20 23:00 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox