1. 28 4月, 2008 1 次提交
  2. 05 3月, 2008 1 次提交
  3. 07 2月, 2008 1 次提交
  4. 20 10月, 2007 1 次提交
  5. 19 10月, 2007 1 次提交
  6. 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
  7. 18 7月, 2007 5 次提交
  8. 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
  9. 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
  10. 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
  11. 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
  12. 13 2月, 2007 2 次提交
  13. 12 2月, 2007 1 次提交
  14. 14 12月, 2006 1 次提交
    • R
      [PATCH] getting rid of all casts of k[cmz]alloc() calls · 5cbded58
      Robert P. J. Day 提交于
      Run this:
      
      	#!/bin/sh
      	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
      	  echo "De-casting $f..."
      	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
      	done
      
      And then go through and reinstate those cases where code is casting pointers
      to non-pointers.
      
      And then drop a few hunks which conflicted with outstanding work.
      
      Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cbded58
  15. 08 12月, 2006 1 次提交
  16. 02 12月, 2006 1 次提交
  17. 22 11月, 2006 1 次提交
    • D
      WorkStruct: Pass the work_struct pointer instead of context data · 65f27f38
      David Howells 提交于
      Pass the work_struct pointer to the work function rather than context data.
      The work function can use container_of() to work out the data.
      
      For the cases where the container of the work_struct may go away the moment the
      pending bit is cleared, it is made possible to defer the release of the
      structure by deferring the clearing of the pending bit.
      
      To make this work, an extra flag is introduced into the management side of the
      work_struct.  This governs auto-release of the structure upon execution.
      
      Ordinarily, the work queue executor would release the work_struct for further
      scheduling or deallocation by clearing the pending bit prior to jumping to the
      work function.  This means that, unless the driver makes some guarantee itself
      that the work_struct won't go away, the work function may not access anything
      else in the work_struct or its container lest they be deallocated..  This is a
      problem if the auxiliary data is taken away (as done by the last patch).
      
      However, if the pending bit is *not* cleared before jumping to the work
      function, then the work function *may* access the work_struct and its container
      with no problems.  But then the work function must itself release the
      work_struct by calling work_release().
      
      In most cases, automatic release is fine, so this is the default.  Special
      initiators exist for the non-auto-release case (ending in _NAR).
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      65f27f38
  18. 03 10月, 2006 2 次提交
  19. 02 10月, 2006 2 次提交
    • J
      [PATCH] const struct tty_operations · b68e31d0
      Jeff Dike 提交于
      As part of an SMP cleanliness pass over UML, I consted a bunch of
      structures in order to not have to document their locking.  One of these
      structures was a struct tty_operations.  In order to const it in UML
      without introducing compiler complaints, the declaration of
      tty_set_operations needs to be changed, and then all of its callers need to
      be fixed.
      
      This patch declares all struct tty_operations in the tree as const.  In all
      cases, they are static and used only as input to tty_set_operations.  As an
      extra check, I ran an i386 allyesconfig build which produced no extra
      warnings.
      
      53 drivers are affected.  I checked the history of a bunch of them, and in
      most cases, there have been only a handful of maintenance changes in the
      last six months.  serial_core.c was the busiest one that I looked at.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Acked-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b68e31d0
    • E
      [PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe). · bde0d2c9
      Eric W. Biederman 提交于
      I took a good hard look at the locking and it appears the locking on vt_pid
      is the console semaphore.  Every modified path is called under the console
      semaphore except reset_vc when it is called from fn_SAK or do_SAK both of
      which appear to be in interrupt context.  In addition I need to be careful
      because in the presence of an oops the console_sem may be arbitrarily
      dropped.
      
      Which leads me to conclude the current locking is inadequate for my needs.
      
      Given the weird cases we could hit because of oops printing instead of
      introducing an extra spin lock to protect the data and keep the pid to
      signal and the signal to send in sync, I have opted to use xchg on just the
      struct pid * pointer instead.
      
      Due to console_sem we will stay in sync between vt_pid and vt_mode except
      for a small window during a SAK, or oops handling.  SAK handling should
      kill any user space process that care, and oops handling we are broken
      anyway.  Besides the worst that can happen is that I try to send the wrong
      signal.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bde0d2c9
  20. 30 9月, 2006 4 次提交
  21. 04 7月, 2006 1 次提交
  22. 01 7月, 2006 1 次提交
  23. 27 6月, 2006 2 次提交