From: Andrew Morton <akpm@linux-foundation.org>
To: Stefani Seibold <stefani@seibold.net>
Cc: linux-kernel@vger.kernel.org, linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] fbcon: rotate upside down crash
Date: Wed, 29 Jul 2009 13:28:40 -0700 [thread overview]
Message-ID: <20090729132840.2a13a04e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1248768118.2992.12.camel@wall-e>
(let's cc linux-fbdev-devel)
On Tue, 28 Jul 2009 10:01:58 +0200
Stefani Seibold <stefani@seibold.net> wrote:
> Attached is a bug fix for the frame console.
>
> The current frame buffer console upside down functionality will crash
> using a font which has not a width of multiple by 8.
>
> The following 1 liner will fix the rotate_ud() function,
>
> ChangeLog:
> Fix the rotate_ud() function not to crash in case of a font which has not a width of multiple by 8: The
> inner loop of the font pixel copy should not access a bit outside the font memory area. Subtract the shift
> offset from the font width will prevent this.
>
> fbcon_rotate.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Signed-off-by: Stefani Seibold <stefani@seibold.net>
>
> --- linux-2.6.31-rc4.orig/drivers/video/console/fbcon_rotate.h 2009-06-10 05:05:27.000000000 +0200
> +++ linux-2.6.31-rc4/drivers/video/console/fbcon_rotate.h 2009-07-24 20:37:31.000000000 +0200
> @@ -45,7 +45,7 @@
> width = (width + 7) & ~7;
>
> for (i = 0; i < height; i++) {
> - for (j = 0; j < width; j++) {
> + for (j = 0; j < width - shift; j++) {
> if (pattern_test_bit(j, i, width, in))
> pattern_set_bit(width - (1 + j + shift),
> height - (1 + i),
Thanks.
It seems that the bug has been there for a very very long time. I
wonder why - presumably nobody has tried to do an upside-down rotate
before.
So given that this code sees very little use, I guess it's pretty safe
to merge the fix into 2.6.31.
next parent reply other threads:[~2009-07-29 20:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1248768118.2992.12.camel@wall-e>
2009-07-29 20:28 ` Andrew Morton [this message]
[not found] <1248463426.30437.12.camel@wall-e>
2009-07-27 23:33 ` [PATCH] fbcon: rotate upside down crash Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090729132840.2a13a04e.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stefani@seibold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).