1. 01 Mar, 2023 1 commit
    • Eric Dumazet's avatar
      net: avoid skb end_offset change in __skb_unclone_keeptruesize() · 880ce5f2
      Eric Dumazet authored
      Once initial skb->head has been allocated from skb_small_head_cache,
      we need to make sure to use the same strategy whenever skb->head
      has to be re-allocated, as found by syzbot [1]
      
      This means kmalloc_reserve() can not fallback from using
      skb_small_head_cache to generic (power-of-two) kmem caches.
      
      It seems that we probably want to rework things in the future,
      to partially revert following patch, because we no longer use
      ksize() for skb allocated in TX path.
      
      2b88cba5 ("net: preserve skb_end_offset() in skb_unclone_keeptruesize()")
      
      Ideally, TCP stack should never put payload in skb->head,
      this effort has to be completed.
      
      In the mean time, add a sanity check.
      
      [1]
      BUG: KASAN: invalid-free in slab_free mm/slub.c:3787 [inline]
      BUG: KASAN: invalid-free in kmem_cache_free+0xee/0x5c0 mm/slub.c:3809
      Free of addr ffff88806cdee800 by task syz-executor239/5189
      
      CPU: 0 PID: 5189 Comm: syz-executor239 Not tainted 6.2.0-rc8-syzkaller-02400-gd1fabc68 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023
      Call Trace:
      <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
      print_address_description mm/kasan/report.c:306 [inline]
      print_report+0x15e/0x45d mm/kasan/report.c:417
      kasan_report_invalid_free+0x9b/0x1b0 mm/kasan/report.c:482
      ____kasan_slab_free+0x1a5/0x1c0 mm/kasan/common.c:216
      kasan_slab_free include/linux/kasan.h:177 [inline]
      slab_free_hook mm/slub.c:1781 [inline]
      slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807
      slab_free mm/slub.c:3787 [inline]
      kmem_cache_free+0xee/0x5c0 mm/slub.c:3809
      skb_kfree_head net/core/skbuff.c:857 [inline]
      skb_kfree_head net/core/skbuff.c:853 [inline]
      skb_free_head+0x16f/0x1a0 net/core/skbuff.c:872
      skb_release_data+0x57a/0x820 net/core/skbuff.c:901
      skb_release_all net/core/skbuff.c:966 [inline]
      __kfree_skb+0x4f/0x70 net/core/skbuff.c:980
      tcp_wmem_free_skb include/net/tcp.h:302 [inline]
      tcp_rtx_queue_purge net/ipv4/tcp.c:3061 [inline]
      tcp_write_queue_purge+0x617/0xcf0 net/ipv4/tcp.c:3074
      tcp_v4_destroy_sock+0x125/0x810 net/ipv4/tcp_ipv4.c:2302
      inet_csk_destroy_sock+0x19a/0x440 net/ipv4/inet_connection_sock.c:1195
      __tcp_close+0xb96/0xf50 net/ipv4/tcp.c:3021
      tcp_close+0x2d/0xc0 net/ipv4/tcp.c:3033
      inet_release+0x132/0x270 net/ipv4/af_inet.c:426
      __sock_release+0xcd/0x280 net/socket.c:651
      sock_close+0x1c/0x20 net/socket.c:1393
      __fput+0x27c/0xa90 fs/file_table.c:320
      task_work_run+0x16f/0x270 kernel/task_work.c:179
      resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
      exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
      exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:203
      __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
      syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:296
      do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
      entry_SYSCALL_64_after_hwframe+0x63/0xcd
      RIP: 0033:0x7f2511f546c3
      Code: c7 c2 c0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8
      RSP: 002b:00007ffef0103d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
      RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f2511f546c3
      RDX: 0000000000000978 RSI: 00000000200000c0 RDI: 0000000000000003
      RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000003434
      R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffef0103d6c
      R13: 00007ffef0103d80 R14: 00007ffef0103dc0 R15: 0000000000000003
      </TASK>
      
      Allocated by task 5189:
      kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
      kasan_set_track+0x25/0x30 mm/kasan/common.c:52
      ____kasan_kmalloc mm/kasan/common.c:374 [inline]
      ____kasan_kmalloc mm/kasan/common.c:333 [inline]
      __kasan_kmalloc+0xa5/0xb0 mm/kasan/common.c:383
      kasan_kmalloc include/linux/kasan.h:211 [inline]
      __do_kmalloc_node mm/slab_common.c:968 [inline]
      __kmalloc_node_track_caller+0x5b/0xc0 mm/slab_common.c:988
      kmalloc_reserve+0xf1/0x230 net/core/skbuff.c:539
      pskb_expand_head+0x237/0x1160 net/core/skbuff.c:1995
      __skb_unclone_keeptruesize+0x93/0x220 net/core/skbuff.c:2094
      skb_unclone_keeptruesize include/linux/skbuff.h:1910 [inline]
      skb_prepare_for_shift net/core/skbuff.c:3804 [inline]
      skb_shift+0xef8/0x1e20 net/core/skbuff.c:3877
      tcp_skb_shift net/ipv4/tcp_input.c:1538 [inline]
      tcp_shift_skb_data net/ipv4/tcp_input.c:1646 [inline]
      tcp_sacktag_walk+0x93b/0x18a0 net/ipv4/tcp_input.c:1713
      tcp_sacktag_write_queue+0x1599/0x31d0 net/ipv4/tcp_input.c:1974
      tcp_ack+0x2e9f/0x5a10 net/ipv4/tcp_input.c:3847
      tcp_rcv_established+0x667/0x2230 net/ipv4/tcp_input.c:6006
      tcp_v4_do_rcv+0x670/0x9b0 net/ipv4/tcp_ipv4.c:1721
      sk_backlog_rcv include/net/sock.h:1113 [inline]
      __release_sock+0x133/0x3b0 net/core/sock.c:2921
      release_sock+0x58/0x1b0 net/core/sock.c:3488
      tcp_sendmsg+0x3a/0x50 net/ipv4/tcp.c:1485
      inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:825
      sock_sendmsg_nosec net/socket.c:722 [inline]
      sock_sendmsg+0xde/0x190 net/socket.c:745
      sock_write_iter+0x295/0x3d0 net/socket.c:1136
      call_write_iter include/linux/fs.h:2189 [inline]
      new_sync_write fs/read_write.c:491 [inline]
      vfs_write+0x9ed/0xdd0 fs/read_write.c:584
      ksys_write+0x1ec/0x250 fs/read_write.c:637
      do_syscall_x64 arch/x86/entry/common.c:50 [inline]
      do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
      entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      The buggy address belongs to the object at ffff88806cdee800
      which belongs to the cache kmalloc-1k of size 1024
      The buggy address is located 0 bytes inside of
      1024-byte region [ffff88806cdee800, ffff88806cdeec00)
      
      The buggy address belongs to the physical page:
      page:ffffea0001b37a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6cde8
      head:ffffea0001b37a00 order:3 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0
      flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
      raw: 00fff00000010200 ffff888012441dc0 dead000000000122 0000000000000000
      raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
      page dumped because: kasan: bad access detected
      page_owner tracks the page as allocated
      page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1f2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_MEMALLOC|__GFP_HARDWALL), pid 75, tgid 75 (kworker/u4:4), ts 96369578780, free_ts 26734162530
      prep_new_page mm/page_alloc.c:2531 [inline]
      get_page_from_freelist+0x119c/0x2ce0 mm/page_alloc.c:4283
      __alloc_pages+0x1cb/0x5b0 mm/page_alloc.c:5549
      alloc_pages+0x1aa/0x270 mm/mempolicy.c:2287
      alloc_slab_page mm/slub.c:1851 [inline]
      allocate_slab+0x25f/0x350 mm/slub.c:1998
      new_slab mm/slub.c:2051 [inline]
      ___slab_alloc+0xa91/0x1400 mm/slub.c:3193
      __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3292
      __slab_alloc_node mm/slub.c:3345 [inline]
      slab_alloc_node mm/slub.c:3442 [inline]
      __kmem_cache_alloc_node+0x1a4/0x430 mm/slub.c:3491
      __do_kmalloc_node mm/slab_common.c:967 [inline]
      __kmalloc_node_track_caller+0x4b/0xc0 mm/slab_common.c:988
      kmalloc_reserve+0xf1/0x230 net/core/skbuff.c:539
      __alloc_skb+0x129/0x330 net/core/skbuff.c:608
      __netdev_alloc_skb+0x74/0x410 net/core/skbuff.c:672
      __netdev_alloc_skb_ip_align include/linux/skbuff.h:3203 [inline]
      netdev_alloc_skb_ip_align include/linux/skbuff.h:3213 [inline]
      batadv_iv_ogm_aggregate_new+0x106/0x4e0 net/batman-adv/bat_iv_ogm.c:558
      batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
      batadv_iv_ogm_schedule_buff+0xe6b/0x1450 net/batman-adv/bat_iv_ogm.c:849
      batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
      batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
      batadv_iv_send_outstanding_bat_ogm_packet+0x744/0x910 net/batman-adv/bat_iv_ogm.c:1712
      process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289
      worker_thread+0x669/0x1090 kernel/workqueue.c:2436
      page last free stack trace:
      reset_page_owner include/linux/page_owner.h:24 [inline]
      free_pages_prepare mm/page_alloc.c:1446 [inline]
      free_pcp_prepare+0x66a/0xc20 mm/page_alloc.c:1496
      free_unref_page_prepare mm/page_alloc.c:3369 [inline]
      free_unref_page+0x1d/0x490 mm/page_alloc.c:3464
      free_contig_range+0xb5/0x180 mm/page_alloc.c:9488
      destroy_args+0xa8/0x64c mm/debug_vm_pgtable.c:998
      debug_vm_pgtable+0x28de/0x296f mm/debug_vm_pgtable.c:1318
      do_one_initcall+0x141/0x790 init/main.c:1306
      do_initcall_level init/main.c:1379 [inline]
      do_initcalls init/main.c:1395 [inline]
      do_basic_setup init/main.c:1414 [inline]
      kernel_init_freeable+0x6f9/0x782 init/main.c:1634
      kernel_init+0x1e/0x1d0 init/main.c:1522
      ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
      
      Memory state around the buggy address:
      ffff88806cdee700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      ffff88806cdee780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      >ffff88806cdee800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ^
      ffff88806cdee880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      
      Fixes: bf9f1baa ("net: add dedicated kmem_cache for typical/small skb->head")
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Tested-by: default avatarChristoph Paasch <cpaasch@apple.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      880ce5f2
  2. 28 Feb, 2023 7 commits
  3. 27 Feb, 2023 19 commits
  4. 26 Feb, 2023 13 commits
    • Linus Torvalds's avatar
      Merge tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · f3a2439f
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
      
       - Support for PRU clients to acquire a control reference to the PRU
         instances is introduced, and the PRU now allows specifying
         firmware-name in Devicetree. sysfs is requested to be read-only when
         the remoteproc instance is consumed by another kernel driver
      
       - Support for the C7xv DSP on AM62A SoC is introduced
      
       - The Devicetree binding for the Qualcomm PAS devices are split up in
         multiple files, to better account for the differences in resources
         between them. A number of missing Devicetree bindings are added, and
         the Qualcomm WCNSS binding is converted to YAML
      
       - A few cleanups are introduced for the Mediatek SCP driver. And a
         sanity check of the firmware image is introduced in the Mediatek
         driver
      
       - For Qualcomm SC7280 ADSP support is added, MSM8953 gains ADSP and
         modem support, SM6115 and SM8550 gains ADSP, CDSP and modem support,
         and support for pronto v3 support (used on e.g. MSM8953) is added
      
       - The Qualcomm modem remoteproc driver is modified to use a no-map
         reserved-memory region for it's authentication metadata, in order to
         avoid fatal security violations caused by accesses from Linux during
         the authentication process
      
       - Support for separate loading of a Devicetree blob is added to the PAS
         driver, and support for the PAS driver to carve out DSM memory for
         the modem is added as well
      
       - The Qualcomm ADSP remoteproc driver gains support for mapping memory
         into specific range using the IOMMU. The sysmon driver is
         transitioned to strlcpy()
      
      * tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (69 commits)
        dt-bindings: mailbox: qcom,apcs-kpss-global: drop mbox-names from example
        dt-bindings: remoteproc: qcom,glink-edge: correct label description
        dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema
        dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains
        remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot
        dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file
        remoteproc: qcom: pas: Add sm6115 remoteprocs
        remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
        remoteproc: qcom: fix sparse warnings
        remoteproc: qcom: replace kstrdup with kstrndup
        remoteproc: mediatek: Check the SCP image format
        remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers
        Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use"
        dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,sc7180-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,msm8996-mss-pil: Update memory region
        dt-bindings: remoteproc: qcom,q6v5: Move MSM8996 to schema
        remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data
        remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware
        remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading
        ...
      f3a2439f
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · cc38a46d
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
      
       - rpmsg ctrl and char driver locking is ensure ordering in cases where
         the communication link is being torn down in parallel with calls to
         open(2) or poll(2)
      
       - The glink driver is refactored, to move rpm/smem-specifics out of the
         common logic and better suite further improvements, such as
         transports without a mailbox controller. The handling of remoteproc
         shutdown is improved, to fail clients immediately instead of having
         them to wait for timeouts. A driver_override memory leak is corrected
         and a few spelling improvements are introduced
      
       - glink_ssr is transitioned off strlcpy() and "gpr" is added as a valid
         child node of the glink-edge DT binding
      
      * tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: glink: Release driver_override
        rpmsg: glink: Avoid infinite loop on intent for missing channel
        rpmsg: glink: Fix GLINK command prefix
        rpmsg: glink: Fix spelling of peek
        rpmsg: glink: Cancel pending intent requests at removal
        rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated
        rpmsg: glink: Move irq and mbox handling to transports
        rpmsg: glink: rpm: Wrap driver context
        rpmsg: glink: smem: Wrap driver context
        rpmsg: glink: Extract tx kick operation
        rpmsg: glink: Include types in qcom_glink_native.h
        rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove
        rpmsg: char: Add lock to avoid race when rpmsg device is released
        rpmsg: move from strlcpy with unused retval to strscpy
        dt-bindings: remoteproc: qcom,glink-edge: add GPR node
      cc38a46d
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 9b0b0dd8
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This updates the sun6i DT binding to allow (and require) #hwlock-cells
        and makes use of device_match_of_node() to slight clean up the
        condition in of_hwspin_lock_get_id()"
      
      * tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        dt-bindings: hwlock: sun6i: Add #hwlock-cells to example
        dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
        hwspinlock: Use device_match_of_node()
      9b0b0dd8
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 498a1cf9
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Change V=1 option to print both short log and full command log
      
       - Allow V=1 and V=2 to be combined as V=12
      
       - Make W=1 detect wrong .gitignore files
      
       - Tree-wide cleanups for unused command line arguments passed to Clang
      
       - Stop using -Qunused-arguments with Clang
      
       - Make scripts/setlocalversion handle only correct release tags instead
         of any arbitrary annotated tag
      
       - Create Debian and RPM source packages without cleaning the source
         tree
      
       - Various cleanups for packaging
      
      * tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (74 commits)
        kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install
        docs: kbuild: remove description of KBUILD_LDS_MODULE
        .gitattributes: use 'dts' diff driver for *.dtso files
        kbuild: deb-pkg: improve the usability of source package
        kbuild: deb-pkg: fix binary-arch and clean in debian/rules
        kbuild: tar-pkg: use tar rules in scripts/Makefile.package
        kbuild: make perf-tar*-src-pkg work without relying on git
        kbuild: deb-pkg: switch over to source format 3.0 (quilt)
        kbuild: deb-pkg: make .orig tarball a hard link if possible
        kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile
        kbuild: srcrpm-pkg: create source package without cleaning
        kbuild: rpm-pkg: build binary packages from source rpm
        kbuild: deb-pkg: create source package without cleaning
        kbuild: add a tool to list files ignored by git
        Documentation/llvm: add Chimera Linux, Google and Meta datacenters
        setlocalversion: use only the correct release tag for git-describe
        setlocalversion: clean up the construction of version output
        .gitignore: ignore *.cover and *.mbx
        kbuild: remove --include-dir MAKEFLAG from top Makefile
        kbuild: fix trivial typo in comment
        ...
      498a1cf9
    • Linus Torvalds's avatar
      Merge tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 4b8c673b
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - Removal of several VB1-only deprecated drivers: cpia2, fsl-viu, meye,
         stkwebcam, tm6000, vpfe_capture and zr364xx
      
       - saa7146 recovered from staging/deprecated. We opted to give ti a
         chance, and, instead of deprecating it, the intention is to write
         patches migrating it from VB1 to VB2.
      
       - av7110 returned from staging/deprecated/ to staging/ as we're not
         planning on dropping it any time soon
      
       - media controller API has gained experimental support for G_ROUTING
         and streams API. No drivers use it right now. We're planning to add
         one after -rc1, giving some time to experience the API and eventually
         have changes during the next development cycle
      
       - New sensor drivers: imx296, imx415, ov8858
      
       - Atomisp had lots of changes, specially on its sensor's interface,
         making atomisp sensor drivers closer to normal sensor drivers
      
       - media controller kAPI has gained some helpers to traverse pipelines
      
       - uvcvideo now better support power line control
      
       - lots of bug fixes, cleanups and driver improvements
      
      * tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (296 commits)
        media: imx-mipi-csis: Check csis_fmt validity before use
        media: v4l2-subdev.c: clear stream field
        media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line
        media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci"
        media: Revert "media: av7110: move to staging/media/deprecated/saa7146"
        media: imx-pxp: convert to regmap
        media: imx-pxp: Use non-threaded IRQ
        media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers
        media: imx-pxp: Implement frame size enumeration
        media: imx-pxp: Pass pixel format value to find_format()
        media: imx-pxp: Add media controller support
        media: imx-pxp: Don't set bus_info manually in .querycap()
        media: imx-pxp: Sort headers alphabetically
        media: imx-pxp: add support for i.MX7D
        media: imx-pxp: make data_path_ctrl0 platform dependent
        media: imx-pxp: disable LUT block
        media: imx-pxp: explicitly disable unused blocks
        media: imx-pxp: extract helper function to setup data path
        media: imx-pxp: detect PXP version
        media: dt-bindings: media: fsl-pxp: convert to yaml
        ...
      4b8c673b
    • Linus Torvalds's avatar
      Documentation: simplify and clarify DCO contribution example language · d4563201
      Linus Torvalds authored
      Long long ago, in a more innocent time, Greg wrote the clarification for
      how the DCO should work and that you couldn't make anonymous
      contributions, because the sign-off needed to be something we could
      check back with.
      
      It was 2006, and nobody reacted to the wording, the whole Facebook 'real
      name' controversy was a decade in the future, and nobody even thought
      about it.  And despite the language, we've always accepted nicknames and
      that language was never meant to be any kind of exclusionary wording.
      
      In fact, even when it became a discussion in other adjacent projects,
      apparently nobody even thought to just clarify the language in the
      kernel docs, and instead we had projects like the CNCF that had long
      discussions about it, and wrote their own clarifications [1] of it.
      
      Just simplify the wording to the point where it shouldn't be causing
      unnecessary angst and pain, or scare away people who go by preferred
      naming.
      
      Link: https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md [1]
      Fixes: af45f32d ("We can not allow anonymous contributions to the kernel")
      Acked-by: default avatarGreg KH <gregkh@linuxfoundation.org>
      Acked-by: default avatarMichael Dolan <mdolan@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4563201
    • Russell King (Oracle)'s avatar
      net: dsa: ocelot_ext: remove unnecessary phylink.h include · 724337be
      Russell King (Oracle) authored
      During review of ocelot_ext, it created a private phylink instance
      that wasn't necessary. This was removed for subsequent postings,
      but the include file seems to have been left behind. Remove it.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      724337be
    • David S. Miller's avatar
      Merge branch 'net-ocelot-switch-regressions' · 5f79f12c
      David S. Miller authored
      Vladimir Oltean says:
      
      ====================
      Regressions in Ocelot switch drivers
      
      These are 3 patches which resolve a regression in the Seville driver,
      one in the Felix driver and a generic one which affects any kernel
      compiled with 2 Kconfig options enabled. All of them have in common my
      lack of attention during review/testing. The patches touch the DSA, MFD
      and MDIO drivers for Ocelot. I think it would be preferable if all
      patches went through netdev (with Lee's Ack).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f79f12c
    • Vladimir Oltean's avatar
      net: mscc: ocelot: fix duplicate driver name error · ef1a99c6
      Vladimir Oltean authored
      When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT
      and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will
      be printed:
      
      [    5.266588] Error: Driver 'ocelot-switch' is already registered, aborting...
      
      Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name
      duplication, and update the mfd_cell entry for its resources.
      
      Fixes: 3d7316ac ("net: dsa: ocelot: add external ocelot switch control")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef1a99c6
    • Vladimir Oltean's avatar
      net: dsa: felix: fix internal MDIO controller resource length · 940af261
      Vladimir Oltean authored
      The blamed commit did not properly convert the resource start/end format
      into the DEFINE_RES_MEM_NAMED() start/length format, resulting in a
      resource for vsc9959_imdio_res which is much longer than expected:
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f815006f : imdio
      
      vs (correct)
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f814803f : imdio
      
      Luckily it's not big enough to exceed the size of the parent resource
      (pci_resource_end(pdev, VSC9959_IMDIO_PCI_BAR)), and it doesn't overlap
      with anything else that the Linux driver uses currently, so the larger
      than expected size isn't a practical problem that I can see. Although it
      is clearly wrong in the /proc/iomem output.
      
      Fixes: 044d447a ("net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      940af261
    • Vladimir Oltean's avatar
      net: dsa: seville: ignore mscc-miim read errors from Lynx PCS · 0322ef49
      Vladimir Oltean authored
      During the refactoring in the commit below, vsc9953_mdio_read() was
      replaced with mscc_miim_read(), which has one extra step: it checks for
      the MSCC_MIIM_DATA_ERROR bits before returning the result.
      
      On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they
      are organized in 2 groups. First group responds to MDIO addresses 4-7
      because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to
      MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double
      checked that these values are correctly set in the SERDES, as well as
      PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01.
      
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      
      As can be seen, the data in MIIM_DATA is still valid despite having the
      MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit
      84705fc1 ("net: dsa: felix: introduce support for Seville VSC9953
      switch") was ignoring these bits, perhaps deliberately (although
      unbeknownst to me).
      
      This is an old IP and the hardware team cannot seem to be able to help
      me track down a plausible reason for these failures. I'll keep
      investigating, but in the meantime, this is a direct regression which
      must be restored to a working state.
      
      The only thing I can do is keep ignoring the errors as before.
      
      Fixes: b9965845 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0322ef49
    • David S. Miller's avatar
      Merge branch 'net-sched-action-bind' · 3fa10563
      David S. Miller authored
      Pedro Tammela says:
      
      ====================
      net/sched: fix action bind logic
      
      Some actions are not handling the case where an action can be created and bound to a
      filter independently. These actions are checking for parameters only passed
      in the netlink message for create/change/replace, which then errors out
      for valid uses like:
      tc filter ... action pedit index 1
      
      In the iproute2 side, we saw a couple of actions with their parsers
      broken when passing "index 1" as the only action argument, while the kernel
      side accepted it correctly. We fixed those as well.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fa10563
    • Pedro Tammela's avatar
      net/sched: act_sample: fix action bind logic · 4a20056a
      Pedro Tammela authored
      The TC architecture allows filters and actions to be created independently.
      In filters the user can reference action objects using:
      tc action add action sample ... index 1
      tc filter add ... action pedit index 1
      
      In the current code for act_sample this is broken as it checks netlink
      attributes for create/update before actually checking if we are binding to an
      existing action.
      
      tdc results:
      1..29
      ok 1 9784 - Add valid sample action with mandatory arguments
      ok 2 5c91 - Add valid sample action with mandatory arguments and continue control action
      ok 3 334b - Add valid sample action with mandatory arguments and drop control action
      ok 4 da69 - Add valid sample action with mandatory arguments and reclassify control action
      ok 5 13ce - Add valid sample action with mandatory arguments and pipe control action
      ok 6 1886 - Add valid sample action with mandatory arguments and jump control action
      ok 7 7571 - Add sample action with invalid rate
      ok 8 b6d4 - Add sample action with mandatory arguments and invalid control action
      ok 9 a874 - Add invalid sample action without mandatory arguments
      ok 10 ac01 - Add invalid sample action without mandatory argument rate
      ok 11 4203 - Add invalid sample action without mandatory argument group
      ok 12 14a7 - Add invalid sample action without mandatory argument group
      ok 13 8f2e - Add valid sample action with trunc argument
      ok 14 45f8 - Add sample action with maximum rate argument
      ok 15 ad0c - Add sample action with maximum trunc argument
      ok 16 83a9 - Add sample action with maximum group argument
      ok 17 ed27 - Add sample action with invalid rate argument
      ok 18 2eae - Add sample action with invalid group argument
      ok 19 6ff3 - Add sample action with invalid trunc size
      ok 20 2b2a - Add sample action with invalid index
      ok 21 dee2 - Add sample action with maximum allowed index
      ok 22 560e - Add sample action with cookie
      ok 23 704a - Replace existing sample action with new rate argument
      ok 24 60eb - Replace existing sample action with new group argument
      ok 25 2cce - Replace existing sample action with new trunc argument
      ok 26 59d1 - Replace existing sample action with new control argument
      ok 27 0a6e - Replace sample action with invalid goto chain control
      ok 28 3872 - Delete sample action with valid index
      ok 29 a394 - Delete sample action with invalid index
      
      Fixes: 5c5670fa ("net/sched: Introduce sample tc action")
      Reviewed-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a20056a