Skip to content
  1. Jun 10, 2022
  2. Jun 08, 2022
  3. Jun 06, 2022
    • Xiang wangx's avatar
      platform/chrome: cros_ec_commands: Fix syntax errors in comments · 8d597608
      Xiang wangx authored
      
      
      Delete the redundant word 'using'.
      
      Signed-off-by: default avatarXiang wangx <wangxiang@cdjrlc.com>
      Reviewed-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Link: https://lore.kernel.org/r/20220606022313.22912-1-wangxiang@cdjrlc.com
      8d597608
    • Tzung-Bi Shih's avatar
      platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_check_result() · 4319cbd4
      Tzung-Bi Shih authored
      
      
      cros_ec_check_result() is used to check if the EC communication success but
      EC responded EC_RES_IN_PROGRESS.  It should return 0 even if EC wasn't
      happy about the host command.
      
      Add Kunit tests for cros_ec_check_result().
      
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Link: https://lore.kernel.org/r/20220518091814.2028579-5-tzungbi@kernel.org
      4319cbd4
    • Tzung-Bi Shih's avatar
      platform/chrome: cros_ec_proto: update cros_ec_check_result() comment · 97b11dd6
      Tzung-Bi Shih authored
      
      
      At first glance, cros_ec_check_result() is quite like cros_ec_map_error().
      They check for `ec_msg->result` and return corresponding errors.  However,
      as calling from `pkt_xfer` and `cmd_xfer`, cros_ec_check_result() should
      not report furthermore errors.  -EAGAIN is the only exception.
      
      See [1][2][3] for some known userland programs' code.  The return code
      from ioctl only denotes the EC communication status.  Userland programs
      would further analyze the `result` in struct cros_ec_command* for
      follow-up actions (e.g. [4]).
      
      To clarify, update the function comment.
      
      [1]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#154
      [2]: https://crrev.com/fe32670a89bf59e1aff84bba9dd3295657b85e9b/cros_ec_dev.c#296
      [3]: https://crrev.com/4e19eb1d89de0422ff1bbd3f7260b131c761098c/drivers/google/cros_ec_dev.c#120
      [4]: https://crrev.com/54400e93a75ef440a83d6eaac2cec066daf99cf0/util/comm-dev.c#164
      
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Link: https://lore.kernel.org/r/20220518091814.2028579-4-tzungbi@kernel.org
      97b11dd6
    • Tzung-Bi Shih's avatar
      platform/chrome: cros_ec_proto: factor legacy out from cros_ec_prepare_tx() · 23a34e3a
      Tzung-Bi Shih authored
      
      
      cros_ec_prepare_tx() mixed the code for both versions.  To be neat and to
      make it clear, factor the legacy part out as a separate function, rename
      the function, and update the comments.
      
      Specifically,
      - prepare_tx(), for current protocol version (i.e. 3).
      - prepare_tx_legacy(), for protocol version <= 2.
      
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Link: https://lore.kernel.org/r/20220518091814.2028579-3-tzungbi@kernel.org
      23a34e3a
    • Tzung-Bi Shih's avatar
      platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_prepare_tx() · db681eaf
      Tzung-Bi Shih authored
      
      
      cros_ec_prepare_tx() is used to fill the protocol headers according to
      the requested protocol version.
      
      Add Kunit tests cros_ec_prepare_tx() for each version.
      
      Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
      Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
      Link: https://lore.kernel.org/r/20220518091814.2028579-2-tzungbi@kernel.org
      db681eaf
    • Linus Torvalds's avatar
      Linux 5.19-rc1 · f2906aa8
      Linus Torvalds authored
      f2906aa8
    • Linus Torvalds's avatar
      Merge tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 6684cf42
      Linus Torvalds authored
      Pull file descriptor fix from Al Viro:
       "Fix for breakage in #work.fd this window"
      
      * tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix the breakage in close_fd_get_file() calling conventions change
      6684cf42
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · 815b196c
      Linus Torvalds authored
      Pull mm hotfixes from Andrew Morton:
       "Fixups for various recently-added and longer-term issues and a few
        minor tweaks:
      
         - fixes for material merged during this merge window
      
         - cc:stable fixes for more longstanding issues
      
         - minor mailmap and MAINTAINERS updates"
      
      * tag 'mm-hotfixes-stable-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/oom_kill.c: fix vm_oom_kill_table[] ifdeffery
        x86/kexec: fix memory leak of elf header buffer
        mm/memremap: fix missing call to untrack_pfn() in pagemap_range()
        mm: page_isolation: use compound_nr() correctly in isolate_single_pageblock()
        mm: hugetlb_vmemmap: fix CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON
        MAINTAINERS: add maintainer information for z3fold
        mailmap: update Josh Poimboeuf's email
      815b196c
    • Linus Torvalds's avatar
      Merge tag 'mm-nonmm-stable-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · e17fee89
      Linus Torvalds authored
      Pull delay-accounting update from Andrew Morton:
       "A single featurette for delay accounting.
      
        Delayed a bit because, unusually, it had dependencies on both the
        mm-stable and mm-nonmm-stable queues"
      
      * tag 'mm-nonmm-stable-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        delayacct: track delays from write-protect copy
      e17fee89
    • Linus Torvalds's avatar
      bluetooth: don't use bitmaps for random flag accesses · e1cff700
      Linus Torvalds authored
      The bluetooth code uses our bitmap infrastructure for the two bits (!)
      of connection setup flags, and in the process causes odd problems when
      it converts between a bitmap and just the regular values of said bits.
      
      It's completely pointless to do things like bitmap_to_arr32() to convert
      a bitmap into a u32.  It shoudln't have been a bitmap in the first
      place.  The reason to use bitmaps is if you have arbitrary number of
      bits you want to manage (not two!), or if you rely on the atomicity
      guarantees of the bitmap setting and clearing.
      
      The code could use an "atomic_t" and use "atomic_or/andnot()" to set and
      clear the bit values, but considering that it then copies the bitmaps
      around with "bitmap_to_arr32()" and friends, there clearly cannot be a
      lot of atomicity requirements.
      
      So just use a regular integer.
      
      In the process, this avoids the warnings about erroneous use of
      bitmap_from_u64() which were triggered on 32-bit architectures when
      conversion from a u64 would access two words (and, surprise, surprise,
      only one word is needed - and indeed overkill - for a 2-bit bitmap).
      
      That was always problematic, but the compiler seems to notice it and
      warn about the invalid pattern only after commit 0a97953f ("lib: add
      bitmap_{from,to}_arr64") changed the exact implementation details of
      'bitmap_from_u64()', as reported by Sudip Mukherjee and Stephen Rothwell.
      
      Fixes: fe92ee64 ("Bluetooth: hci_core: Rework hci_conn_params flags")
      Link: https://lore.kernel.org/all/YpyJ9qTNHJzz0FHY@debian/
      Link: https://lore.kernel.org/all/20220606080631.0c3014f2
      
      @canb.auug.org.au/
      Link: https://lore.kernel.org/all/20220605162537.1604762-1-yury.norov@gmail.com/
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Reviewed-by: default avatarYury Norov <yury.norov@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e1cff700
    • Al Viro's avatar
      fix the breakage in close_fd_get_file() calling conventions change · 40a19260
      Al Viro authored
      
      
      It used to grab an extra reference to struct file rather than
      just transferring to caller the one it had removed from descriptor
      table.  New variant doesn't, and callers need to be adjusted.
      
      Reported-and-tested-by: default avatar <syzbot+47dd250f527cb7bebf24@syzkaller.appspotmail.com>
      Fixes: 6319194e
      
       ("Unify the primitives for file descriptor closing")
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      40a19260
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d717180e
      Linus Torvalds authored
      Pull x86 SGX fix from Thomas Gleixner:
       "A single fix for x86/SGX to prevent that memory which is allocated for
        an SGX enclave is accounted to the wrong memory control group"
      
      * tag 'x86-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Set active memcg prior to shmem allocation
      d717180e
    • Linus Torvalds's avatar
      Merge tag 'x86-mm-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0b7da15c
      Linus Torvalds authored
      Pull x86 mm cleanup from Thomas Gleixner:
       "Use PAGE_ALIGNED() instead of open coding it in the x86/mm code"
      
      * tag 'x86-mm-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Use PAGE_ALIGNED(x) instead of IS_ALIGNED(x, PAGE_SIZE)
      0b7da15c
    • Linus Torvalds's avatar
      Merge tag 'x86-microcode-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9784edd7
      Linus Torvalds authored
      Pull x86 microcode updates from Thomas Gleixner:
      
       - Disable late microcode loading by default. Unless the HW people get
         their act together and provide a required minimum version in the
         microcode header for making a halfways informed decision its just
         lottery and broken.
      
       - Warn and taint the kernel when microcode is loaded late
      
       - Remove the old unused microcode loader interface
      
       - Remove a redundant perf callback from the microcode loader
      
      * tag 'x86-microcode-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode: Remove unnecessary perf callback
        x86/microcode: Taint and warn on late loading
        x86/microcode: Default-disable late loading
        x86/microcode: Rip out the OLD_INTERFACE
      9784edd7
    • Linus Torvalds's avatar
      Merge tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9251280
      Linus Torvalds authored
      Pull x86 cleanups from Thomas Gleixner:
       "A set of small x86 cleanups:
      
         - Remove unused headers in the IDT code
      
         - Kconfig indendation and comment fixes
      
         - Fix all 'the the' typos in one go instead of waiting for bots to
           fix one at a time"
      
      * tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Fix all occurences of the "the the" typo
        x86/idt: Remove unused headers
        x86/Kconfig: Fix indentation of arch/x86/Kconfig.debug
        x86/Kconfig: Fix indentation and add endif comments to arch/x86/Kconfig
      a9251280