1. 07 Jul, 2020 7 commits
  2. 06 Jul, 2020 10 commits
  3. 22 Jun, 2020 2 commits
  4. 20 Jun, 2020 11 commits
  5. 16 Jun, 2020 2 commits
    • Drew Fustini's avatar
      pinctrl-single: fix pcs_parse_pinconf() return value · f46fe79f
      Drew Fustini authored
      This patch causes pcs_parse_pinconf() to return -ENOTSUPP when no
      pinctrl_map is added.  The current behavior is to return 0 when
      !PCS_HAS_PINCONF or !nconfs.  Thus pcs_parse_one_pinctrl_entry()
      incorrectly assumes that a map was added and sets num_maps = 2.
      
      Analysis:
      =========
      The function pcs_parse_one_pinctrl_entry() calls pcs_parse_pinconf()
      if PCS_HAS_PINCONF is enabled.  The function pcs_parse_pinconf()
      returns 0 to indicate there was no error and num_maps is then set to 2:
      
       980 static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
       981                                                 struct device_node *np,
       982                                                 struct pinctrl_map **map,
       983                                                 unsigned *num_maps,
       984                                                 const char **pgnames)
       985 {
      <snip>
      1053         (*map)->type = PIN_MAP_TYPE_MUX_GROUP;
      1054         (*map)->data.mux.group = np->name;
      1055         (*map)->data.mux.function = np->name;
      1056
      1057         if (PCS_HAS_PINCONF && function) {
      1058                 res = pcs_parse_pinconf(pcs, np, function, map);
      1059                 if (res)
      1060                         goto free_pingroups;
      1061                 *num_maps = 2;
      1062         } else {
      1063                 *num_maps = 1;
      1064         }
      
      However, pcs_parse_pinconf() will also return 0 if !PCS_HAS_PINCONF or
      !nconfs.  I believe these conditions should indicate that no map was
      added by returning -ENOTSUPP. Otherwise pcs_parse_one_pinctrl_entry()
      will set num_maps = 2 even though no maps were successfully added, as
      it does not reach "m++" on line 940:
      
       895 static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
       896                              struct pcs_function *func,
       897                              struct pinctrl_map **map)
       898
       899 {
       900         struct pinctrl_map *m = *map;
      <snip>
       917         /* If pinconf isn't supported, don't parse properties in below. */
       918         if (!PCS_HAS_PINCONF)
       919                 return 0;
       920
       921         /* cacluate how much properties are supported in current node */
       922         for (i = 0; i < ARRAY_SIZE(prop2); i++) {
       923                 if (of_find_property(np, prop2[i].name, NULL))
       924                         nconfs++;
       925         }
       926         for (i = 0; i < ARRAY_SIZE(prop4); i++) {
       927                 if (of_find_property(np, prop4[i].name, NULL))
       928                         nconfs++;
       929         }
       930         if (!nconfs)
       919                 return 0;
       932
       933         func->conf = devm_kcalloc(pcs->dev,
       934                                   nconfs, sizeof(struct pcs_conf_vals),
       935                                   GFP_KERNEL);
       936         if (!func->conf)
       937                 return -ENOMEM;
       938         func->nconfs = nconfs;
       939         conf = &(func->conf[0]);
       940         m++;
      
      This situtation will cause a boot failure [0] on the BeagleBone Black
      (AM3358) when am33xx_pinmux node in arch/arm/boot/dts/am33xx-l4.dtsi
      has compatible = "pinconf-single" instead of "pinctrl-single".
      
      The patch fixes this issue by returning -ENOSUPP when !PCS_HAS_PINCONF
      or !nconfs, so that pcs_parse_one_pinctrl_entry() will know that no
      map was added.
      
      Logic is also added to pcs_parse_one_pinctrl_entry() to distinguish
      between -ENOSUPP and other errors.  In the case of -ENOSUPP, num_maps
      is set to 1 as it is valid for pinconf to be enabled and a given pin
      group to not any pinconf properties.
      
      [0] https://lore.kernel.org/linux-omap/20200529175544.GA3766151@x1/
      
      Fixes: 9dddb4df ("pinctrl: single: support generic pinconf")
      Signed-off-by: default avatarDrew Fustini <drew@beagleboard.org>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Link: https://lore.kernel.org/r/20200608125143.GA2789203@x1Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      f46fe79f
    • Paul Cercueil's avatar
      pinctrl: ingenic: Add NAND FRE/FWE pins for JZ4740 · bcad94d7
      Paul Cercueil authored
      Add the FRE/FWE pins for the JZ4740.
      
      These pins must be in function #0 for the NAND to work. The reason it
      worked before was because the bootloader did set these pins to the
      correct function beforehand.
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Link: https://lore.kernel.org/r/20200607174243.2361664-1-paul@crapouillou.netSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      bcad94d7
  6. 14 Jun, 2020 4 commits
    • Linus Torvalds's avatar
      Linux 5.8-rc1 · b3a9e3b9
      Linus Torvalds authored
      b3a9e3b9
    • Linus Torvalds's avatar
      Merge tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux · 4a87b197
      Linus Torvalds authored
      Pull SafeSetID update from Micah Morton:
       "Add additional LSM hooks for SafeSetID
      
        SafeSetID is capable of making allow/deny decisions for set*uid calls
        on a system, and we want to add similar functionality for set*gid
        calls.
      
        The work to do that is not yet complete, so probably won't make it in
        for v5.8, but we are looking to get this simple patch in for v5.8
        since we have it ready.
      
        We are planning on the rest of the work for extending the SafeSetID
        LSM being merged during the v5.9 merge window"
      
      * tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux:
        security: Add LSM hooks to set*gid syscalls
      4a87b197
    • Thomas Cedeno's avatar
      security: Add LSM hooks to set*gid syscalls · 39030e13
      Thomas Cedeno authored
      The SafeSetID LSM uses the security_task_fix_setuid hook to filter
      set*uid() syscalls according to its configured security policy. In
      preparation for adding analagous support in the LSM for set*gid()
      syscalls, we add the requisite hook here. Tested by putting print
      statements in the security_task_fix_setgid hook and seeing them get hit
      during kernel boot.
      Signed-off-by: default avatarThomas Cedeno <thomascedeno@google.com>
      Signed-off-by: default avatarMicah Morton <mortonm@chromium.org>
      39030e13
    • Linus Torvalds's avatar
      Merge tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 9d645db8
      Linus Torvalds authored
      Pull btrfs updates from David Sterba:
       "This reverts the direct io port to iomap infrastructure of btrfs
        merged in the first pull request. We found problems in invalidate page
        that don't seem to be fixable as regressions or without changing iomap
        code that would not affect other filesystems.
      
        There are four reverts in total, but three of them are followup
        cleanups needed to revert a43a67a2 cleanly. The result is the
        buffer head based implementation of direct io.
      
        Reverts are not great, but under current circumstances I don't see
        better options"
      
      * tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Revert "btrfs: switch to iomap_dio_rw() for dio"
        Revert "fs: remove dio_end_io()"
        Revert "btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK"
        Revert "btrfs: split btrfs_direct_IO to read and write part"
      9d645db8
  7. 13 Jun, 2020 4 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 96144c58
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix cfg80211 deadlock, from Johannes Berg.
      
       2) RXRPC fails to send norigications, from David Howells.
      
       3) MPTCP RM_ADDR parsing has an off by one pointer error, fix from
          Geliang Tang.
      
       4) Fix crash when using MSG_PEEK with sockmap, from Anny Hu.
      
       5) The ucc_geth driver needs __netdev_watchdog_up exported, from
          Valentin Longchamp.
      
       6) Fix hashtable memory leak in dccp, from Wang Hai.
      
       7) Fix how nexthops are marked as FDB nexthops, from David Ahern.
      
       8) Fix mptcp races between shutdown and recvmsg, from Paolo Abeni.
      
       9) Fix crashes in tipc_disc_rcv(), from Tuong Lien.
      
      10) Fix link speed reporting in iavf driver, from Brett Creeley.
      
      11) When a channel is used for XSK and then reused again later for XSK,
          we forget to clear out the relevant data structures in mlx5 which
          causes all kinds of problems. Fix from Maxim Mikityanskiy.
      
      12) Fix memory leak in genetlink, from Cong Wang.
      
      13) Disallow sockmap attachments to UDP sockets, it simply won't work.
          From Lorenz Bauer.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits)
        net: ethernet: ti: ale: fix allmulti for nu type ale
        net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
        net: atm: Remove the error message according to the atomic context
        bpf: Undo internal BPF_PROBE_MEM in BPF insns dump
        libbpf: Support pre-initializing .bss global variables
        tools/bpftool: Fix skeleton codegen
        bpf: Fix memlock accounting for sock_hash
        bpf: sockmap: Don't attach programs to UDP sockets
        bpf: tcp: Recv() should return 0 when the peer socket is closed
        ibmvnic: Flush existing work items before device removal
        genetlink: clean up family attributes allocations
        net: ipa: header pad field only valid for AP->modem endpoint
        net: ipa: program upper nibbles of sequencer type
        net: ipa: fix modem LAN RX endpoint id
        net: ipa: program metadata mask differently
        ionic: add pcie_print_link_status
        rxrpc: Fix race between incoming ACK parser and retransmitter
        net/mlx5: E-Switch, Fix some error pointer dereferences
        net/mlx5: Don't fail driver on failure to create debugfs
        net/mlx5e: CT: Fix ipv6 nat header rewrite actions
        ...
      96144c58
    • David Sterba's avatar
      Revert "btrfs: switch to iomap_dio_rw() for dio" · 55e20bd1
      David Sterba authored
      This reverts commit a43a67a2.
      
      This patch reverts the main part of switching direct io implementation
      to iomap infrastructure. There's a problem in invalidate page that
      couldn't be solved as regression in this development cycle.
      
      The problem occurs when buffered and direct io are mixed, and the ranges
      overlap. Although this is not recommended, filesystems implement
      measures or fallbacks to make it somehow work. In this case, fallback to
      buffered IO would be an option for btrfs (this already happens when
      direct io is done on compressed data), but the change would be needed in
      the iomap code, bringing new semantics to other filesystems.
      
      Another problem arises when again the buffered and direct ios are mixed,
      invalidation fails, then -EIO is set on the mapping and fsync will fail,
      though there's no real error.
      
      There have been discussions how to fix that, but revert seems to be the
      least intrusive option.
      
      Link: https://lore.kernel.org/linux-btrfs/20200528192103.xm45qoxqmkw7i5yl@fiona/Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      55e20bd1
    • Grygorii Strashko's avatar
      net: ethernet: ti: ale: fix allmulti for nu type ale · bc139119
      Grygorii Strashko authored
      On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow
      unregistered mcast packets to pass.
      
      This happens, because ALE VLAN entries on these SoCs do not contain port
      masks for reg/unreg mcast packets, but instead store indexes of
      ALE_VLAN_MASK_MUXx_REG registers which intended for store port masks for
      reg/unreg mcast packets.
      This path was missed by commit 9d1f6447 ("net: ethernet: ti: ale: fix
      seeing unreg mcast packets with promisc and allmulti disabled").
      
      Hence, fix it by taking into account ALE type in cpsw_ale_set_allmulti().
      
      Fixes: 9d1f6447 ("net: ethernet: ti: ale: fix seeing unreg mcast packets with promisc and allmulti disabled")
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bc139119
    • Grygorii Strashko's avatar
      net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init · 2074f9ea
      Grygorii Strashko authored
      The ALE parameters structure is created on stack, so it has to be reset
      before passing to cpsw_ale_create() to avoid garbage values.
      
      Fixes: 93a76530 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2074f9ea