* [PATCH] alpha: Replace one-element array with flexible-array member
@ 2023-08-02 13:25 Gustavo A. R. Silva
2023-08-15 20:02 ` Gustavo A. R. Silva
2023-08-15 23:44 ` Kees Cook
0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2023-08-02 13:25 UTC (permalink / raw)
To: Richard Henderson, Ivan Kokshaysky, Matt Turner
Cc: linux-alpha, linux-kernel, Gustavo A. R. Silva, linux-hardening
One-element and zero-length arrays are deprecated. So, replace
one-element array in struct osf_dirent with flexible-array
member.
This results in no differences in binary output.
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
arch/alpha/kernel/osf_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index d98701ee36c6..5db88b627439 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -97,7 +97,7 @@ struct osf_dirent {
unsigned int d_ino;
unsigned short d_reclen;
unsigned short d_namlen;
- char d_name[1];
+ char d_name[];
};
struct osf_dirent_callback {
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] alpha: Replace one-element array with flexible-array member
2023-08-02 13:25 [PATCH] alpha: Replace one-element array with flexible-array member Gustavo A. R. Silva
@ 2023-08-15 20:02 ` Gustavo A. R. Silva
2023-08-15 23:44 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2023-08-15 20:02 UTC (permalink / raw)
To: Gustavo A. R. Silva, Richard Henderson, Ivan Kokshaysky,
Matt Turner
Cc: linux-alpha, linux-kernel, linux-hardening
Hi all,
Friendly ping: who can take this, please?
Thanks
--
Gustavo
On 8/2/23 07:25, Gustavo A. R. Silva wrote:
> One-element and zero-length arrays are deprecated. So, replace
> one-element array in struct osf_dirent with flexible-array
> member.
>
> This results in no differences in binary output.
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
> arch/alpha/kernel/osf_sys.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
> index d98701ee36c6..5db88b627439 100644
> --- a/arch/alpha/kernel/osf_sys.c
> +++ b/arch/alpha/kernel/osf_sys.c
> @@ -97,7 +97,7 @@ struct osf_dirent {
> unsigned int d_ino;
> unsigned short d_reclen;
> unsigned short d_namlen;
> - char d_name[1];
> + char d_name[];
> };
>
> struct osf_dirent_callback {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] alpha: Replace one-element array with flexible-array member
2023-08-02 13:25 [PATCH] alpha: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-08-15 20:02 ` Gustavo A. R. Silva
@ 2023-08-15 23:44 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2023-08-15 23:44 UTC (permalink / raw)
To: Richard Henderson, Ivan Kokshaysky, Matt Turner,
Gustavo A. R. Silva
Cc: Kees Cook, linux-alpha, linux-kernel, linux-hardening
On Wed, 02 Aug 2023 07:25:56 -0600, Gustavo A. R. Silva wrote:
> One-element and zero-length arrays are deprecated. So, replace
> one-element array in struct osf_dirent with flexible-array
> member.
>
> This results in no differences in binary output.
> [...]
Applied to for-next/hardening, thanks!
[1/1] alpha: Replace one-element array with flexible-array member
https://git.kernel.org/kees/c/967afdf808cf
Take care,
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-15 23:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 13:25 [PATCH] alpha: Replace one-element array with flexible-array member Gustavo A. R. Silva
2023-08-15 20:02 ` Gustavo A. R. Silva
2023-08-15 23:44 ` Kees Cook
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).