[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aab89390-264f-49bd-8e6e-b69de7f8c526@csgroup.eu>
Date: Thu, 14 Dec 2023 08:36:57 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Nicholas Miehlbradt <nicholas@...ux.ibm.com>,
"glider@...gle.com" <glider@...gle.com>,
"elver@...gle.com" <elver@...gle.com>,
"dvyukov@...gle.com" <dvyukov@...gle.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"npiggin@...il.com" <npiggin@...il.com>
CC: "linux-mm@...ck.org" <linux-mm@...ck.org>,
"kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
"iii@...ux.ibm.com" <iii@...ux.ibm.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 02/13] hvc: Fix use of uninitialized array in
udbg_hvc_putc
Le 14/12/2023 à 06:55, Nicholas Miehlbradt a écrit :
> All elements of bounce_buffer are eventually read and passed to the
> hypervisor so it should probably be fully initialized.
should or shall ?
>
> Signed-off-by: Nicholas Miehlbradt <nicholas@...ux.ibm.com>
Should be a Fixed: tag ?
> ---
> drivers/tty/hvc/hvc_vio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
> index 736b230f5ec0..1e88bfcdde20 100644
> --- a/drivers/tty/hvc/hvc_vio.c
> +++ b/drivers/tty/hvc/hvc_vio.c
> @@ -227,7 +227,7 @@ static const struct hv_ops hvterm_hvsi_ops = {
> static void udbg_hvc_putc(char c)
> {
> int count = -1;
> - unsigned char bounce_buffer[16];
> + unsigned char bounce_buffer[16] = { 0 };
Why 16 while we have a count of 1 in the call to hvterm_raw_put_chars() ?
>
> if (!hvterm_privs[0])
> return;
Powered by blists - more mailing lists