1. 25 11月, 2008 1 次提交
  2. 14 10月, 2008 11 次提交
  3. 16 8月, 2008 1 次提交
  4. 23 7月, 2008 1 次提交
  5. 21 7月, 2008 4 次提交
  6. 07 6月, 2008 1 次提交
  7. 30 4月, 2008 5 次提交
  8. 28 4月, 2008 2 次提交
  9. 08 2月, 2008 1 次提交
  10. 07 2月, 2008 1 次提交
  11. 29 1月, 2008 1 次提交
  12. 09 1月, 2008 1 次提交
  13. 07 11月, 2007 1 次提交
    • A
      [TTY]: Fix network driver interactions with TCGET/SET calls. · 0fc00e24
      Alan Cox 提交于
      Dave Miller noted various cases where line disciplines for things like
      ppp go poking around in termios themselves in ways that broke with the
      new termios code. Rather than have them all learning about termios
      internals provide proper methods for this
      
      - tty_mode_ioctl()
      
      	This handles all the terminal mode handling for speed/carrier
      etc and none of the methods are ldisc dependant so they can be called
      by any user
      
      - tty_perform_flush()
      
      	This extracts the flush functionality and enables pppd the ppp
      layer to share it cleanly.
      
      The existing n_tty_ioctl code is refactored in this patch to provide
      the new functions and to call them itself appropriately. This patch
      has no (intended) behaviour changes and simply prepares for the other
      fixes.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fc00e24
  14. 17 10月, 2007 2 次提交
    • A
      tty: expose new methods needed for drivers to get termios right · 5f519d72
      Alan Cox 提交于
      This adds three new functions (or in one case to be more exact makes it
      always available)
      
      tty_termios_copy_hw
      
      Copies all the hardware settings from one termios structure to the other.
      This is intended for drivers that support little or no hardware setting
      
      tty_termios_encode_baud_rate
      
      Allows you to set the input and output baud rate in a termios structure.  A
      driver is supposed to set the resulting baud rate from a request so most
      will want to use this function to set the resulting input and output rates
      to match the hardware values.  Internally it knows about keeping Bxxx
      encoding when possible to maximise compatibility.
      
      tty_encode_baud_rate
      
      As above but for the tty's own current termios structure
      
      I suspect this will initially need some tweaking as it gets enabled by
      driver patches over the next few mm cycles so consider this lot -mm only
      for the moment so it can stabilize and end up neat before it goes to base.
      
      I've tried not to break any obscure architectures - if you get a speed you
      can't represent the code will print warnings on non updated termios systems
      but not break.
      
      Once this is merged and seems sane I've got a growing pile of driver
      updates to use it - notably for USB serial drivers.
      
      [akpm@linux-foundation.org: cleanups]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5f519d72
    • A
      tty.h: remove dead define · 328dfd0f
      Alan Cox 提交于
      No longer used. TTY_FLIPBUF_SIZE will also go soon but needs a couple of
      other cleanups first
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      328dfd0f
  15. 13 10月, 2007 1 次提交
  16. 12 8月, 2007 1 次提交
    • A
      fix serial buffer memory leak · 42fd552e
      Alan Cox 提交于
      Patch c5c34d48 (tty: flush flip buffer on
      ldisc input queue flush) introduces a race condition which can lead to memory
      leaks.
      
      The problem can be triggered when tcflush() is called when data are being
      pushed to the line discipline driver by flush_to_ldisc().
      
      flush_to_ldisc() releases tty->buf.lock when calling the line discipline
      receive_buf function. At that poing tty_buffer_flush() kicks in and sets both
      tty->buf.head and tty->buf.tail to NULL. When flush_to_ldisc() finishes, it
      restores tty->buf.head but doesn't touch tty->buf.tail. This corrups the
      buffer queue, and the next call to tty_buffer_request_room() will allocate a
      new buffer and overwrite tty->buf.head. The previous buffer is then lost
      forever without being released.
      
      (Thanks to Laurent for the above text, for finding, disgnosing and reporting
      the bug)
      
      - Use tty->flags bits for the flush status.
      
      - Wait for the flag to clear again before returning
      
      - Fix the doc error noted
      
      - Fix flush of empty queue leaving stale flushpending
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Acked-by: NPaul Fulghum <paulkf@microgate.com>
      Cc: Laurent Pinchart <laurentp@cse-semaphore.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      42fd552e
  17. 17 7月, 2007 2 次提交
    • M
      Audit: add TTY input auditing · 522ed776
      Miloslav Trmac 提交于
      Add TTY input auditing, used to audit system administrator's actions.  This is
      required by various security standards such as DCID 6/3 and PCI to provide
      non-repudiation of administrator's actions and to allow a review of past
      actions if the administrator seems to overstep their duties or if the system
      becomes misconfigured for unknown reasons.  These requirements do not make it
      necessary to audit TTY output as well.
      
      Compared to an user-space keylogger, this approach records TTY input using the
      audit subsystem, correlated with other audit events, and it is completely
      transparent to the user-space application (e.g.  the console ioctls still
      work).
      
      TTY input auditing works on a higher level than auditing all system calls
      within the session, which would produce an overwhelming amount of mostly
      useless audit events.
      
      Add an "audit_tty" attribute, inherited across fork ().  Data read from TTYs
      by process with the attribute is sent to the audit subsystem by the kernel.
      The audit netlink interface is extended to allow modifying the audit_tty
      attribute, and to allow sending explanatory audit events from user-space (for
      example, a shell might send an event containing the final command, after the
      interactive command-line editing and history expansion is performed, which
      might be difficult to decipher from the TTY input alone).
      
      Because the "audit_tty" attribute is inherited across fork (), it would be set
      e.g.  for sshd restarted within an audited session.  To prevent this, the
      audit_tty attribute is cleared when a process with no open TTY file
      descriptors (e.g.  after daemon startup) opens a TTY.
      
      See https://www.redhat.com/archives/linux-audit/2007-June/msg00000.html for a
      more detailed rationale document for an older version of this patch.
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NMiloslav Trmac <mitr@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Casey Schaufler <casey@schaufler-ca.com>
      Cc: Steve Grubb <sgrubb@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      522ed776
    • A
      Prevent an O_NDELAY writer from blocking when a tty write is blocked by the tty atomic writer mutex · 9c1729db
      Alan Cox 提交于
      Without this a tty write could block if a previous blocking tty write was
      in progress on the same tty and blocked by a line discipline or hardware
      event.  Originally found and reported by Dave Johnson.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Acked-by: NDave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c1729db
  18. 09 5月, 2007 1 次提交
    • E
      tty: introduce no_tty and use it in selinux · 98a27ba4
      Eric W. Biederman 提交于
      While researching the tty layer pid leaks I found a weird case in selinux when
      we drop a controlling tty because of inadequate permissions we don't do the
      normal hangup processing.  Which is a problem if it happens the session leader
      has exec'd something that can no longer access the tty.
      
      We already have code in the kernel to handle this case in the form of the
      TIOCNOTTY ioctl.  So this patch factors out a helper function that is the
      essence of that ioctl and calls it from the selinux code.
      
      This removes the inconsistency in handling dropping of a controlling tty and
      who knows it might even make some part of user space happy because it received
      a SIGHUP it was expecting.
      
      In addition since this removes the last user of proc_set_tty outside of
      tty_io.c proc_set_tty is made static and removed from tty.h
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: James Morris <jmorris@namei.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      98a27ba4
  19. 13 2月, 2007 2 次提交