* [PATCH] libceph: Annotate crush_rule::steps with __counted_by()
@ 2026-11-03 16:22 Thorsten Blum
2026-11-10 11:32 ` Alex Markuze
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-11-03 16:22 UTC (permalink / raw)
To: Ilya Dryomov, Alex Markuze, Xiubo Li, Viacheslav Dubeyko,
Kees Cook, Gustavo A. R. Silva
Cc: Thorsten Blum, ceph-devel, linux-kernel, linux-hardening
Add __counted_by() to crush_rule::steps to improve access bounds
checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
include/linux/crush/crush.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 30dba392b730..7d243b9b1093 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -87,7 +87,7 @@ struct crush_rule_mask {
struct crush_rule {
__u32 len;
struct crush_rule_mask mask;
- struct crush_rule_step steps[];
+ struct crush_rule_step steps[] __counted_by(len);
};
#define crush_rule_size(len) (sizeof(struct crush_rule) + \
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: libceph: Annotate crush_rule::steps with __counted_by()
2026-11-03 16:22 [PATCH] libceph: Annotate crush_rule::steps with __counted_by() Thorsten Blum
@ 2026-11-10 11:32 ` Alex Markuze
0 siblings, 0 replies; 2+ messages in thread
From: Alex Markuze @ 2026-11-10 11:32 UTC (permalink / raw)
To: Thorsten Blum; +Cc: ceph-devel
Hi Thorsten,
Thanks for the patch.
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
--
Alex Markuze
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-10 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 16:22 [PATCH] libceph: Annotate crush_rule::steps with __counted_by() Thorsten Blum
2026-11-10 11:32 ` Alex Markuze
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.