20 Jan, 2021

1 commit

  • [ Upstream commit 51049bd903a81307f751babe15a1df8d197884e8 ]

    Without this, we run into a link error

    arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o: in function `dsp_audio_generate_law_tables':
    (.text+0x30c): undefined reference to `byte_rev_table'
    arm-linux-gnueabi-ld: drivers/isdn/mISDN/dsp_audio.o:(.text+0x5e4): more undefined references to `byte_rev_table' follow

    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller
    Signed-off-by: Sasha Levin

    Arnd Bergmann
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

25 Jul, 2020

2 commits

  • drivers/isdn/mISDN/socket.c: In function ‘data_sock_setsockopt’:
    ./include/linux/kern_levels.h:5:18: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘sockptr_t’ [-Wformat=]
    5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
    | ^~~~~~
    ./include/linux/kern_levels.h:15:20: note: in expansion of macro ‘KERN_SOH’
    15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */
    | ^~~~~~~~
    drivers/isdn/mISDN/socket.c:410:10: note: in expansion of macro ‘KERN_DEBUG’
    410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock,
    | ^~~~~~~~~~
    drivers/isdn/mISDN/socket.c:410:38: note: format string is defined here
    410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock,
    | ~^
    | |
    | void *

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Rework the remaining setsockopt code to pass a sockptr_t instead of a
    plain user pointer. This removes the last remaining set_fs(KERNEL_DS)
    outside of architecture specific code.

    Signed-off-by: Christoph Hellwig
    Acked-by: Stefan Schmidt [ieee802154]
    Acked-by: Matthieu Baerts
    Signed-off-by: David S. Miller

    Christoph Hellwig
     

21 Jul, 2020

1 commit

  • The wrappers in include/linux/pci-dma-compat.h should go away.

    The patch has been generated with the coccinelle script below and has been
    hand modified to replace GFP_ with a correct flag.
    It has been compile tested.

    When memory is allocated in 'setup_hw()' (hfcpci.c) GFP_KERNEL can be used
    because it is called from the probe function and no lock is taken.
    The call chain is:
    hfc_probe()
    --> setup_card()
    --> setup_hw()

    When memory is allocated in 'inittiger()' (netjet.c) GFP_ATOMIC must be
    used because a spin_lock is taken by the caller (i.e. 'nj_init_card()')
    This is also consistent with the other allocations done in the function.

    @@
    @@
    - PCI_DMA_BIDIRECTIONAL
    + DMA_BIDIRECTIONAL

    @@
    @@
    - PCI_DMA_TODEVICE
    + DMA_TO_DEVICE

    @@
    @@
    - PCI_DMA_FROMDEVICE
    + DMA_FROM_DEVICE

    @@
    @@
    - PCI_DMA_NONE
    + DMA_NONE

    @@
    expression e1, e2, e3;
    @@
    - pci_alloc_consistent(e1, e2, e3)
    + dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

    @@
    expression e1, e2, e3;
    @@
    - pci_zalloc_consistent(e1, e2, e3)
    + dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_free_consistent(e1, e2, e3, e4)
    + dma_free_coherent(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_map_single(e1, e2, e3, e4)
    + dma_map_single(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_single(e1, e2, e3, e4)
    + dma_unmap_single(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4, e5;
    @@
    - pci_map_page(e1, e2, e3, e4, e5)
    + dma_map_page(&e1->dev, e2, e3, e4, e5)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_page(e1, e2, e3, e4)
    + dma_unmap_page(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_map_sg(e1, e2, e3, e4)
    + dma_map_sg(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_unmap_sg(e1, e2, e3, e4)
    + dma_unmap_sg(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
    + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_single_for_device(e1, e2, e3, e4)
    + dma_sync_single_for_device(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
    + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2, e3, e4;
    @@
    - pci_dma_sync_sg_for_device(e1, e2, e3, e4)
    + dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

    @@
    expression e1, e2;
    @@
    - pci_dma_mapping_error(e1, e2)
    + dma_mapping_error(&e1->dev, e2)

    @@
    expression e1, e2;
    @@
    - pci_set_dma_mask(e1, e2)
    + dma_set_mask(&e1->dev, e2)

    @@
    expression e1, e2;
    @@
    - pci_set_consistent_dma_mask(e1, e2)
    + dma_set_coherent_mask(&e1->dev, e2)

    Signed-off-by: Christophe JAILLET
    Signed-off-by: David S. Miller

    Christophe JAILLET
     

20 Jul, 2020

1 commit


14 Jul, 2020

1 commit

  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Signed-off-by: David S. Miller

    Alexander A. Klimov
     

19 Jun, 2020

1 commit


14 Jun, 2020

1 commit

  • Since commit 84af7a6194e4 ("checkpatch: kconfig: prefer 'help' over
    '---help---'"), the number of '---help---' has been gradually
    decreasing, but there are still more than 2400 instances.

    This commit finishes the conversion. While I touched the lines,
    I also fixed the indentation.

    There are a variety of indentation styles found.

    a) 4 spaces + '---help---'
    b) 7 spaces + '---help---'
    c) 8 spaces + '---help---'
    d) 1 space + 1 tab + '---help---'
    e) 1 tab + '---help---' (correct indentation)
    f) 1 tab + 1 space + '---help---'
    g) 1 tab + 2 spaces + '---help---'

    In order to convert all of them to 1 tab + 'help', I ran the
    following commend:

    $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

17 Apr, 2020

1 commit

  • Fix the following sparse warning:

    drivers/isdn/hardware/mISDN/mISDNisar.c:746:12: warning: symbol 'dmril'
    was not declared. Should it be static?
    drivers/isdn/hardware/mISDN/mISDNisar.c:749:12: warning: symbol 'dmrim'
    was not declared. Should it be static?

    Reported-by: Hulk Robot
    Signed-off-by: Jason Yan
    Signed-off-by: David S. Miller

    Jason Yan
     

04 Feb, 2020

1 commit

  • The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in
    seq_file.h.

    Conversion rule is:

    llseek => proc_lseek
    unlocked_ioctl => proc_ioctl

    xxx => proc_xxx

    delete ".owner = THIS_MODULE" line

    [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c]
    [sfr@canb.auug.org.au: fix kernel/sched/psi.c]
    Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au
    Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

17 Dec, 2019

1 commit

  • As everybody pointed out by now, my patch to clean up CAPI introduced
    a link time warning, as the two parts of the capi driver are now in
    one module and the exit function may need to be called in the error
    path of the init function:

    >> WARNING: drivers/isdn/capi/kernelcapi.o(.text+0xea4): Section mismatch in reference from the function kcapi_exit() to the function .exit.text:kcapi_proc_exit()
    The function kcapi_exit() references a function in an exit section.
    Often the function kcapi_proc_exit() has valid usage outside the exit section
    and the fix is to remove the __exit annotation of kcapi_proc_exit.

    Remove the incorrect __exit annotation.

    Reported-by: kbuild test robot
    Reported-by: kernelci.org bot
    Reported-by: Olof's autobuilder
    Reported-by: Stephen Rothwell
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20191216194909.1983639-1-arnd@arndb.de
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

11 Dec, 2019

1 commit

  • The staging isdn drivers are gone, and CONFIG_BT_CMTP is now
    the only user. This means a lot of the code in the subsystem
    has no remaining callers and can be removed.

    Change the capi user space front-end to be part of kernelcapi,
    and the combined module to only be compiled if BT_CMTP is
    also enabled, then remove the interfaces that have no remaining
    callers.

    As the notifier list and the capi_drivers list have no callers
    outside of kcapi.c, the implementation gets much simpler.

    Some definitions from the include/linux/*.h headers are only
    needed internally and are moved to kcapi.h.

    Acked-by: David Miller
    Signed-off-by: Arnd Bergmann
    Link: https://lore.kernel.org/r/20191210210455.3475361-2-arnd@arndb.de
    Signed-off-by: Greg Kroah-Hartman

    Arnd Bergmann
     

02 Dec, 2019

1 commit

  • Pull removal of most of fs/compat_ioctl.c from Arnd Bergmann:
    "As part of the cleanup of some remaining y2038 issues, I came to
    fs/compat_ioctl.c, which still has a couple of commands that need
    support for time64_t.

    In completely unrelated work, I spent time on cleaning up parts of
    this file in the past, moving things out into drivers instead.

    After Al Viro reviewed an earlier version of this series and did a lot
    more of that cleanup, I decided to try to completely eliminate the
    rest of it and move it all into drivers.

    This series incorporates some of Al's work and many patches of my own,
    but in the end stops short of actually removing the last part, which
    is the scsi ioctl handlers. I have patches for those as well, but they
    need more testing or possibly a rewrite"

    * tag 'compat-ioctl-5.5' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: (42 commits)
    scsi: sd: enable compat ioctls for sed-opal
    pktcdvd: add compat_ioctl handler
    compat_ioctl: move SG_GET_REQUEST_TABLE handling
    compat_ioctl: ppp: move simple commands into ppp_generic.c
    compat_ioctl: handle PPPIOCGIDLE for 64-bit time_t
    compat_ioctl: move PPPIOCSCOMPRESS to ppp_generic
    compat_ioctl: unify copy-in of ppp filters
    tty: handle compat PPP ioctls
    compat_ioctl: move SIOCOUTQ out of compat_ioctl.c
    compat_ioctl: handle SIOCOUTQNSD
    af_unix: add compat_ioctl support
    compat_ioctl: reimplement SG_IO handling
    compat_ioctl: move WDIOC handling into wdt drivers
    fs: compat_ioctl: move FITRIM emulation into file systems
    gfs2: add compat_ioctl support
    compat_ioctl: remove unused convert_in_user macro
    compat_ioctl: remove last RAID handling code
    compat_ioctl: remove /dev/raw ioctl translation
    compat_ioctl: remove PCI ioctl translation
    compat_ioctl: remove joystick ioctl translation
    ...

    Linus Torvalds
     

26 Nov, 2019

2 commits

  • Pull networking updates from David Miller:
    "Another merge window, another pull full of stuff:

    1) Support alternative names for network devices, from Jiri Pirko.

    2) Introduce per-netns netdev notifiers, also from Jiri Pirko.

    3) Support MSG_PEEK in vsock/virtio, from Matias Ezequiel Vara
    Larsen.

    4) Allow compiling out the TLS TOE code, from Jakub Kicinski.

    5) Add several new tracepoints to the kTLS code, also from Jakub.

    6) Support set channels ethtool callback in ena driver, from Sameeh
    Jubran.

    7) New SCTP events SCTP_ADDR_ADDED, SCTP_ADDR_REMOVED,
    SCTP_ADDR_MADE_PRIM, and SCTP_SEND_FAILED_EVENT. From Xin Long.

    8) Add XDP support to mvneta driver, from Lorenzo Bianconi.

    9) Lots of netfilter hw offload fixes, cleanups and enhancements,
    from Pablo Neira Ayuso.

    10) PTP support for aquantia chips, from Egor Pomozov.

    11) Add UDP segmentation offload support to igb, ixgbe, and i40e. From
    Josh Hunt.

    12) Add smart nagle to tipc, from Jon Maloy.

    13) Support L2 field rewrite by TC offloads in bnxt_en, from Venkat
    Duvvuru.

    14) Add a flow mask cache to OVS, from Tonghao Zhang.

    15) Add XDP support to ice driver, from Maciej Fijalkowski.

    16) Add AF_XDP support to ice driver, from Krzysztof Kazimierczak.

    17) Support UDP GSO offload in atlantic driver, from Igor Russkikh.

    18) Support it in stmmac driver too, from Jose Abreu.

    19) Support TIPC encryption and auth, from Tuong Lien.

    20) Introduce BPF trampolines, from Alexei Starovoitov.

    21) Make page_pool API more numa friendly, from Saeed Mahameed.

    22) Introduce route hints to ipv4 and ipv6, from Paolo Abeni.

    23) Add UDP segmentation offload to cxgb4, Rahul Lakkireddy"

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1857 commits)
    libbpf: Fix usage of u32 in userspace code
    mm: Implement no-MMU variant of vmalloc_user_node_flags
    slip: Fix use-after-free Read in slip_open
    net: dsa: sja1105: fix sja1105_parse_rgmii_delays()
    macvlan: schedule bc_work even if error
    enetc: add support Credit Based Shaper(CBS) for hardware offload
    net: phy: add helpers phy_(un)lock_mdio_bus
    mdio_bus: don't use managed reset-controller
    ax88179_178a: add ethtool_op_get_ts_info()
    mlxsw: spectrum_router: Fix use of uninitialized adjacency index
    mlxsw: spectrum_router: After underlay moves, demote conflicting tunnels
    bpf: Simplify __bpf_arch_text_poke poke type handling
    bpf: Introduce BPF_TRACE_x helper for the tracing tests
    bpf: Add bpf_jit_blinding_enabled for !CONFIG_BPF_JIT
    bpf, testing: Add various tail call test cases
    bpf, x86: Emit patchable direct jump as tail call
    bpf: Constant map key tracking for prog array pokes
    bpf: Add poke dependency tracking for prog array maps
    bpf: Add initial poke descriptor table for jit images
    bpf: Move owner type, jited info into array auxiliary data
    ...

    Linus Torvalds
     
  • Pull printk updates from Petr Mladek:

    - Allow to print symbolic error names via new %pe modifier.

    - Use pr_warn() instead of the remaining pr_warning() calls. Fix
    formatting of the related lines.

    - Add VSPRINTF entry to MAINTAINERS.

    * tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits)
    checkpatch: don't warn about new vsprintf pointer extension '%pe'
    MAINTAINERS: Add VSPRINTF
    tools lib api: Renaming pr_warning to pr_warn
    ASoC: samsung: Use pr_warn instead of pr_warning
    lib: cpu_rmap: Use pr_warn instead of pr_warning
    trace: Use pr_warn instead of pr_warning
    dma-debug: Use pr_warn instead of pr_warning
    vgacon: Use pr_warn instead of pr_warning
    fs: afs: Use pr_warn instead of pr_warning
    sh/intc: Use pr_warn instead of pr_warning
    scsi: Use pr_warn instead of pr_warning
    platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
    platform/x86: asus-laptop: Use pr_warn instead of pr_warning
    platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
    oprofile: Use pr_warn instead of pr_warning
    of: Use pr_warn instead of pr_warning
    macintosh: Use pr_warn instead of pr_warning
    idsn: Use pr_warn instead of pr_warning
    ide: Use pr_warn instead of pr_warning
    crypto: n2: Use pr_warn instead of pr_warning
    ...

    Linus Torvalds
     

21 Nov, 2019

1 commit


04 Nov, 2019

1 commit


03 Nov, 2019

1 commit


29 Oct, 2019

2 commits


23 Oct, 2019

1 commit

  • Neither the old isdn4linux interface nor the newer mISDN stack
    ever had working 32-bit compat mode as far as I can tell.

    However, the CAPI stack has some ioctl commands that are
    correctly listed in fs/compat_ioctl.c.

    We can trivially move all of those into the corresponding
    file that implement the native handlers by adding a compat_ioctl
    redirect to that.

    I did notice that treating CAPI_MANUFACTURER_CMD() as compatible
    is broken, so I'm also adding a handler for that, realizing that
    in all likelyhood, nobody is ever going to call it.

    Cc: Karsten Keil
    Cc: netdev@vger.kernel.org
    Cc: isdn4linux@listserv.isdn4linux.de
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

18 Oct, 2019

1 commit

  • As said in commit f2c2cbcc35d4 ("powerpc: Use pr_warn instead of
    pr_warning"), removing pr_warning so all logging messages use a
    consistent _warn style. Let's do it.

    Link: http://lkml.kernel.org/r/20191018031850.48498-14-wangkefeng.wang@huawei.com
    To: linux-kernel@vger.kernel.org
    Cc: Karsten Keil
    Signed-off-by: Kefeng Wang
    Reviewed-by: Sergey Senozhatsky
    Signed-off-by: Petr Mladek

    Kefeng Wang
     

24 Sep, 2019

1 commit


15 Sep, 2019

1 commit


07 Sep, 2019

1 commit

  • syzbot reported:

    BUG: KMSAN: uninit-value in capi_write+0x791/0xa90 drivers/isdn/capi/capi.c:700
    CPU: 0 PID: 10025 Comm: syz-executor379 Not tainted 4.20.0-rc7+ #2
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    Call Trace:
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x173/0x1d0 lib/dump_stack.c:113
    kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613
    __msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313
    capi_write+0x791/0xa90 drivers/isdn/capi/capi.c:700
    do_loop_readv_writev fs/read_write.c:703 [inline]
    do_iter_write+0x83e/0xd80 fs/read_write.c:961
    vfs_writev fs/read_write.c:1004 [inline]
    do_writev+0x397/0x840 fs/read_write.c:1039
    __do_sys_writev fs/read_write.c:1112 [inline]
    __se_sys_writev+0x9b/0xb0 fs/read_write.c:1109
    __x64_sys_writev+0x4a/0x70 fs/read_write.c:1109
    do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
    entry_SYSCALL_64_after_hwframe+0x63/0xe7
    [...]

    The problem is that capi_write() is reading past the end of the message.
    Fix it by checking the message's length in the needed places.

    Reported-and-tested-by: syzbot+0849c524d9c634f5ae66@syzkaller.appspotmail.com
    Signed-off-by: Eric Biggers
    Signed-off-by: David S. Miller

    Eric Biggers
     

23 Aug, 2019

1 commit


31 Jul, 2019

1 commit

  • Since linux 4.9 it is not possible to use buffers on the stack for DMA transfers.

    During usb probe the driver crashes with "transfer buffer is on stack" message.

    This fix k-allocates a buffer to be used on "read_reg_atomic", which is a macro
    that calls "usb_control_msg" under the hood.

    Kernel 4.19 backtrace:

    usb_hcd_submit_urb+0x3e5/0x900
    ? sched_clock+0x9/0x10
    ? log_store+0x203/0x270
    ? get_random_u32+0x6f/0x90
    ? cache_alloc_refill+0x784/0x8a0
    usb_submit_urb+0x3b4/0x550
    usb_start_wait_urb+0x4e/0xd0
    usb_control_msg+0xb8/0x120
    hfcsusb_probe+0x6bc/0xb40 [hfcsusb]
    usb_probe_interface+0xc2/0x260
    really_probe+0x176/0x280
    driver_probe_device+0x49/0x130
    __driver_attach+0xa9/0xb0
    ? driver_probe_device+0x130/0x130
    bus_for_each_dev+0x5a/0x90
    driver_attach+0x14/0x20
    ? driver_probe_device+0x130/0x130
    bus_add_driver+0x157/0x1e0
    driver_register+0x51/0xe0
    usb_register_driver+0x5d/0x120
    ? 0xf81ed000
    hfcsusb_drv_init+0x17/0x1000 [hfcsusb]
    do_one_initcall+0x44/0x190
    ? free_unref_page_commit+0x6a/0xd0
    do_init_module+0x46/0x1c0
    load_module+0x1dc1/0x2400
    sys_init_module+0xed/0x120
    do_fast_syscall_32+0x7a/0x200
    entry_SYSENTER_32+0x6b/0xbe

    Signed-off-by: Juliana Rodrigueiro
    Signed-off-by: David S. Miller

    Juliana Rodrigueiro
     

28 Jul, 2019

1 commit

  • In start_isoc_chain(), usb_alloc_urb() on line 1392 may fail
    and return NULL. At this time, fifo->iso[i].urb is assigned to NULL.

    Then, fifo->iso[i].urb is used at some places, such as:
    LINE 1405: fill_isoc_urb(fifo->iso[i].urb, ...)
    urb->number_of_packets = num_packets;
    urb->transfer_flags = URB_ISO_ASAP;
    urb->actual_length = 0;
    urb->interval = interval;
    LINE 1416: fifo->iso[i].urb->...
    LINE 1419: fifo->iso[i].urb->...

    Thus, possible null-pointer dereferences may occur.

    To fix these bugs, "continue" is added to avoid using fifo->iso[i].urb
    when it is NULL.

    These bugs are found by a static analysis tool STCheck written by us.

    Signed-off-by: Jia-Ju Bai
    Signed-off-by: David S. Miller

    Jia-Ju Bai
     

16 Jul, 2019

1 commit

  • The syzbot test with random endpoint address which made the idx is
    overflow in the table of endpoint configuations.

    this adds the checking for fixing the error report from
    syzbot

    KASAN: stack-out-of-bounds Read in hfcsusb_probe [1]
    The patch tested by syzbot [2]

    Reported-by: syzbot+8750abbc3a46ef47d509@syzkaller.appspotmail.com

    [1]:
    https://syzkaller.appspot.com/bug?id=30a04378dac680c5d521304a00a86156bb913522
    [2]:
    https://groups.google.com/d/msg/syzkaller-bugs/_6HBdge8F3E/OJn7wVNpBAAJ

    Signed-off-by: Phong Tran
    Signed-off-by: David S. Miller

    Phong Tran
     

12 Jul, 2019

1 commit

  • Pull networking updates from David Miller:
    "Some highlights from this development cycle:

    1) Big refactoring of ipv6 route and neigh handling to support
    nexthop objects configurable as units from userspace. From David
    Ahern.

    2) Convert explored_states in BPF verifier into a hash table,
    significantly decreased state held for programs with bpf2bpf
    calls, from Alexei Starovoitov.

    3) Implement bpf_send_signal() helper, from Yonghong Song.

    4) Various classifier enhancements to mvpp2 driver, from Maxime
    Chevallier.

    5) Add aRFS support to hns3 driver, from Jian Shen.

    6) Fix use after free in inet frags by allocating fqdirs dynamically
    and reworking how rhashtable dismantle occurs, from Eric Dumazet.

    7) Add act_ctinfo packet classifier action, from Kevin
    Darbyshire-Bryant.

    8) Add TFO key backup infrastructure, from Jason Baron.

    9) Remove several old and unused ISDN drivers, from Arnd Bergmann.

    10) Add devlink notifications for flash update status to mlxsw driver,
    from Jiri Pirko.

    11) Lots of kTLS offload infrastructure fixes, from Jakub Kicinski.

    12) Add support for mv88e6250 DSA chips, from Rasmus Villemoes.

    13) Various enhancements to ipv6 flow label handling, from Eric
    Dumazet and Willem de Bruijn.

    14) Support TLS offload in nfp driver, from Jakub Kicinski, Dirk van
    der Merwe, and others.

    15) Various improvements to axienet driver including converting it to
    phylink, from Robert Hancock.

    16) Add PTP support to sja1105 DSA driver, from Vladimir Oltean.

    17) Add mqprio qdisc offload support to dpaa2-eth, from Ioana
    Radulescu.

    18) Add devlink health reporting to mlx5, from Moshe Shemesh.

    19) Convert stmmac over to phylink, from Jose Abreu.

    20) Add PTP PHC (Physical Hardware Clock) support to mlxsw, from
    Shalom Toledo.

    21) Add nftables SYNPROXY support, from Fernando Fernandez Mancera.

    22) Convert tcp_fastopen over to use SipHash, from Ard Biesheuvel.

    23) Track spill/fill of constants in BPF verifier, from Alexei
    Starovoitov.

    24) Support bounded loops in BPF, from Alexei Starovoitov.

    25) Various page_pool API fixes and improvements, from Jesper Dangaard
    Brouer.

    26) Just like ipv4, support ref-countless ipv6 route handling. From
    Wei Wang.

    27) Support VLAN offloading in aquantia driver, from Igor Russkikh.

    28) Add AF_XDP zero-copy support to mlx5, from Maxim Mikityanskiy.

    29) Add flower GRE encap/decap support to nfp driver, from Pieter
    Jansen van Vuuren.

    30) Protect against stack overflow when using act_mirred, from John
    Hurley.

    31) Allow devmap map lookups from eBPF, from Toke Høiland-Jørgensen.

    32) Use page_pool API in netsec driver, Ilias Apalodimas.

    33) Add Google gve network driver, from Catherine Sullivan.

    34) More indirect call avoidance, from Paolo Abeni.

    35) Add kTLS TX HW offload support to mlx5, from Tariq Toukan.

    36) Add XDP_REDIRECT support to bnxt_en, from Andy Gospodarek.

    37) Add MPLS manipulation actions to TC, from John Hurley.

    38) Add sending a packet to connection tracking from TC actions, and
    then allow flower classifier matching on conntrack state. From
    Paul Blakey.

    39) Netfilter hw offload support, from Pablo Neira Ayuso"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2080 commits)
    net/mlx5e: Return in default case statement in tx_post_resync_params
    mlx5: Return -EINVAL when WARN_ON_ONCE triggers in mlx5e_tls_resync().
    net: dsa: add support for BRIDGE_MROUTER attribute
    pkt_sched: Include const.h
    net: netsec: remove static declaration for netsec_set_tx_de()
    net: netsec: remove superfluous if statement
    netfilter: nf_tables: add hardware offload support
    net: flow_offload: rename tc_cls_flower_offload to flow_cls_offload
    net: flow_offload: add flow_block_cb_is_busy() and use it
    net: sched: remove tcf block API
    drivers: net: use flow block API
    net: sched: use flow block API
    net: flow_offload: add flow_block_cb_{priv, incref, decref}()
    net: flow_offload: add list handling functions
    net: flow_offload: add flow_block_cb_alloc() and flow_block_cb_free()
    net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_*
    net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND
    net: flow_offload: add flow_block_cb_setup_simple()
    net: hisilicon: Add an tx_desc to adapt HI13X1_GMAC
    net: hisilicon: Add an rx_desc to adapt HI13X1_GMAC
    ...

    Linus Torvalds
     

15 Jun, 2019

1 commit


09 Jun, 2019

1 commit

  • The mISDN driver was added on those commits:

    960366cf8dbb ("Add mISDN DSP")
    1b2b03f8e514 ("Add mISDN core files")
    04578dd330f1 ("Define AF_ISDN and PF_ISDN")
    e4ac9bc1f668 ("Add mISDN driver")

    None of them added a Documentation/isdn/mISDN.cert file.
    Also, whatever were supposed to be written there on that time,
    probably doesn't make any sense nowadays, as I doubt isdn would
    have any massive changes.

    So, let's just get rid of the broken reference, in order to
    shut up a warning produced by ./scripts/documentation-file-ref-check.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

08 Jun, 2019

1 commit


03 Jun, 2019

1 commit

  • Arnd Bergmann says:

    ====================
    isdn: deprecate non-mISDN drivers

    When isdn4linux came up in the context of another patch series, I
    remembered that we had discussed removing it a while ago.

    It turns out that the suggestion from Karsten Keil wa to remove I4L
    in 2018 after the last public ISDN networks are shut down. This has
    happened now (with a very small number of exceptions), so I guess it's
    time to try again.

    We currently have three ISDN stacks in the kernel: the original
    isdn4linux (with the hisax driver), the newer CAPI (with four drivers),
    and finally the mISDN stack (supporting roughly the same hardware as
    hisax).

    As far as I can tell, anyone using ISDN with mainline kernel drivers in
    the past few years uses mISDN, and this is typically used for voice-only
    PBX installations that don't require a public network.

    The older stacks support additional features for data networks, but those
    typically make no sense any more if there is no network to connect to.

    My proposal for this time is to kill off isdn4linux entirely, as it seems
    to have been unusable for quite a while. This code has been abandoned
    for many years and it does cause problems for treewide maintenance as
    it tends to do everything that we try to stop doing.
    Birger Harzenetter mentioned that is is still using i4l in order to
    make use of the 'divert' feature that is not part of mISDN, but has
    otherwise moved on to mISDN for normal operation, like apparently
    everyone else.

    CAPI in turn is not quite as obsolete, but two of the drivers (avm
    and hysdn) don't seem to be used at all, while another one (gigaset)
    will stop being maintained as Paul Bolle is no longer able to
    test it after the network gets shut down in September.
    All three are now moved into drivers/staging to let others speak
    up in case there are remaining users.
    This leaves Bluetooth CMTP as the only remaining user of CAPI, but
    Marcel Holtmann wishes to keep maintaining it.

    For the discussion on version 1, see [2]
    Unfortunately, Karsten Keil as the maintainer has not participated in
    the discussion.

    Arnd

    [1] https://patchwork.kernel.org/patch/8484861/#17900371
    [2] https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

31 May, 2019

5 commits

  • Pull yet more SPDX updates from Greg KH:
    "Here is another set of reviewed patches that adds SPDX tags to
    different kernel files, based on a set of rules that are being used to
    parse the comments to try to determine that the license of the file is
    "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
    these matches are included here, a number of "non-obvious" variants of
    text have been found but those have been postponed for later review
    and analysis.

    There is also a patch in here to add the proper SPDX header to a bunch
    of Kbuild files that we have missed in the past due to new files being
    added and forgetting that Kbuild uses two different file names for
    Makefiles. This issue was reported by the Kbuild maintainer.

    These patches have been out for review on the linux-spdx@vger mailing
    list, and while they were created by automatic tools, they were
    hand-verified by a bunch of different people, all whom names are on
    the patches are reviewers"

    * tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
    treewide: Add SPDX license identifier - Kbuild
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
    treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
    ...

    Linus Torvalds
     
  • I tried to find any indication of whether the capi drivers are still in
    use, and have not found anything from a long time ago.

    With public ISDN networks almost completely shut down over the past 12
    months, there is very little you can actually do with this hardware. The
    main remaining use case would be to connect ISDN voice phones to an
    in-house installation with Asterisk or LCR, but anyone trying this in
    turn seems to be using either the mISDN driver stack, or out-of-tree
    drivers from the hardware vendors.

    I may of course have missed something, so I would suggest moving these
    three drivers (avm, hysdn, gigaset) into drivers/staging/ just in case
    someone still uses them.

    If nobody complains, we can remove them entirely in six months, or
    otherwise move the core code and any drivers that are still needed back
    into drivers/isdn.

    As Paul Bolle notes, he is still testing the gigaset driver as long as
    he can, but the Dutch ISDN network will be shut down in September 2019,
    which puts an end to that.

    Marcel Holtmann still maintains the Bluetooth CMTP profile and wants to
    keep that alive, so the actual CAPI subsystem code remains in place for
    now, after all other drivers are gone, CMTP and CAPI can be merged into
    a single driver directory.

    Cc: Marcel Holtmann
    Cc: Paul Bolle
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The last remnant of the isdn4linux interface is now the isdnhdlc
    support, used by the netjet driver. Move it next to that driver.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • With all isdn4linux hardware drivers gone, this is only a wrapper around
    CAPI to support old user space. However, from looking at the mailing
    list, it seems that the last time anyone asked about it was in 2014,
    when the upgrade from a linux-2.4 installation failed, and mISDN was
    suggested as a replacement.

    The largest public ISDN network (Deutsche Telekom) was supposed to be
    shut down 2018, which must have drastically reduced the number of legacy
    installations.

    When we last discussed removing i4l in 2016, Karsten Keil suggested
    revisiting this in 2018. I guess this is overdue.

    Link: http://listserv.isdn4linux.de/pipermail/isdn4linux/2014-October/006165.html
    Link: https://patchwork.kernel.org/patch/8484861/#17900371
    Link: https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • With the decline of ISDN, this seems to have become almost completely
    obsolete, and even in the past years before that, almost all remaining
    users appear to have used mISDN instead.

    Birger Harzenetter noted that he is still using i4l/hisax to take
    advantage of the 'divert' driver for call diversion, but otherwise uses
    mISDN on the same hardware. This is a rare edge case as far as I
    can tell, but we are still breaking an actively used work flow
    (see https://xkcd.com/1172/).

    We debated moving i4l/hisax to staging as an intermediate step, but as
    he is not likely to change the setup, and that would just delay breaking
    this use case. The alternatives here are to stay on stable kernels
    < 5.2, to create an external driver repository for isdn4linux, or to
    add divert functionality to mISDN.

    Cc: Birger Harzenetter
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann