Skip to content

block: make some queue limits checks more robust#51

Closed
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/984658=>linus-master
Closed

block: make some queue limits checks more robust#51
blktests-ci[bot] wants to merge 3 commits intolinus-master_basefrom
series/984658=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Jul 23, 2025

Pull request for series with
subject: block: make some queue limits checks more robust
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=984658

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 23, 2025

Upstream branch: 89be9a8
series: https://patchwork.kernel.org/project/linux-block/list/?series=984658
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 24, 2025

Upstream branch: 25fae0b
series: https://patchwork.kernel.org/project/linux-block/list/?series=984658
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 9216f91 to 13c8f5f Compare July 24, 2025 06:45
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 87bbbbc to 6637119 Compare July 30, 2025 01:47
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 30, 2025

Upstream branch: 14bed9b
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot added V2 and removed V1 labels Jul 30, 2025
@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 13c8f5f to 3a1ce1f Compare July 30, 2025 01:49
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6637119 to f092a9b Compare July 31, 2025 04:25
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: 260f6f4
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 3a1ce1f to 269c157 Compare July 31, 2025 04:27
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from f092a9b to 0b59764 Compare July 31, 2025 17:58
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: d6084bb
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 269c157 to 1947668 Compare July 31, 2025 18:00
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 0b59764 to aee5bd3 Compare July 31, 2025 19:11
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: 831462f
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 1947668 to c753f41 Compare July 31, 2025 19:14
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from aee5bd3 to ef18525 Compare July 31, 2025 20:07
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: c93529a
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from c753f41 to c8fd2f5 Compare July 31, 2025 20:10
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ef18525 to 3851b3f Compare July 31, 2025 20:55
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: cbbf0a7
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from c8fd2f5 to aeb6018 Compare July 31, 2025 20:57
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3851b3f to 28b3384 Compare July 31, 2025 23:42
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: 6a68cec
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from aeb6018 to 00c7d4e Compare July 31, 2025 23:44
@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from f173e4a to ecfd728 Compare August 4, 2025 02:26
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from bd9d53a to feb07b1 Compare August 4, 2025 03:25
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 4, 2025

Upstream branch: d2eedaa
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from ecfd728 to 14c37d4 Compare August 4, 2025 03:27
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from feb07b1 to de83e48 Compare August 8, 2025 00:30
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 8, 2025

Upstream branch: 6e64f45
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 14c37d4 to f03391a Compare August 8, 2025 00:43
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from de83e48 to bb733b3 Compare August 8, 2025 04:06
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 8, 2025

Upstream branch: bec0771
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from f03391a to 67fe1d6 Compare August 8, 2025 04:18
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from bb733b3 to 40fbfea Compare August 8, 2025 04:21
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 8, 2025

Upstream branch: 3781648
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 67fe1d6 to f685242 Compare August 8, 2025 04:34
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 40fbfea to 37dce65 Compare August 9, 2025 05:21
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 9, 2025

Upstream branch: 0227b49
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from f685242 to 01731c8 Compare August 9, 2025 05:36
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 37dce65 to 4c26e9a Compare August 9, 2025 05:49
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 9, 2025

Upstream branch: 71a0760
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

…imits()

In blk_stack_limits(), we check that the t->chunk_sectors value is a
multiple of the t->physical_block_size value.

However, by finding the chunk_sectors value in bytes, we may overflow
the unsigned int which holds chunk_sectors, so change the check to be
based on sectors.

Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
The merging/splitting code and other queue limits checking depends on the
physical block size being a power-of-2, so enforce it.

Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
@blktests-ci blktests-ci Bot force-pushed the series/984658=>linus-master branch from 01731c8 to 13fb1d2 Compare August 9, 2025 06:03
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 4c26e9a to 1356209 Compare August 9, 2025 06:05
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Aug 9, 2025

Upstream branch: 2988dfe
series: https://patchwork.kernel.org/project/linux-block/list/?series=986660
version: 2

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=986660
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: block: avoid possible overflow for chunk_sectors check in blk_stack_limits()
Using index info to reconstruct a base tree...
M	block/blk-settings.c
Falling back to patching base and 3-way merge...
Auto-merging block/blk-settings.c
No changes -- Patch already applied.
Applying: block: Enforce power-of-2 physical block size
Using index info to reconstruct a base tree...
M	block/blk-settings.c
Falling back to patching base and 3-way merge...
Auto-merging block/blk-settings.c
CONFLICT (content): Merge conflict in block/blk-settings.c
Patch failed at 0002 block: Enforce power-of-2 physical block size'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:

diff --cc block/blk-settings.c
index 07874e9b609f,5ae0a253e43f..000000000000
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@@ -320,9 -272,9 +320,13 @@@ int blk_validate_limits(struct queue_li
  		pr_warn("Invalid logical block size (%d)\n", lim->logical_block_size);
  		return -EINVAL;
  	}
 -	if (lim->physical_block_size < lim->logical_block_size)
 +	if (lim->physical_block_size < lim->logical_block_size) {
  		lim->physical_block_size = lim->logical_block_size;
++<<<<<<< HEAD
 +	} else if (!is_power_of_2(lim->physical_block_size)) {
++=======
+ 	else if (!is_power_of_2(lim->physical_block_size)) {
++>>>>>>> block: Enforce power-of-2 physical block size
  		pr_warn("Invalid physical block size (%d)\n", lim->physical_block_size);
  		return -EINVAL;
  	}

@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch 4 times, most recently from 77110f5 to a2e0474 Compare August 10, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants