1. 15 7月, 2022 1 次提交
  2. 06 7月, 2022 5 次提交
  3. 17 6月, 2022 1 次提交
  4. 16 6月, 2022 2 次提交
  5. 15 6月, 2022 1 次提交
    • L
      netfs: fix up netfs_inode_init() docbook comment · 018ab4fa
      Linus Torvalds 提交于
      Commit e81fb419 ("netfs: Further cleanups after struct netfs_inode
      wrapper introduced") changed the argument types and names, and actually
      updated the comment too (although that was thanks to David Howells, not
      me: my original patch only changed the code).
      
      But the comment fixup didn't go quite far enough, and didn't change the
      argument name in the comment, resulting in
      
        include/linux/netfs.h:314: warning: Function parameter or member 'ctx' not described in 'netfs_inode_init'
        include/linux/netfs.h:314: warning: Excess function parameter 'inode' description in 'netfs_inode_init'
      
      during htmldoc generation.
      
      Fixes: e81fb419 ("netfs: Further cleanups after struct netfs_inode wrapper introduced")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      018ab4fa
  6. 14 6月, 2022 1 次提交
  7. 12 6月, 2022 1 次提交
  8. 11 6月, 2022 2 次提交
    • D
      netfs: Rename the netfs_io_request cleanup op and give it an op pointer · 40a81101
      David Howells 提交于
      The netfs_io_request cleanup op is now always in a position to be given a
      pointer to a netfs_io_request struct, so this can be passed in instead of
      the mapping and private data arguments (both of which are included in the
      struct).
      
      So rename the ->cleanup op to ->free_request (to match ->init_request) and
      pass in the I/O pointer.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NJeff Layton <jlayton@kernel.org>
      cc: linux-cachefs@redhat.com
      40a81101
    • L
      netfs: Further cleanups after struct netfs_inode wrapper introduced · e81fb419
      Linus Torvalds 提交于
      Change the signature of netfs helper functions to take a struct netfs_inode
      pointer rather than a struct inode pointer where appropriate, thereby
      relieving the need for the network filesystem to convert its internal inode
      format down to the VFS inode only for netfslib to bounce it back up.  For
      type safety, it's better not to do that (and it's less typing too).
      
      Give netfs_write_begin() an extra argument to pass in a pointer to the
      netfs_inode struct rather than deriving it internally from the file
      pointer.  Note that the ->write_begin() and ->write_end() ops are intended
      to be replaced in the future by netfslib code that manages this without the
      need to call in twice for each page.
      
      netfs_readpage() and similar are intended to be pointed at directly by the
      address_space_operations table, so must stick to the signature dictated by
      the function pointers there.
      
      Changes
      =======
      - Updated the kerneldoc comments and documentation [DH].
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: linux-cachefs@redhat.com
      Link: https://lore.kernel.org/r/CAHk-=wgkwKyNmNdKpQkqZ6DnmUL-x9hp0YBnUGjaPFEAdxDTbw@mail.gmail.com/
      e81fb419
  9. 10 6月, 2022 7 次提交
  10. 09 6月, 2022 3 次提交
  11. 08 6月, 2022 1 次提交
    • T
      workqueue: Wrap flush_workqueue() using a macro · c4f135d6
      Tetsuo Handa 提交于
      Since flush operation synchronously waits for completion, flushing
      system-wide WQs (e.g. system_wq) might introduce possibility of deadlock
      due to unexpected locking dependency. Tejun Heo commented at [1] that it
      makes no sense at all to call flush_workqueue() on the shared WQs as the
      caller has no idea what it's gonna end up waiting for.
      
      Although there is flush_scheduled_work() which flushes system_wq WQ with
      "Think twice before calling this function! It's very easy to get into
      trouble if you don't take great care." warning message, syzbot found a
      circular locking dependency caused by flushing system_wq WQ [2].
      
      Therefore, let's change the direction to that developers had better use
      their local WQs if flush_scheduled_work()/flush_workqueue(system_*_wq) is
      inevitable.
      
      Steps for converting system-wide WQs into local WQs are explained at [3],
      and a conversion to stop flushing system-wide WQs is in progress. Now we
      want some mechanism for preventing developers who are not aware of this
      conversion from again start flushing system-wide WQs.
      
      Since I found that WARN_ON() is complete but awkward approach for teaching
      developers about this problem, let's use __compiletime_warning() for
      incomplete but handy approach. For completeness, we will also insert
      WARN_ON() into __flush_workqueue() after all in-tree users stopped calling
      flush_scheduled_work().
      
      Link: https://lore.kernel.org/all/YgnQGZWT%2Fn3VAITX@slm.duckdns.org/ [1]
      Link: https://syzkaller.appspot.com/bug?extid=bde0f89deacca7c765b8 [2]
      Link: https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236@I-love.SAKURA.ne.jp [3]
      Signed-off-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      c4f135d6
  12. 07 6月, 2022 2 次提交
    • R
      crc-itu-t: fix typo in CRC ITU-T polynomial comment · 77991645
      Roger Knecht 提交于
      The code comment says that the polynomial is x^16 + x^12 + x^15 + 1, but
      the correct polynomial is x^16 + x^12 + x^5 + 1. Quoting from page 2 in
      the ITU-T V.41 specification [1]:
      
        2 Encoding and checking process
      
        The service bits and information bits, taken in conjunction,
        correspond to the coefficients of a message polynomial having terms
        from x^(n-1) (n = total number of bits in a block or sequence) down to
        x^16. This polynomial is divided, modulo 2, by the generating
        polynomial x^16 + x^12 + x^5 + 1.
      
      The hex (truncated) polynomial 0x1021 and CRC code implementation are
      correct, however.
      
      [1] https://www.itu.int/rec/T-REC-V.41-198811-I/enSigned-off-by: NRoger Knecht <roger@norberthealth.com>
      Acked-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      77991645
    • J
      x86/ftrace: Remove OBJECT_FILES_NON_STANDARD usage · 7b6c7a87
      Josh Poimboeuf 提交于
      The file-wide OBJECT_FILES_NON_STANDARD annotation is used with
      CONFIG_FRAME_POINTER to tell objtool to skip the entire file when frame
      pointers are enabled.  However that annotation is now deprecated because
      it doesn't work with IBT, where objtool runs on vmlinux.o instead of
      individual translation units.
      
      Instead, use more fine-grained function-specific annotations:
      
      - The 'save_mcount_regs' macro does funny things with the frame pointer.
        Use STACK_FRAME_NON_STANDARD_FP to tell objtool to ignore the
        functions using it.
      
      - The return_to_handler() "function" isn't actually a callable function.
        Instead of being called, it's returned to.  The real return address
        isn't on the stack, so unwinding is already doomed no matter which
        unwinder is used.  So just remove the STT_FUNC annotation, telling
        objtool to ignore it.  That also removes the implicit
        ANNOTATE_NOENDBR, which now needs to be made explicit.
      
      Fixes the following warning:
      
        vmlinux.o: warning: objtool: __fentry__+0x16: return with modified stack frame
      
      Fixes: ed53a0d9 ("x86/alternative: Use .ibt_endbr_seal to seal indirect calls")
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NJosh Poimboeuf <jpoimboe@kernel.org>
      Link: https://lore.kernel.org/r/b7a7a42fe306aca37826043dac89e113a1acdbac.1654268610.git.jpoimboe@kernel.org
      7b6c7a87
  13. 06 6月, 2022 3 次提交
  14. 03 6月, 2022 7 次提交
    • K
      nodemask: Fix return values to be unsigned · 0dfe5407
      Kees Cook 提交于
      The nodemask routines had mixed return values that provided potentially
      signed return values that could never happen. This was leading to the
      compiler getting confusing about the range of possible return values
      (it was thinking things could be negative where they could not be). Fix
      all the nodemask routines that should be returning unsigned
      (or bool) values. Silences:
      
       mm/swapfile.c: In function ‘setup_swap_info’:
       mm/swapfile.c:2291:47: error: array subscript -1 is below array bounds of ‘struct plist_node[]’ [-Werror=array-bounds]
        2291 |                                 p->avail_lists[i].prio = 1;
             |                                 ~~~~~~~~~~~~~~^~~
       In file included from mm/swapfile.c:16:
       ./include/linux/swap.h:292:27: note: while referencing ‘avail_lists’
         292 |         struct plist_node avail_lists[]; /*
             |                           ^~~~~~~~~~~
      Reported-by: NChristophe de Dinechin <dinechin@redhat.com>
      Link: https://lore.kernel.org/lkml/20220414150855.2407137-3-dinechin@redhat.com/
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NYury Norov <yury.norov@gmail.com>
      0dfe5407
    • K
      bitmap: Fix return values to be unsigned · 005f1700
      Kees Cook 提交于
      Both nodemask and bitmap routines had mixed return values that provided
      potentially signed return values that could never happen. This was
      leading to the compiler getting confusing about the range of possible
      return values (it was thinking things could be negative where they could
      not be). In preparation for fixing nodemask, fix all the bitmap routines
      that should be returning unsigned (or bool) values.
      
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Christophe de Dinechin <dinechin@redhat.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NYury Norov <yury.norov@gmail.com>
      005f1700
    • Y
      lib: add bitmap_{from,to}_arr64 · 0a97953f
      Yury Norov 提交于
      Manipulating 64-bit arrays with bitmap functions is potentially dangerous
      because on 32-bit BE machines the order of halfwords doesn't match.
      Another issue is that compiler may throw a warning about out-of-boundary
      access.
      
      This patch adds bitmap_{from,to}_arr64 functions in addition to existing
      bitmap_{from,to}_arr32.
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NYury Norov <yury.norov@gmail.com>
      0a97953f
    • Y
      lib/bitmap: extend comment for bitmap_(from,to)_arr32() · e041e0ac
      Yury Norov 提交于
      On LE systems bitmaps are naturally ordered, therefore we can potentially
      use bitmap_copy routines when converting from 32-bit arrays, even if host
      system is 64-bit. But it may lead to out-of-bond access due to unsafe
      typecast, and the bitmap_(from,to)_arr32 comment doesn't explain that
      clearly
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: NYury Norov <yury.norov@gmail.com>
      e041e0ac
    • A
      include/linux/find: Fix documentation · 6d7131bd
      Anna-Maria Behnsen 提交于
      The order of the arguments in function documentation doesn't fit the
      implementation. Change the documentation so that it corresponds to the
      code. This prevent people to get confused when reading the documentation.
      Signed-off-by: NAnna-Maria Behnsen <anna-maria@linutronix.de>
      Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NYury Norov <yury.norov@gmail.com>
      6d7131bd
    • H
      LoongArch: Add multi-processor (SMP) support · 46859ac8
      Huacai Chen 提交于
      LoongArch-based procesors have 4, 8 or 16 cores per package. This patch
      adds multi-processor (SMP) support for LoongArch.
      Reviewed-by: NWANG Xuerui <git@xen0n.name>
      Reviewed-by: NJiaxun Yang <jiaxun.yang@flygoat.com>
      Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
      46859ac8
    • E
      net: add debug info to __skb_pull() · 22296a5c
      Eric Dumazet 提交于
      While analyzing yet another syzbot report, I found the following
      patch very useful. It allows to better understand what went wrong.
      
      This debug info is only enabled if CONFIG_DEBUG_NET=y,
      which is the case for syzbot builds.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      22296a5c
  15. 02 6月, 2022 1 次提交
  16. 01 6月, 2022 2 次提交