2008-07-29 15:45:43

by Marco Berizzi

[permalink] [raw]
Subject: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

Hi Folks,

reverting commit a29ccf6f823a84d89e1c7aaaf221cf7282022024
fix a problem with the text console on slackware 12.1

With 2.6.27-rc1/slackware 12.1, applications like
mc or 'make menuconfig' are broken on text console
(they are fine running inside an xterm).

Just for record: 2.6.26 is fine

a29ccf6f823a84d89e1c7aaaf221cf7282022024 is first bad commit
commit a29ccf6f823a84d89e1c7aaaf221cf7282022024
Author: David Woodhouse <[email protected]>
Date: Tue Jun 3 14:59:40 2008 +0100

Make console charset translation optional

By turning off the new CONSOLE_TRANSLATIONS option and dropping the
associated code and tables from the kernel, we can save about 7KiB.

Taken from linux-tiny project by Tim Bird and mangled further by
dwmw2.

Signed-off-by: Tim Bird <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>

:040000 040000 4f86ab06f5af3f70d3b78c80ef60c38896c9bc1d
019444ec49f3251609c6e0b6046f2fb447f065e2 M drivers
:040000 040000 e7149976d981052a6787c6e8207b6205ade0f1f1
591a26addee0ba619d7d878967664dfba86b4f65 M include


2008-07-29 17:15:27

by Alistair John Strachan

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On Tuesday 29 July 2008 16:42:54 Marco Berizzi wrote:
> Hi Folks,
>
> reverting commit a29ccf6f823a84d89e1c7aaaf221cf7282022024
> fix a problem with the text console on slackware 12.1
>
> With 2.6.27-rc1/slackware 12.1, applications like
> mc or 'make menuconfig' are broken on text console
> (they are fine running inside an xterm).
>
> Just for record: 2.6.26 is fine

You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

(Added some relevant people to CC.)

--
Cheers,
Alistair.

2008-07-29 18:57:19

by Marco Berizzi

[permalink] [raw]
Subject: RE: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1


[email protected] wrote:

> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?

yes console_translation is set to yes. It cannot be changed if embedded is not
set.
_________________________________________________________________
Connect to the next generation of MSN Messenger?
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline-

2008-07-30 00:01:20

by Tim Bird

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

Marco Berizzi wrote:
> [email protected] wrote:
>
>> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
>
> yes console_translation is set to yes. It cannot be changed if embedded is not
> set.

If console_translation is set to yes, the behavior should be unchanged from
2.6.26. Can you please send me your .config?

Also, can you please describe what breakage you are seeing?

Thanks,
-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================

2008-07-30 00:31:18

by Grant Coady

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On Tue, 29 Jul 2008 17:03:47 -0700, Tim Bird <[email protected]> wrote:

>Marco Berizzi wrote:
>> [email protected] wrote:
>>
>>> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
>>
>> yes console_translation is set to yes. It cannot be changed if embedded is not
>> set.
>
>If console_translation is set to yes, the behavior should be unchanged from
>2.6.26. Can you please send me your .config?
>
>Also, can you please describe what breakage you are seeing?

I have the same issue, the line drawing characters are displayed as an odd
looking C with a tail. Slackware-12.1 and Slamd64-12.1.

.configs:
http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz

CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

Grant.

2008-07-30 01:17:22

by Grant Coady

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On Tue, 29 Jul 2008 17:03:47 -0700, Tim Bird <[email protected]> wrote:

>Marco Berizzi wrote:
>> [email protected] wrote:
>>
>>> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
>>
>> yes console_translation is set to yes. It cannot be changed if embedded is not
>> set.
>
>If console_translation is set to yes, the behavior should be unchanged from
>2.6.26. Can you please send me your .config?
>
>Also, can you please describe what breakage you are seeing?

.config
http://bugsplatter.mine.nu/test/boxen/vmware/config-2.6.27-rc1a.gz
picture:
http://bugsplatter.mine.nu/test/boxen/vmware/linux-2.6.27-rc1-console.jpg

Slackware-12.1 VM on WinXP vmware server 1.0.6.

Grant.

2008-07-30 06:38:29

by Marco Berizzi

[permalink] [raw]

2008-07-30 14:07:57

by Adrian Bunk

[permalink] [raw]
Subject: [RFT: 2.6 patch] fix text console corruptions

On Tue, Jul 29, 2008 at 05:03:47PM -0700, Tim Bird wrote:
> Marco Berizzi wrote:
> > [email protected] wrote:
> >
> >> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
> >
> > yes console_translation is set to yes. It cannot be changed if embedded is not
> > set.
>
> If console_translation is set to yes, the behavior should be unchanged from
> 2.6.26.
>...

Your commit contains a change that breaks due to | having a higher
precedence than ?: in C.

Untested patch below, can anyone who ran into this bug confirm that
it fixes it?

> Thanks,
> -- Tim

cu
Adrian


<-- snip -->


This patch fixes text console corruptions caused by
commit a29ccf6f823a84d89e1c7aaaf221cf7282022024
(Make console charset translation optional).

Reported-by: Marco Berizzi <[email protected]>
Signed-off-by: Adrian Bunk <[email protected]>

---
cab22ec7afdc4c08a10ef9730b0ae2848754532c
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 14c0e91..8c8119f 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);

#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
- (vc)->vc_toggle_meta ? 0x80 : 0])
+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
#else
#define con_set_trans_old(arg) (0)
#define con_get_trans_old(arg) (-EINVAL)

2008-07-30 15:25:25

by David Woodhouse

[permalink] [raw]
Subject: Re: [RFT: 2.6 patch] fix text console corruptions

On Wed, 2008-07-30 at 17:06 +0300, Adrian Bunk wrote:
> On Tue, Jul 29, 2008 at 05:03:47PM -0700, Tim Bird wrote:
> > Marco Berizzi wrote:
> > > [email protected] wrote:
> > >
> > >> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
> > >
> > > yes console_translation is set to yes. It cannot be changed if embedded is not
> > > set.
> >
> > If console_translation is set to yes, the behavior should be unchanged from
> > 2.6.26.
> >...
>
> Your commit contains a change that breaks due to | having a higher
> precedence than ?: in C.

Oh, I think that's probably my fault then; sorry.

--
dwmw2

2008-07-30 20:09:24

by Tim Bird

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

Grant Coady wrote:
> I have the same issue, the line drawing characters are displayed as an odd
> looking C with a tail. Slackware-12.1 and Slamd64-12.1.
>
> .configs:
> http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
> http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz
>
> CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

This looks like an operator precedence bug introduced by
the patch.

Normally I would test this myself before sending it out, but
I can't test 2.6.27-rc1 right now on my hardware due to another
bug in the 2.6.27-rc1 tree.

Can you please try the following patch and let me know if that
fixes the problem?

Thanks,
-- Tim

diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 14c0e91..8c8119f 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);

#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
- (vc)->vc_toggle_meta ? 0x80 : 0])
+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
#else
#define con_set_trans_old(arg) (0)
#define con_get_trans_old(arg) (-EINVAL)


2008-07-30 21:52:36

by Rene Herman

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On 30-07-08 02:30, Grant Coady wrote:
> On Tue, 29 Jul 2008 17:03:47 -0700, Tim Bird <[email protected]> wrote:
>
>> Marco Berizzi wrote:
>>> [email protected] wrote:
>>>
>>>> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
>>> yes console_translation is set to yes. It cannot be changed if embedded is not
>>> set.
>> If console_translation is set to yes, the behavior should be unchanged from
>> 2.6.26. Can you please send me your .config?
>>
>> Also, can you please describe what breakage you are seeing?
>
> I have the same issue, the line drawing characters are displayed as an odd
> looking C with a tail. Slackware-12.1 and Slamd64-12.1.
>
> .configs:
> http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
> http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz
>
> CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on

Sorry, didn't read the thread so just hoping to say something useful:

slackware 12.1 installes by default with "vt.default_utf8=0" as a kernel
param which may be involved here. I saw that picture that someone posted
and to me that was nothing new -- my console has always looked that way
if I set my locale to a UTF8 locale but do not change the console font.

"LANG=C menuconfig" works for me when I can't, won't or just don't start
X with it's terminals with UTF8 fonts...

Please just ignore if not a useful reply.

Rene.

2008-07-30 23:40:52

by Grant Coady

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On Wed, 30 Jul 2008 23:54:52 +0200, Rene Herman <[email protected]> wrote:

>On 30-07-08 02:30, Grant Coady wrote:
>> On Tue, 29 Jul 2008 17:03:47 -0700, Tim Bird <[email protected]> wrote:
>>
>>> Marco Berizzi wrote:
>>>> [email protected] wrote:
>>>>
>>>>> You don't actually say whether you had CONFIG_CONSOLE_TRANSLATIONS=y or not?
>>>> yes console_translation is set to yes. It cannot be changed if embedded is not
>>>> set.
>>> If console_translation is set to yes, the behavior should be unchanged from
>>> 2.6.26. Can you please send me your .config?
>>>
>>> Also, can you please describe what breakage you are seeing?
>>
>> I have the same issue, the line drawing characters are displayed as an odd
>> looking C with a tail. Slackware-12.1 and Slamd64-12.1.
>>
>> .configs:
>> http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
>> http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz
>>
>> CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on
>
>Sorry, didn't read the thread so just hoping to say something useful:
>
>slackware 12.1 installes by default with "vt.default_utf8=0" as a kernel
>param which may be involved here. I saw that picture that someone posted
>and to me that was nothing new -- my console has always looked that way
>if I set my locale to a UTF8 locale but do not change the console font.

I tried booting with that var set or commented out, the problem stayed.
>
>"LANG=C menuconfig" works for me when I can't, won't or just don't start
>X with it's terminals with UTF8 fonts...

I don't normally use console as I run linux boxes headless most of the
time via PuTTY terminals, and they're fine.

Grant.

2008-07-30 23:48:15

by Grant Coady

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

On Wed, 30 Jul 2008 13:11:50 -0700, Tim Bird <[email protected]> wrote:

>Grant Coady wrote:
>> I have the same issue, the line drawing characters are displayed as an odd
>> looking C with a tail. Slackware-12.1 and Slamd64-12.1.
>>
>> .configs:
>> http://bugsplatter.mine.nu/test/boxen/pooh/config-2.6.27-rc1a.gz
>> http://bugsplatter.mine.nu/test/boxen/pooh64/config-2.6.27-rc1a.gz
>>
>> CONFIG_CONSOLE_TRANSLATIONS=y ?? yes it's on
>
>This looks like an operator precedence bug introduced by
>the patch.
>
>Normally I would test this myself before sending it out, but
>I can't test 2.6.27-rc1 right now on my hardware due to another
>bug in the 2.6.27-rc1 tree.
>
>Can you please try the following patch and let me know if that
>fixes the problem?

Hi Tim,
Yep, this patch fixes the issue. Tested on slackware-12.1 with the
default lilo option '#append=" vt.default_utf8=0"' commented out.

Grant.

>
>Thanks,
> -- Tim
>
>diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
>index 14c0e91..8c8119f 100644
>--- a/include/linux/vt_kern.h
>+++ b/include/linux/vt_kern.h
>@@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
> int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
>
> #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
>- (vc)->vc_toggle_meta ? 0x80 : 0])
>+ ((vc)->vc_toggle_meta ? 0x80 : 0)])
> #else
> #define con_set_trans_old(arg) (0)
> #define con_get_trans_old(arg) (-EINVAL)
>
>

2008-07-31 11:03:45

by Marco Berizzi

[permalink] [raw]
Subject: Re: commit a29ccf6f823a84d89e1c7aaaf221cf7282022024 break console on slackware 12.1

Tim Bird wrote:

> diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
> index 14c0e91..8c8119f 100644
> --- a/include/linux/vt_kern.h
> +++ b/include/linux/vt_kern.h
> @@ -74,7 +74,7 @@ void con_protect_unimap(struct vc_data *vc, int
rdonly);
> int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
>
> #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
> - (vc)->vc_toggle_meta ? 0x80 : 0])
> + ((vc)->vc_toggle_meta ? 0x80 : 0)])
> #else
> #define con_set_trans_old(arg) (0)
> #define con_get_trans_old(arg) (-EINVAL)

indeed this patch fix the problem.
Thanks a lot.