* [PATCH] regmap: Annotate regmap_access_table members with __counted_by_ptr()
@ 2026-11-02 11:30 Thorsten Blum
2026-11-02 11:43 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-11-02 11:30 UTC (permalink / raw)
To: Mark Brown, Kees Cook, Gustavo A. R. Silva
Cc: Thorsten Blum, linux-kernel, linux-hardening
Add __counted_by_ptr() to regmap_access_table::yes_ranges and
regmap_access_table::no_ranges to improve access bounds checking via
CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
include/linux/regmap.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index c8aebd148e08..a72f17ab6264 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -248,9 +248,9 @@ struct regmap_range {
* check function will return true. "no_ranges" are searched first.
*/
struct regmap_access_table {
- const struct regmap_range *yes_ranges;
+ const struct regmap_range *yes_ranges __counted_by_ptr(n_yes_ranges);
unsigned int n_yes_ranges;
- const struct regmap_range *no_ranges;
+ const struct regmap_range *no_ranges __counted_by_ptr(n_no_ranges);
unsigned int n_no_ranges;
};
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] regmap: Annotate regmap_access_table members with __counted_by_ptr()
2026-11-02 11:30 [PATCH] regmap: Annotate regmap_access_table members with __counted_by_ptr() Thorsten Blum
@ 2026-11-02 11:43 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-02 11:43 UTC (permalink / raw)
To: Kees Cook, Gustavo A. R. Silva, Thorsten Blum
Cc: linux-kernel, linux-hardening
On Mon, 02 Nov 2026 12:30:20 +0100, Thorsten Blum wrote:
> regmap: Annotate regmap_access_table members with __counted_by_ptr()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-7.5
Thanks!
[1/1] regmap: Annotate regmap_access_table members with __counted_by_ptr()
https://git.kernel.org/broonie/regmap/c/acebd8e4f16f
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-02 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 11:30 [PATCH] regmap: Annotate regmap_access_table members with __counted_by_ptr() Thorsten Blum
2026-11-02 11:43 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®