* [PATCH] vt: fix unicode buffer corruption when deleting characters
@ 2024-02-29 21:05 Nicolas Pitre
2024-02-29 21:51 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2024-02-29 21:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial
This is the same issue that was fixed for the VGA text buffer in
commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars
in the buffer"). The cure is also the same.
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Cc: <stable@kernel.org>
---
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 156efda7c8..38a765eadb 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -381,7 +381,7 @@ static void vc_uniscr_delete(struct vc_data *vc, unsigned int nr)
u32 *ln = vc->vc_uni_lines[vc->state.y];
unsigned int x = vc->state.x, cols = vc->vc_cols;
- memcpy(&ln[x], &ln[x + nr], (cols - x - nr) * sizeof(*ln));
+ memmove(&ln[x], &ln[x + nr], (cols - x - nr) * sizeof(*ln));
memset32(&ln[cols - nr], ' ', nr);
}
}
--
2.44.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] vt: fix unicode buffer corruption when deleting characters
2024-02-29 21:05 [PATCH] vt: fix unicode buffer corruption when deleting characters Nicolas Pitre
@ 2024-02-29 21:51 ` Greg Kroah-Hartman
2024-02-29 22:10 ` Nicolas Pitre
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-29 21:51 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Jiri Slaby, linux-serial
On Thu, Feb 29, 2024 at 04:05:51PM -0500, Nicolas Pitre wrote:
> This is the same issue that was fixed for the VGA text buffer in
> commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars
> in the buffer"). The cure is also the same.
Please spell out what the "cure" is here, so we don't have to do and
look up another commit somewhere else :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] vt: fix unicode buffer corruption when deleting characters
2024-02-29 21:51 ` Greg Kroah-Hartman
@ 2024-02-29 22:10 ` Nicolas Pitre
2024-03-02 20:45 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2024-02-29 22:10 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial
On Thu, 29 Feb 2024, Greg Kroah-Hartman wrote:
> On Thu, Feb 29, 2024 at 04:05:51PM -0500, Nicolas Pitre wrote:
> > This is the same issue that was fixed for the VGA text buffer in
> > commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars
> > in the buffer"). The cure is also the same.
>
> Please spell out what the "cure" is here, so we don't have to do and
> look up another commit somewhere else :)
This is an obvious single-line fix. Or, are people only reviewing commit
logs now? ;-)
Revised commit log coming.
Nicolas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] vt: fix unicode buffer corruption when deleting characters
2024-02-29 22:10 ` Nicolas Pitre
@ 2024-03-02 20:45 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-03-02 20:45 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Jiri Slaby, linux-serial
On Thu, Feb 29, 2024 at 05:10:56PM -0500, Nicolas Pitre wrote:
> On Thu, 29 Feb 2024, Greg Kroah-Hartman wrote:
>
> > On Thu, Feb 29, 2024 at 04:05:51PM -0500, Nicolas Pitre wrote:
> > > This is the same issue that was fixed for the VGA text buffer in
> > > commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars
> > > in the buffer"). The cure is also the same.
> >
> > Please spell out what the "cure" is here, so we don't have to do and
> > look up another commit somewhere else :)
>
> This is an obvious single-line fix. Or, are people only reviewing commit
> logs now? ;-)
We always review them :)
> Revised commit log coming.
Thanks for the update.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-02 20:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 21:05 [PATCH] vt: fix unicode buffer corruption when deleting characters Nicolas Pitre
2024-02-29 21:51 ` Greg Kroah-Hartman
2024-02-29 22:10 ` Nicolas Pitre
2024-03-02 20:45 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox