1. 07 Nov, 2009 3 commits
    • Arnd Bergmann's avatar
      appletalk: handle SIOCATALKDIFADDR compat ioctl · 20660221
      Arnd Bergmann authored
      
      We must not have a compat ioctl handler for SIOCATALKDIFADDR
      in common code, because the same number is used in other protocols
      with different data structures.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20660221
    • Arnd Bergmann's avatar
      net, compat_ioctl: handle socket ioctl abuses in tty drivers · 9646e7ce
      Arnd Bergmann authored
      
      Slip and a few other drivers use the same ioctl numbers on
      tty devices that are normally meant for sockets. This causes
      problems with our compat_ioctl handling that tries to convert
      the data structures in a different format.
      
      Fortunately, these five drivers all use 32 bit compatible
      data structures in the ioctl numbers, so we can just add
      a trivial compat_ioctl conversion function to each of them.
      
      SIOCSIFENCAP and SIOCGIFENCAP do not need to live in
      fs/compat_ioctl.c after this any more, and they are not
      used on any sockets.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9646e7ce
    • Arnd Bergmann's avatar
      net/tun: handle compat_ioctl directly · 50857e2a
      Arnd Bergmann authored
      
      The tun driver is the only code in the kernel that operates
      on a character device with struct ifreq. Change the driver
      to handle the conversion itself so we can contain the
      remaining ifreq handling in the socket layer.
      
      This also fixes a bug in the handling of invalid ioctl
      numbers on an unbound tun device. The driver treats this
      as a TUNSETIFF in native mode, but there is no way for
      the generic compat_ioctl() function to emulate this
      behaviour. Possibly the driver was only doing this
      accidentally anyway, but if any code relies on this
      misfeature, it now also works in compat mode.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      50857e2a
  2. 07 Aug, 2009 1 commit
  3. 12 Jul, 2009 1 commit
  4. 24 Jun, 2009 1 commit
  5. 15 Jun, 2009 1 commit
  6. 12 Jun, 2009 1 commit
  7. 29 May, 2009 4 commits
  8. 20 Apr, 2009 1 commit
  9. 30 Mar, 2009 1 commit
  10. 27 Feb, 2009 1 commit
  11. 18 Feb, 2009 1 commit
  12. 16 Feb, 2009 1 commit
  13. 06 Feb, 2009 1 commit
    • Herbert Xu's avatar
      tun: Limit amount of queued packets per device · 33dccbb0
      Herbert Xu authored
      
      Unlike a normal socket path, the tuntap device send path does
      not have any accounting.  This means that the user-space sender
      may be able to pin down arbitrary amounts of kernel memory by
      continuing to send data to an end-point that is congested.
      
      Even when this isn't an issue because of limited queueing at
      most end points, this can also be a problem because its only
      response to congestion is packet loss.  That is, when those
      local queues at the end-point fills up, the tuntap device will
      start wasting system time because it will continue to send
      data there which simply gets dropped straight away.
      
      Of course one could argue that everybody should do congestion
      control end-to-end, unfortunately there are people in this world
      still hooked on UDP, and they don't appear to be going away
      anywhere fast.  In fact, we've always helped them by performing
      accounting in our UDP code, the sole purpose of which is to
      provide congestion feedback other than through packet loss.
      
      This patch attempts to apply the same bandaid to the tuntap device.
      It creates a pseudo-socket object which is used to account our
      packets just as a normal socket does for UDP.  Of course things
      are a little complex because we're actually reinjecting traffic
      back into the stack rather than out of the stack.
      
      The stack complexities however should have been resolved by preceding
      patches.  So this one can simply start using skb_set_owner_w.
      
      For now the accounting is essentially disabled by default for
      backwards compatibility.  In particular, we set the cap to INT_MAX.
      This is so that existing applications don't get confused by the
      sudden arrival EAGAIN errors.
      
      In future we may wish (or be forced to) do this by default.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33dccbb0
  14. 05 Feb, 2009 1 commit
  15. 29 Jan, 2009 1 commit
  16. 25 Jul, 2008 1 commit
  17. 24 Jul, 2008 1 commit
  18. 16 Jul, 2008 1 commit
    • Randy Dunlap's avatar
      Fix compile issues in fs/compat_ioctl.c when CONFIG_BLOCK is disabled · 3c3622dc
      Randy Dunlap authored
      
      Fix fs/compat_ioctl.c to handle CONFIG_BLOCK=n, CONFIG_SCSI=n to avoid
      build errors:
      
      In file included from include/scsi/scsi.h:12,
                       from fs/compat_ioctl.c:71:
      include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
      include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
      In file included from include/scsi/scsi.h:12,
                       from fs/compat_ioctl.c:71:
      include/scsi/scsi_cmnd.h: In function 'scsi_bidi_cmnd':
      include/scsi/scsi_cmnd.h:182: error: implicit declaration of function 'blk_bidi_rq'
      include/scsi/scsi_cmnd.h:183: error: dereferencing pointer to incomplete type
      include/scsi/scsi_cmnd.h: In function 'scsi_in':
      include/scsi/scsi_cmnd.h:189: error: dereferencing pointer to incomplete type
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3c3622dc
  19. 14 Jul, 2008 1 commit
    • Marcel Holtmann's avatar
      [Bluetooth] Export details about authentication requirements · 40be492f
      Marcel Holtmann authored
      
      With the Simple Pairing support, the authentication requirements are
      an explicit setting during the bonding process. Track and enforce the
      requirements and allow higher layers like L2CAP and RFCOMM to increase
      them if needed.
      
      This patch introduces a new IOCTL that allows to query the current
      authentication requirements. It is also possible to detect Simple
      Pairing support in the kernel this way.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      40be492f
  20. 16 Jun, 2008 2 commits
  21. 30 Apr, 2008 2 commits
    • Alan Cox's avatar
      tty: The big operations rework · f34d7a5b
      Alan Cox authored
      
      - Operations are now a shared const function block as with most other Linux
        objects
      
      - Introduce wrappers for some optional functions to get consistent behaviour
      
      - Wrap put_char which used to be patched by the tty layer
      
      - Document which functions are needed/optional
      
      - Make put_char report success/fail
      
      - Cache the driver->ops pointer in the tty as tty->ops
      
      - Remove various surplus lock calls we no longer need
      
      - Remove proc_write method as noted by Alexey Dobriyan
      
      - Introduce some missing sanity checks where certain driver/ldisc
        combinations would oops as they didn't check needed methods were present
      
      [akpm@linux-foundation.org: fix fs/compat_ioctl.c build]
      [akpm@linux-foundation.org: fix isicom]
      [akpm@linux-foundation.org: fix arch/ia64/hp/sim/simserial.c build]
      [akpm@linux-foundation.org: fix kgdb]
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f34d7a5b
    • Alan Cox's avatar
      tty: BKL pushdown · 04f378b1
      Alan Cox authored
      
      - Push the BKL down into the line disciplines
      - Switch the tty layer to unlocked_ioctl
      - Introduce a new ctrl_lock spin lock for the control bits
      - Eliminate much of the lock_kernel use in n_tty
      - Prepare to (but don't yet) call the drivers with the lock dropped
        on the paths that historically held the lock
      
      BKL now primarily protects open/close/ldisc change in the tty layer
      
      [jirislaby@gmail.com: a couple of fixes]
      Signed-off-by: default avatarAlan Cox <alan@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      04f378b1
  22. 15 Feb, 2008 1 commit
  23. 07 Feb, 2008 2 commits
  24. 28 Jan, 2008 1 commit
  25. 06 Jan, 2008 1 commit
  26. 29 Nov, 2007 1 commit
  27. 31 Oct, 2007 1 commit
  28. 18 Oct, 2007 1 commit
  29. 17 Oct, 2007 1 commit
  30. 10 Oct, 2007 3 commits