1. 18 7月, 2012 1 次提交
  2. 17 7月, 2012 1 次提交
  3. 14 6月, 2012 2 次提交
  4. 10 4月, 2012 2 次提交
    • M
      tty/vt: handle bad user buffer in {G,P}IO_CMAP ioctl · 871bdea6
      Michael Gehring 提交于
      set_get_cmap() ignored the result of {get,put}_user(), causing ioctl(vt,
      {G,P}IO_CMAP, 0xdeadbeef) to silently fail.
      
      Another side effect of this: calling the PIO_CMAP ioctl with an invalid
      buffer would zero the default colormap and the palette for all vts (all
      colors set to black).
      
      Leave the default colormap intact and return -EFAULT when
      reading/writing to the userspace buffer fails.
      Signed-off-by: NMichael Gehring <mg@ebfe.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      871bdea6
    • K
      printk(): add KERN_CONT where needed in hpet and vt code · 5da527aa
      Kay Sievers 提交于
      A prototype for kmsg records instead of a byte-stream buffer revealed
      a couple of missing printk(KERN_CONT ...) uses. Subsequent calls produce
      one record per printk() call, while all should have ended up in a single
      record.
      
      Instead of:
        ACPI: (supports S0 S5)
        ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
        hpet0: at MMIO 0xfed00000, IRQs 2 , 8 , 0
      
      It prints:
        ACPI: (supports S0
         S5
        )
        ACPI: PCI Interrupt Link [LNKA] (IRQs
         5
         *10
         11
        )
        hpet0: at MMIO 0xfed00000, IRQs
         2
        , 8
        , 0
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NKay Sievers <kay@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5da527aa
  5. 29 3月, 2012 1 次提交
  6. 09 3月, 2012 5 次提交
  7. 24 8月, 2011 1 次提交
  8. 20 4月, 2011 3 次提交
  9. 31 3月, 2011 1 次提交
  10. 02 3月, 2011 1 次提交
  11. 18 2月, 2011 2 次提交
    • J
      tty,vcs removing con_buf/conf_buf_mtx · fcdba07e
      Jiri Olsa 提交于
      seems there's no longer need for using con_buf/conf_buf_mtx
      as vcs_read/vcs_write buffer for user's data.
      
      The do_con_write function, that was the other user of this,
      is currently using its own kmalloc-ed buffer.
      
      Not sure when this got changed, as I was able to find this code
      in 2.6.9, but it's already gone as far as current git history
      goes - 2.6.12-rc2.
      
      AFAICS there's a behaviour change with the current change.
      The lseek is not completely mutually exclusive with the
      vcs_read/vcs_write - the file->f_pos might get updated
      via lseek callback during the vcs_read/vcs_write processing.
      
      I tried to find out if the prefered behaviour is to keep
      this in sync within read/write/lseek functions, but I did
      not find any pattern on different places.
      
      I guess if user end up calling write/lseek from different
      threads she should know what she's doing. If needed we
      could use dedicated fd mutex/buffer.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fcdba07e
    • M
      TTY: use appropriate printk priority level · 1ffdda95
      Mandeep Singh Baines 提交于
      printk()s without a priority level default to KERN_WARNING. To reduce
      noise at KERN_WARNING, this patch set the priority level appriopriately
      for unleveled printks()s. This should be useful to folks that look at
      dmesg warnings closely.
      Signed-off-by: NMandeep Singh Baines <msb@chromium.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1ffdda95
  12. 26 1月, 2011 1 次提交
    • T
      console: rename acquire/release_console_sem() to console_lock/unlock() · ac751efa
      Torben Hohn 提交于
      The -rt patches change the console_semaphore to console_mutex.  As a
      result, a quite large chunk of the patches changes all
      acquire/release_console_sem() to acquire/release_console_mutex()
      
      This commit makes things use more neutral function names which dont make
      implications about the underlying lock.
      
      The only real change is the return value of console_trylock which is
      inverted from try_acquire_console_sem()
      
      This patch also paves the way to switching console_sem from a semaphore to
      a mutex.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
      Signed-off-by: NTorben Hohn <torbenh@gmx.de>
      Cc: Thomas Gleixner <tglx@tglx.de>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac751efa
  13. 23 1月, 2011 2 次提交
  14. 17 12月, 2010 1 次提交
  15. 05 11月, 2010 1 次提交
  16. 23 10月, 2010 1 次提交
  17. 04 9月, 2010 1 次提交
    • F
      vt: Fix console corruption on driver hand-over. · 9fc2b2d0
      Francisco Jerez 提交于
      After 02f0777a "vc_origin" is no
      longer reset to the screen buffer before calling the con_init() hook
      of the new console driver.
      
      If the old driver wasn't using a fixed scanout buffer (e.g. the case
      of vgacon) "vc_origin" may be a pointer to a VRAM location, and its
      contents aren't guaranteed to be preserved after calling con_deinit()
      on the old driver and con_init() on the new driver, i.e. the
      subsequent console resize may fill the framebuffer with garbage.
      
      It can be reproduced in the transition from vgacon to the nouveau
      framebuffer driver: in that case the legacy VGA aperture "vc_origin"
      points to becomes unreadable after fbcon_init().
      
      This patch reverts the mentioned commit. To avoid the problem it
      intended to fix, stop using "vc_scr_end" in vc_do_resize() to
      calculate how many rows we have to copy (actually the code looks
      simpler this way without the help of "vc_scr_end").
      Signed-off-by: NFrancisco Jerez <currojerez@riseup.net>
      Cc: qiaochong <qiaochong@loongson.cn>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9fc2b2d0
  18. 17 8月, 2010 2 次提交
    • J
      vt,console,kdb: preserve console_blanked while in kdb · beed5336
      Jason Wessel 提交于
      Commit b45cfba4 (vt,console,kdb:
      implement atomic console enter/leave functions) introduced the ability
      to atomically change the console mode with kernel mode setting but did
      not preserve the state of the console_blanked variable.
      
      The console_blanked variable must be restored when executing the
      con_debug_leave() or further kernel mode set changes (such as using
      chvt X) will fail to correctly set the state of console.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      beed5336
    • J
      vt: fix regression warnings from KMS merge · fed891c8
      Jason Wessel 提交于
      Fix the following new sparse warnings in vt.c introduced by the commit
      b45cfba4 (vt,console,kdb: implement
      atomic console enter/leave functions):
      
      drivers/char/vt.c:197:5: warning: symbol 'saved_fg_console' was not declared. Should it be static?
      drivers/char/vt.c:198:5: warning: symbol 'saved_last_console' was not declared. Should it be static?
      drivers/char/vt.c:199:5: warning: symbol 'saved_want_console' was not declared. Should it be static?
      drivers/char/vt.c:200:5: warning: symbol 'saved_vc_mode' was not declared. Should it be static?
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      CC: Andrew Morton <akpm@linux-foundation.org>
      fed891c8
  19. 11 8月, 2010 5 次提交
  20. 10 8月, 2010 2 次提交
    • Q
      drivers/char/vt.c:vc_do_resize(): local var `end' should be unsigned long · 9e0ba741
      qiaochong 提交于
      According include/linux/console_struct.h,vc_scr_end is unsigned long.
      
      struct vc_data {
          unsigned short  vc_num;         /* Console number */
          unsigned int    vc_cols;        /* [#] Console size */
          unsigned int    vc_rows;
          unsigned int    vc_size_row;        /* Bytes per row */
          unsigned int    vc_scan_lines;      /* # of scan lines */
          unsigned long   vc_origin;      /* [!] Start of real screen */
          unsigned long   vc_scr_end;     /* [!] End of real screen */
          unsigned long   vc_visible_origin;  /* [!] Top of visible window */
          unsigned int    vc_top, vc_bottom;  /* Scrolling region */
          const struct consw *vc_sw;
          unsigned short  *vc_screenbuf;
      ...
      }
      Signed-off-by: Nqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.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>
      9e0ba741
    • Q
      drivers/char/vt.c: fix vc->vc_origin on take_over_console() · 02f0777a
      qiaochong 提交于
      kernel will die on some platform when switch from vga mode to framebuffer
      mode.  The reason of this bug is that bind_con_driver reset vc->vc_origin
      to (unsigned long)vc->vc_screenbuf.
      
      On vgacon vc->vc_origin is not releated to vc->vc_screenbuf,if set
      vc->vc_origin to vc->vc_screenbuf,kernel will die on vc_do_resize.
      
      static int vc_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
              struct vc_data *vc, unsigned int cols, unsigned int lines)
      {
          unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
          unsigned int old_cols, old_rows, old_row_size, old_screen_size;
          unsigned int new_cols, new_rows, new_row_size, new_screen_size;
          unsigned int end, user;
      ...
              end = (old_rows > new_rows) ? old_origin +
                  (old_row_size * new_rows) :
                  vc->vc_scr_end;
      
      ...
      /*
      here for a test from vgacon to framebuffer:
      old_origin=0x810814a0,end=0xb00b8fa0,vc->vc_origin=0x810814a0
      the code bellow will copy memory from 0x810814a0 to 0xb00b8fa0,
      this will cover kernel code,kernel died here.
      */
      
          while (old_origin < end) {
      
              scr_memcpyw((unsigned short *) new_origin,
                      (unsigned short *) old_origin, rlth);
              if (rrem)
                  scr_memsetw((void *)(new_origin + rlth),
                          vc->vc_video_erase_char, rrem);
              old_origin += old_row_size;
              new_origin += new_row_size;
          }
      
      ...
      }
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: Nqiaochong <qiaochong@loongson.cn>
      Cc: Greg KH <greg@kroah.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>
      02f0777a
  21. 05 8月, 2010 2 次提交
  22. 07 6月, 2010 1 次提交
  23. 05 6月, 2010 1 次提交