1. 15 10月, 2008 1 次提交
  2. 14 10月, 2008 4 次提交
  3. 16 8月, 2008 1 次提交
  4. 05 8月, 2008 1 次提交
    • A
      vt: Deadlock workaround · d5cae364
      Alan Cox 提交于
      2.6.26 corrected the mutex locking on tty resizing to fix the case where
      you could get the tty/vt sizing out of sync. That turns out to have a
      deadlock.
      
      The actual fix is really major and I've got it lined up as part of the ops
      changes for 2.6.28 so for 2.6.26/2.6.27 it is safer to reintroduce this
      ages old minor bug.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d5cae364
  5. 25 7月, 2008 2 次提交
  6. 22 7月, 2008 1 次提交
  7. 07 6月, 2008 2 次提交
  8. 04 6月, 2008 1 次提交
  9. 09 5月, 2008 1 次提交
  10. 30 4月, 2008 4 次提交
  11. 29 4月, 2008 1 次提交
    • J
      vt: fix background color on line feed · c9e587ab
      Jan Engelhardt 提交于
      A command that causes a line feed while a background color is active,
      such as
      
      	perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
      and
      	perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'
      
      causes the line that was started as a result of the line feed to be completely
      filled with the currently active background color instead of the default
      color.
      
      When scrolling, part of the current screen is memcpy'd/memmove'd to the new
      region, and the new line(s) that will appear as a result are cleared using
      memset.  However, the lines are cleared with vc->vc_video_erase_char, causing
      them to be colored with the currently active background color.  This is
      different from X11 terminal emulators which always paint the new lines with
      the default background color (e.g.  `xterm -bg black`).
      
      The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
      vc->vc_scrl_erase_char is introduced with contains the erase character used
      for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.
      Signed-off-by: NJan Engelhardt <jengelh@computergmbh.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c9e587ab
  12. 28 4月, 2008 1 次提交
  13. 05 3月, 2008 1 次提交
  14. 07 2月, 2008 1 次提交
  15. 20 10月, 2007 1 次提交
  16. 19 10月, 2007 1 次提交
  17. 17 10月, 2007 2 次提交
    • B
      add CONFIG_VT_UNICODE · 2e8ecb9d
      Bill Nottingham 提交于
      As of now, the kernel defaults to non-unicode and XLATE for the keyboard.
      We've been changing this in Fedora, but that requires patching the defaults
      in the kernel.
      
      The attached introduces CONFIG_VT_UNICODE, which sets the console in
      unicode mode by default on boot, including both the virtual terminal and
      the keyboard driver.
      Signed-off-by: NBill Nottingham <notting@redhat.com>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Dmitry Torokhov <dtor@mail.ru>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2e8ecb9d
    • A
      vt/vgacon: Check if screen resize request comes from userspace · e400b6ec
      Antonino A. Daplas 提交于
      Various console drivers are able to resize the screen via the con_resize()
      hook.  This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
      VT_RESIZEX ioctl's.  One particular utility, SVGATextMode, expects that
      con_resize() of the VGA console will always return success even if the
      resulting screen is not compatible with the hardware.  However, this
      particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
      7513, can cause undefined behavior if the user starts with a console size
      larger than 80x25.
      
      To work around this problem, add an extra parameter to con_resize().  This
      parameter is ignored by drivers except for vgacon.  If this parameter is
      non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
      and vgacon will always return success.  If this parameter is zero, vgacon will
      return -EINVAL if the requested size is not compatible with the hardware.  The
      latter is the more correct behavior.
      
      With this change, SVGATextMode should still work correctly while in-kernel and
      stty resize calls can expect correct behavior from vgacon.
      Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e400b6ec
  18. 18 7月, 2007 5 次提交
  19. 24 6月, 2007 1 次提交
    • E
      console UTF-8 fixes (fix) · 1ed8a2b3
      Egmont Koblinger 提交于
      Recently my console UTF-8 patch went mainline.  Here is an additional patch
      that fixes two nasty issues and improves a third one, namely:
      
      1. My patch changed the behavior if a glyph is not found in the Unicode
         mapping table. Previously for Unicode values less than 256 or 512 the
         kernel tried to display the glyph from that position of the glyph table,
         which could lead to a different accented letter being displayed. I
         removed this fallback possibility and changed it to display the
         replacement symbol.
      
         As Behdad pointed out, some fonts (e.g. sun12x22 from the kbd package)
         lack Unicode mapping information, hence all you get is lots of question
         marks. Though theoretically it's actually a user-space bug (the font
         should be fixed), Behdad and I both believe that it'd be good to work
         around in the kernel by re-introducing the fallback solution for ASCII
         characters only. This sounds a quite reasonable decision, since all fonts
         ship the ASCII characters in the first 128 positions. This way users
         won't be surprised by lots of question marks just because s/he issued a
         not-so-perfectly parameterized setfont command. As this fallback is only
         re-introduced for code points below 128, you still won't see an accented
         letter replaced by another, but at least you'll always get the English
         letters right.
      
      2. My patch introduced "question mark with inverted color attributes" as a
         last resort fallback glyph. Though it perfectly works on VGA console, on
         framebuffer you may end up with question marks that are highlighed but
         shouldn't be, and normal characters that are accidentally highlighed.
         This is caused by missing FLUSHes when changing the color attribute.
      
      3. I've updated the table of double-width character based on Markus's
         updated version. Only ten new code poings (one interval) is added.
      Signed-off-by: NEgmont Koblinger <egmont@uhulinux.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1ed8a2b3
  20. 09 5月, 2007 5 次提交
    • M
      use mutex instead of semaphore in virtual console driver · c831c338
      Matthias Kaehlcke 提交于
      The virtual console driver uses a semaphore as mutex.  Use the mutex API
      instead of the (binary) semaphore.
      Signed-off-by: NMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c831c338
    • A
      vt: expose system-wide UTF-8 default setting via sysfs · 042f10ec
      Antonino A. Daplas 提交于
      Create a variable, default_utf8, that defines the system-wide default UTF-8
      setting.  This variable can be altered via sysfs. If the variable is properly
      set, this should mimimize breakage of UTF-8 encoded consoles when doing a
      reset or echo -e '\033c' and of newly opened/allocated consoles.
      
      This is based from patches by Jan Engelhardt and Paul LeoNerd Evans.
      Signed-off-by: NAntonino Daplas <adaplas@gmail.com>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      042f10ec
    • J
      vt: add color support to the "underline" and "italic" attributes · fa6ce9ab
      Jan Engelhardt 提交于
      Add color support to the "underline" and "italic" attributes as in
      OpenBSD/NetBSD-style (vt220) and xterm.
      Signed-off-by: NJan Engelhardt <jengelh@gmx.de>
      Acked-by: N"Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fa6ce9ab
    • J
      vt: allow for the palette to be exposed and changed via sysfs · 1c2bbe6a
      Jan Engelhardt 提交于
      Allow for the palette to be exposed and changed via sysfs.  A call to
      /usr/bin/reset will slurp the new definitions in for the current console.
      
      Already posted at http://lkml.org/lkml/2006/1/15/149Signed-off-by: NJan Engelhardt <jengelh@gmx.de>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1c2bbe6a
    • E
      console UTF-8 fixes · 2f1a2ccb
      Egmont Koblinger 提交于
      The UTF-8 part of the vt driver suffers from the following issues which are
      addressed in my patch:
      
      1) If there's no glyph found for a particular valid UTF-8 character, we try
         to display U+FFFD. However if this one is not found either, here's what
         the current kernel does:
      
         - First, if the Unicode value is less than the number of glyphs, use the
           glyph directly from that position of the glyph table. While it may be a
           good idea in the 8-bit world, it has absolutely no sense with Unicode
           in mind. For example, if a Latin-2 font is loaded and an application
           prints U+00FB ("u with circumflex", not present in Latin-2) then as a
           fallback solution the glyph from the 0xFB position of the Latin-2
           fontset (which is an "u with double accent" - a different character) is
           displayed.
      
         - Second, if this fallback fails too, a simple ASCII question mark is
           printed, which is visually undistinguishable from a real question mark.
      
         I changed the code to skip the first step (except if in non-UTF-8 mode),
         and changed the second step to print the question mark with inverse color
         attributes, so it is visually clear that it's not a real question mark,
         and resembles more to the common glyph of U+FFFD.
      
      2) The UTF-8 decoder is buggy in many ways:
      
         - Lone continuation bytes (section 3.1 of Markus Kuhn's UTF-8 stress
           test) are not caught, they are displayed as some "random" (taken
           directly form the font table, see above) glyphs instead the replacement
           character.
      
         - Incomplete sequences (sections 3.2 and 3.3 of the stress test) emit no
           replacement character, but rather cause the subsequent valid character
           to be displayed more times(!).
      
         - The decoder is not safe: overlong sequences are not caught currently,
           they are displayed as if these were valid representations. This may
           even have security impacts.
      
         - The decoder does not handle D800..DFFF and FFFE..FFFF specially, it
           just emits these code points and lets it be looked up in the glyph
           table. Since these are invalid code points, I replace them by U+FFFD
           and hence give no chance for them to be looked up in the glyph table.
           (Assuming no font ships glyphs for these code points, this change is
           not visible to the users since the glyph shown will be the same.)
      
         With my fixes to the decoder it now behaves exactly as Markus Kuhn's
         stress test recommends.
      
      3) It has no concept of double-width (CJK) characters. It's way beyond the
         scope of my patch to try to display them, but at least I think it's
         important for the cursor to jump two positions when printing such
         characters, since this is what applications (such as text editors)
         expect. Currently the cursor only jumps one position, and hence
         applications suffer from displaying and refreshing problems, and editing
         some English letters that are preceded by some CJK characters in the same
         line is a nightmare. With my patch an additional space is inserted after
         the CJK character has been printed (which usually means a replacement
         symbol of course). (If U+FFFD isn't availble and hence an inverse
         question mark is displayed in the first cell, I keep the inverted state
         for the space in the 2nd column so it's quite easy to see that they are
         tied together.)
      
      4) There is a small built-in table of zero-width spaces that are not to be
         printed but silently skipped. U+200A is included there, but it's not a
         zero-width character, so I remove it from there.
      Signed-off-by: NEgmont Koblinger <egmont@uhulinux.hu>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f1a2ccb
  21. 17 3月, 2007 2 次提交
    • B
      [PATCH] Initialise SAK member for each virtual console to prevent oops · c2c88f10
      Bernhard Walle 提交于
      Initialise the SAK member of the vc_cons variable on all virtual terminals,
      not only the first one.  This prevents an oops when trying Sysrq-C on e.g.
      the second virtual terminal:
      
        kernel BUG at kernel/workqueue.c:212!
        invalid opcode: 0000 [1] SMP
        CPU 0
        Modules linked in: i915 drm deflate zlib_deflate twofish twofish_common serpent blowfish des ce
        Pid: 0, comm: swapper Not tainted 2.6.21-rc3-default #15
        RIP: 0010:[<ffffffff8028c955>]  [<ffffffff8028c955>] queue_work+0x32/0x51
        RSP: 0018:ffffffff805fada8  EFLAGS: 00010013
        RAX: ffffffff80683f38 RBX: ffffffff804ae700 RCX: 0000000000000000
        RDX: 0000000000000000 RSI: ffffffff80683f30 RDI: ffff81000134a840
        RBP: 0000000000000001 R08: 0000000000000005 R09: 0000000000000002
        R10: ffffffff805990e0 R11: ffff810037f4c0f0 R12: 000000000000006b
        R13: ffff81007aa23000 R14: 0000000000000001 R15: 0000000000000096
        FS:  0000000000000000(0000) GS:ffffffff804d8000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
        CR2: 00002b72026e9000 CR3: 0000000079175000 CR4: 00000000000006e0
        Process swapper (pid: 0, threadinfo ffffffff8059e000, task ffffffff80490840)
        Stack:  0000000000000096 ffffffff803635db ffffffff805fadf8 0000000000000001
         ffff8100013c2e40 0000000000000025 ffff81007c931c00 ffff81007aa23000
         0000000000000001 ffffffff8035e3ee 0000000000000092 ffff810037cc8000
        Call Trace:
         <IRQ>  [<ffffffff803635db>] __handle_sysrq+0x98/0x129
         [<ffffffff8035e3ee>] kbd_event+0x32e/0x56a
         [<ffffffff8037d502>] input_event+0x422/0x44a
         [<ffffffff80381d71>] atkbd_interrupt+0x449/0x503
         [<ffffffff8037a42d>] serio_interrupt+0x37/0x6f
         [<ffffffff8037affb>] i8042_interrupt+0x1f4/0x20a
         [<ffffffff8026bd20>] smp_send_timer_broadcast_ipi+0x2d/0x4e
         [<ffffffff8020eee5>] handle_IRQ_event+0x25/0x53
         [<ffffffff802a924c>] handle_edge_irq+0xe4/0x128
         [<ffffffff802562ac>] call_softirq+0x1c/0x28
         [<ffffffff802632eb>] do_IRQ+0x6c/0xd3
         [<ffffffff8024f4e7>] mwait_idle+0x0/0x45
         [<ffffffff80255631>] ret_from_intr+0x0/0xa
         <EOI>  [<ffffffff80248a4d>] datagram_poll+0x0/0xc8
         [<ffffffff8024f529>] mwait_idle+0x42/0x45
         [<ffffffff80242c05>] cpu_idle+0x8b/0xae
         [<ffffffff805a8779>] start_kernel+0x2b9/0x2c5
         [<ffffffff805a815e>] _sinittext+0x15e/0x162
      
        Code: 0f 0b eb fe 48 8b 07 48 63 d2 48 f7 d0 48 8b 3c d0 e8 13 ff
        RIP  [<ffffffff8028c955>] queue_work+0x32/0x51
         RSP <ffffffff805fada8>
        Kernel panic - not syncing: Aiee, killing interrupt handler!
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Acked-by: NEric Biederman <ebiederm@xmission.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2c88f10
    • A
      [PATCH] swsusp: fix suspend when console is in VT_AUTO+KD_GRAPHICS mode · b257bc05
      Andrew Johnson 提交于
      When the console is in VT_AUTO+KD_GRAPHICS mode, switching to the
      SUSPEND_CONSOLE fails, resulting in vt_waitactive() waiting indefinitely or
      until the task is interrupted.  This patch tests if a console switch can
      occur in set_console() and returns early if a console switch is not
      possible.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NAndrew Johnson <ajohnson@intrinsyc.com>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b257bc05
  22. 14 2月, 2007 1 次提交
    • E
      [PATCH] Fix SAK_work workqueue initialization. · 7f1f86a0
      Eric W. Biederman 提交于
      Somewhere in the rewrite of the work queues my cleanup of SAK handling
      got broken.  Maybe I didn't retest it properly or possibly the API
      was changing so fast I missed something.  Regardless currently
      triggering a SAK now generates an ugly BUG_ON and kills the kernel.
      
      Thanks to Alexey Dobriyan <adobriyan@openvz.org> for spotting this.
      
      This modifies the use of SAK_work to initialize it when the data
      structure it resides in is initialized, and to simply call
      schedule_work when we need to generate a SAK.  I update both
      data structures that have a SAK_work member for consistency.
      
      All of the old PREPARE_WORK calls that are now gone.
      
      If we call schedule_work again before it has processed it
      has generated the first SAK it will simply ignore the duplicate
      schedule_work request.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7f1f86a0