* [PATCH v2] ext4: Annotate struct fname with __counted_by()
@ 2024-11-05 10:18 Thorsten Blum
2024-11-14 13:53 ` Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2024-11-05 10:18 UTC (permalink / raw)
To: Theodore Ts'o, Andreas Dilger, Kees Cook, Gustavo A. R. Silva
Cc: Thorsten Blum, Jan Kara, linux-ext4, linux-kernel,
linux-hardening
Add the __counted_by compiler attribute to the flexible array member
name to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
CONFIG_FORTIFY_SOURCE.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Split the patch into two separate patches as suggested by Greg KH
- Link to v1: https://lore.kernel.org/r/20241104234214.8094-2-thorsten.blum@linux.dev/
---
fs/ext4/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index ef6a3c8f3a9a..233479647f1b 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -418,7 +418,7 @@ struct fname {
__u32 inode;
__u8 name_len;
__u8 file_type;
- char name[];
+ char name[] __counted_by(name_len);
};
/*
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] ext4: Annotate struct fname with __counted_by()
2024-11-05 10:18 [PATCH v2] ext4: Annotate struct fname with __counted_by() Thorsten Blum
@ 2024-11-14 13:53 ` Theodore Ts'o
2024-11-14 23:01 ` Thorsten Blum
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Ts'o @ 2024-11-14 13:53 UTC (permalink / raw)
To: Andreas Dilger, Kees Cook, Gustavo A. R. Silva, Thorsten Blum
Cc: Theodore Ts'o, Jan Kara, linux-ext4, linux-kernel,
linux-hardening
On Tue, 05 Nov 2024 11:18:14 +0100, Thorsten Blum wrote:
> Add the __counted_by compiler attribute to the flexible array member
> name to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and
> CONFIG_FORTIFY_SOURCE.
>
>
Applied, thanks!
[1/1] ext4: Annotate struct fname with __counted_by()
commit: de183b2baf90f0acc1854a3998c14b8b228f9643
By the way, in general, you don't need to resend patches unless you
need to rebase them to fix patch conflicts; I track requested patches
using patchwork, and I tend to process and review patches in batches.
If you are concerned that I might have missed a patch, feel free to
reply to the original patch with a ping. I'll see it in my inbox, and
even if it had gotten lost in my inbox, I can find the original patch
using lore.kernel.org or patchwork.
Thanks!
Best regards,
--
Theodore Ts'o <tytso@mit.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] ext4: Annotate struct fname with __counted_by()
2024-11-14 13:53 ` Theodore Ts'o
@ 2024-11-14 23:01 ` Thorsten Blum
0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2024-11-14 23:01 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Andreas Dilger, Kees Cook, Gustavo A. R. Silva, Jan Kara,
linux-ext4, linux-kernel, linux-hardening
On 14. Nov 2024, at 14:53, Theodore Ts'o wrote:
> By the way, in general, you don't need to resend patches unless you
> need to rebase them to fix patch conflicts; I track requested patches
> using patchwork, and I tend to process and review patches in batches.
>
> If you are concerned that I might have missed a patch, feel free to
> reply to the original patch with a ping. I'll see it in my inbox, and
> even if it had gotten lost in my inbox, I can find the original patch
> using lore.kernel.org or patchwork.
Thanks for letting me know.
Best regards,
Thorsten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-14 23:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-05 10:18 [PATCH v2] ext4: Annotate struct fname with __counted_by() Thorsten Blum
2024-11-14 13:53 ` Theodore Ts'o
2024-11-14 23:01 ` Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox