1. 24 11月, 2020 1 次提交
  2. 18 11月, 2020 1 次提交
    • X
      net: wan: Delete the DLCI / SDLA drivers · f7365919
      Xie He 提交于
      The DLCI driver (dlci.c) implements the Frame Relay protocol. However,
      we already have another newer and better implementation of Frame Relay
      provided by the HDLC_FR driver (hdlc_fr.c).
      
      The DLCI driver's implementation of Frame Relay is used by only one
      hardware driver in the kernel - the SDLA driver (sdla.c).
      
      The SDLA driver provides Frame Relay support for the Sangoma S50x devices.
      However, the vendor provides their own driver (along with their own
      multi-WAN-protocol implementations including Frame Relay), called WANPIPE.
      I believe most users of the hardware would use the vendor-provided WANPIPE
      driver instead.
      
      (The WANPIPE driver was even once in the kernel, but was deleted in
      commit 8db60bcf ("[WAN]: Remove broken and unmaintained Sangoma
      drivers.") because the vendor no longer updated the in-kernel WANPIPE
      driver.)
      
      Cc: Mike McLagan <mike.mclagan@linux.org>
      Signed-off-by: NXie He <xie.he.0141@gmail.com>
      Link: https://lore.kernel.org/r/20201114150921.685594-1-xie.he.0141@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f7365919
  3. 03 10月, 2020 1 次提交
    • C
      net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send · 7b62d31d
      Coly Li 提交于
      If a page sent into kernel_sendpage() is a slab page or it doesn't have
      ref_count, this page is improper to send by the zero copy sendpage()
      method. Otherwise such page might be unexpected released in network code
      path and causes impredictable panic due to kernel memory management data
      structure corruption.
      
      This path adds a WARN_ON() on the sending page before sends it into the
      concrete zero-copy sendpage() method, if the page is improper for the
      zero-copy sendpage() method, a warning message can be observed before
      the consequential unpredictable kernel panic.
      
      This patch does not change existing kernel_sendpage() behavior for the
      improper page zero-copy send, it just provides hint warning message for
      following potential panic due the kernel memory heap corruption.
      Signed-off-by: NColy Li <colyli@suse.de>
      Cc: Cong Wang <amwang@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Sridhar Samudrala <sri@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b62d31d
  4. 27 8月, 2020 1 次提交
  5. 25 8月, 2020 1 次提交
  6. 11 8月, 2020 1 次提交
  7. 09 8月, 2020 4 次提交
  8. 29 7月, 2020 1 次提交
  9. 25 7月, 2020 3 次提交
  10. 20 7月, 2020 4 次提交
  11. 14 7月, 2020 1 次提交
  12. 05 7月, 2020 1 次提交
  13. 30 5月, 2020 1 次提交
  14. 28 5月, 2020 1 次提交
  15. 19 5月, 2020 2 次提交
  16. 12 5月, 2020 1 次提交
    • C
      net: cleanly handle kernel vs user buffers for ->msg_control · 1f466e1f
      Christoph Hellwig 提交于
      The msg_control field in struct msghdr can either contain a user
      pointer when used with the recvmsg system call, or a kernel pointer
      when used with sendmsg.  To complicate things further kernel_recvmsg
      can stuff a kernel pointer in and then use set_fs to make the uaccess
      helpers accept it.
      
      Replace it with a union of a kernel pointer msg_control field, and
      a user pointer msg_control_user one, and allow kernel_recvmsg operate
      on a proper kernel pointer using a bitfield to override the normal
      choice of a user pointer for recvmsg.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f466e1f
  17. 20 3月, 2020 1 次提交
  18. 10 3月, 2020 1 次提交
  19. 09 1月, 2020 1 次提交
  20. 13 12月, 2019 1 次提交
  21. 11 12月, 2019 1 次提交
  22. 07 12月, 2019 1 次提交
  23. 03 12月, 2019 2 次提交
  24. 27 11月, 2019 2 次提交
  25. 26 11月, 2019 2 次提交
    • J
      net: add __sys_connect_file() helper · bd3ded31
      Jens Axboe 提交于
      This is identical to __sys_connect(), except it takes a struct file
      instead of an fd, and it also allows passing in extra file->f_flags
      flags. The latter is done to support masking in O_NONBLOCK without
      manipulating the original file flags.
      
      No functional changes in this patch.
      
      Cc: netdev@vger.kernel.org
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      bd3ded31
    • L
      vfs: mark pipes and sockets as stream-like file descriptors · d8e464ec
      Linus Torvalds 提交于
      In commit 3975b097 ("convert stream-like files -> stream_open, even
      if they use noop_llseek") Kirill used a coccinelle script to change
      "nonseekable_open()" to "stream_open()", which changed the trivial cases
      of stream-like file descriptors to the new model with FMODE_STREAM.
      
      However, the two big cases - sockets and pipes - don't actually have
      that trivial pattern at all, and were thus never converted to
      FMODE_STREAM even though it makes lots of sense to do so.
      
      That's particularly true when looking forward to the next change:
      getting rid of FMODE_ATOMIC_POS entirely, and just using FMODE_STREAM to
      decide whether f_pos updates are needed or not.  And if they are, we'll
      always do them atomically.
      
      This came up because KCSAN (correctly) noted that the non-locked f_pos
      updates are data races: they are clearly benign for the case where we
      don't care, but it would be good to just not have that issue exist at
      all.
      
      Note that the reason we used FMODE_ATOMIC_POS originally is that only
      doing it for the minimal required case is "safer" in that it's possible
      that the f_pos locking can cause unnecessary serialization across the
      whole write() call.  And in the worst case, that kind of serialization
      can cause deadlock issues: think writers that need readers to empty the
      state using the same file descriptor.
      
      [ Note that the locking is per-file descriptor - because it protects
        "f_pos", which is obviously per-file descriptor - so it only affects
        cases where you literally use the same file descriptor to both read
        and write.
      
        So a regular pipe that has separate reading and writing file
        descriptors doesn't really have this situation even though it's the
        obvious case of "reader empties what a bit writer concurrently fills"
      
        But we want to make pipes as being stream-line anyway, because we
        don't want the unnecessary overhead of locking, and because a named
        pipe can be (ab-)used by reading and writing to the same file
        descriptor. ]
      
      There are likely a lot of other cases that might want FMODE_STREAM, and
      looking for ".llseek = no_llseek" users and other cases that don't have
      an lseek file operation at all and making them use "stream_open()" might
      be a good idea.  But pipes and sockets are likely to be the two main
      cases.
      
      Cc: Kirill Smelkov <kirr@nexedi.com>
      Cc: Eic Dumazet <edumazet@google.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Marco Elver <elver@google.com>
      Cc: Andrea Parri <parri.andrea@gmail.com>
      Cc: Paul McKenney <paulmck@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d8e464ec
  26. 15 11月, 2019 2 次提交
  27. 30 10月, 2019 1 次提交