* [RESEND PATCH] alpha: Replace one-element array with flexible array member
@ 2024-12-20 19:20 Thorsten Blum
2024-12-23 5:46 ` Kees Cook
0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Blum @ 2024-12-20 19:20 UTC (permalink / raw)
To: Richard Henderson, Matt Turner, Thorsten Blum
Cc: linux-hardening, linux-alpha, linux-kernel
Replace the deprecated one-element array with a modern flexible array
member in the struct crb_struct.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/alpha/include/asm/hwrpb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
index fc76f36265ad..db831cf8de10 100644
--- a/arch/alpha/include/asm/hwrpb.h
+++ b/arch/alpha/include/asm/hwrpb.h
@@ -135,7 +135,7 @@ struct crb_struct {
/* virtual->physical map */
unsigned long map_entries;
unsigned long map_pages;
- struct vf_map_struct map[1];
+ struct vf_map_struct map[];
};
struct memclust_struct {
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [RESEND PATCH] alpha: Replace one-element array with flexible array member
2024-12-20 19:20 [RESEND PATCH] alpha: Replace one-element array with flexible array member Thorsten Blum
@ 2024-12-23 5:46 ` Kees Cook
2024-12-23 7:40 ` Thorsten Blum
0 siblings, 1 reply; 7+ messages in thread
From: Kees Cook @ 2024-12-23 5:46 UTC (permalink / raw)
To: Thorsten Blum
Cc: Richard Henderson, Matt Turner, linux-hardening, linux-alpha,
linux-kernel
On Fri, Dec 20, 2024 at 08:20:20PM +0100, Thorsten Blum wrote:
> Replace the deprecated one-element array with a modern flexible array
> member in the struct crb_struct.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> arch/alpha/include/asm/hwrpb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
> index fc76f36265ad..db831cf8de10 100644
> --- a/arch/alpha/include/asm/hwrpb.h
> +++ b/arch/alpha/include/asm/hwrpb.h
> @@ -135,7 +135,7 @@ struct crb_struct {
> /* virtual->physical map */
> unsigned long map_entries;
> unsigned long map_pages;
> - struct vf_map_struct map[1];
> + struct vf_map_struct map[];
> };
Seems like this could use __counted_by(map_entries) as well?
...
for (i = 0; i < crb->map_entries; ++i) {
unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT;
...
But yes, this appears to be used as a flexible array and should be
adjusted. I see no sizeof() uses that would change. So:
Reviewed-by: Kees Cook <kees@kernel.org>
-Kees
--
Kees Cook
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [RESEND PATCH] alpha: Replace one-element array with flexible array member
2024-12-23 5:46 ` Kees Cook
@ 2024-12-23 7:40 ` Thorsten Blum
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2024-12-23 7:40 UTC (permalink / raw)
To: Kees Cook
Cc: Richard Henderson, Matt Turner, linux-hardening, linux-alpha,
linux-kernel
On 23. Dec 2024, at 06:46, Kees Cook wrote:
> On Fri, Dec 20, 2024 at 08:20:20PM +0100, Thorsten Blum wrote:
>> Replace the deprecated one-element array with a modern flexible array
>> member in the struct crb_struct.
>>
>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
>> ---
>
> Seems like this could use __counted_by(map_entries) as well?
Yes, but alpha doesn't seem to support __counted_by() yet. Does it still
make sense to add it then?
Thanks,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RESEND PATCH] alpha: Replace one-element array with flexible array member
@ 2025-02-09 8:12 Thorsten Blum
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2025-02-09 8:12 UTC (permalink / raw)
To: Richard Henderson, Matt Turner
Cc: Thorsten Blum, Kees Cook, linux-alpha, linux-kernel
Replace the deprecated one-element array with a modern flexible array
member in the struct crb_struct.
Link: https://github.com/KSPP/linux/issues/79
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/alpha/include/asm/hwrpb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
index fc76f36265ad..db831cf8de10 100644
--- a/arch/alpha/include/asm/hwrpb.h
+++ b/arch/alpha/include/asm/hwrpb.h
@@ -135,7 +135,7 @@ struct crb_struct {
/* virtual->physical map */
unsigned long map_entries;
unsigned long map_pages;
- struct vf_map_struct map[1];
+ struct vf_map_struct map[];
};
struct memclust_struct {
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [RESEND PATCH] alpha: Replace one-element array with flexible array member
@ 2025-01-16 13:00 Thorsten Blum
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2025-01-16 13:00 UTC (permalink / raw)
To: Richard Henderson, Matt Turner
Cc: Thorsten Blum, Kees Cook, linux-alpha, linux-kernel
Replace the deprecated one-element array with a modern flexible array
member in the struct crb_struct.
Link: https://github.com/KSPP/linux/issues/79
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/alpha/include/asm/hwrpb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
index fc76f36265ad..db831cf8de10 100644
--- a/arch/alpha/include/asm/hwrpb.h
+++ b/arch/alpha/include/asm/hwrpb.h
@@ -135,7 +135,7 @@ struct crb_struct {
/* virtual->physical map */
unsigned long map_entries;
unsigned long map_pages;
- struct vf_map_struct map[1];
+ struct vf_map_struct map[];
};
struct memclust_struct {
--
2.48.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [RESEND PATCH] alpha: Replace one-element array with flexible array member
@ 2025-01-07 10:43 Thorsten Blum
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2025-01-07 10:43 UTC (permalink / raw)
To: Richard Henderson, Matt Turner, Kees Cook, Thorsten Blum
Cc: linux-alpha, linux-kernel
Replace the deprecated one-element array with a modern flexible array
member in the struct crb_struct.
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/alpha/include/asm/hwrpb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
index fc76f36265ad..db831cf8de10 100644
--- a/arch/alpha/include/asm/hwrpb.h
+++ b/arch/alpha/include/asm/hwrpb.h
@@ -135,7 +135,7 @@ struct crb_struct {
/* virtual->physical map */
unsigned long map_entries;
unsigned long map_pages;
- struct vf_map_struct map[1];
+ struct vf_map_struct map[];
};
struct memclust_struct {
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [RESEND PATCH] alpha: Replace one-element array with flexible array member
@ 2024-12-09 16:42 Thorsten Blum
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Blum @ 2024-12-09 16:42 UTC (permalink / raw)
To: Richard Henderson, Matt Turner
Cc: linux-hardening, Thorsten Blum, linux-alpha, linux-kernel
Replace the deprecated one-element array with a modern flexible array
member in the struct crb_struct.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/alpha/include/asm/hwrpb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/include/asm/hwrpb.h b/arch/alpha/include/asm/hwrpb.h
index fc76f36265ad..db831cf8de10 100644
--- a/arch/alpha/include/asm/hwrpb.h
+++ b/arch/alpha/include/asm/hwrpb.h
@@ -135,7 +135,7 @@ struct crb_struct {
/* virtual->physical map */
unsigned long map_entries;
unsigned long map_pages;
- struct vf_map_struct map[1];
+ struct vf_map_struct map[];
};
struct memclust_struct {
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-02-09 8:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 19:20 [RESEND PATCH] alpha: Replace one-element array with flexible array member Thorsten Blum
2024-12-23 5:46 ` Kees Cook
2024-12-23 7:40 ` Thorsten Blum
-- strict thread matches above, loose matches on Subject: below --
2025-02-09 8:12 Thorsten Blum
2025-01-16 13:00 Thorsten Blum
2025-01-07 10:43 Thorsten Blum
2024-12-09 16:42 Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).