1. 20 7月, 2021 1 次提交
  2. 12 7月, 2021 1 次提交
  3. 30 4月, 2021 2 次提交
  4. 12 4月, 2021 1 次提交
  5. 08 3月, 2021 1 次提交
  6. 09 2月, 2021 2 次提交
  7. 08 2月, 2021 1 次提交
  8. 29 1月, 2021 1 次提交
  9. 19 1月, 2021 2 次提交
    • S
      s390: convert to generic entry · 56e62a73
      Sven Schnelle 提交于
      This patch converts s390 to use the generic entry infrastructure from
      kernel/entry/*.
      
      There are a few special things on s390:
      
      - PIF_PER_TRAP is moved to TIF_PER_TRAP as the generic code doesn't
        know about our PIF flags in exit_to_user_mode_loop().
      
      - The old code had several ways to restart syscalls:
      
        a) PIF_SYSCALL_RESTART, which was only set during execve to force a
           restart after upgrading a process (usually qemu-kvm) to pgste page
           table extensions.
      
        b) PIF_SYSCALL, which is set by do_signal() to indicate that the
           current syscall should be restarted. This is changed so that
           do_signal() now also uses PIF_SYSCALL_RESTART. Continuing to use
           PIF_SYSCALL doesn't work with the generic code, and changing it
           to PIF_SYSCALL_RESTART makes PIF_SYSCALL and PIF_SYSCALL_RESTART
           more unique.
      
      - On s390 calling sys_sigreturn or sys_rt_sigreturn is implemented by
      executing a svc instruction on the process stack which causes a fault.
      While handling that fault the fault code sets PIF_SYSCALL to hand over
      processing to the syscall code on exit to usermode.
      
      The patch introduces PIF_SYSCALL_RET_SET, which is set if ptrace sets
      a return value for a syscall. The s390x ptrace ABI uses r2 both for the
      syscall number and return value, so ptrace cannot set the syscall number +
      return value at the same time. The flag makes handling that a bit easier.
      do_syscall() will just skip executing the syscall if PIF_SYSCALL_RET_SET
      is set.
      
      CONFIG_DEBUG_ASCE was removd in favour of the generic CONFIG_DEBUG_ENTRY.
      CR1/7/13 will be checked both on kernel entry and exit to contain the
      correct asces.
      Signed-off-by: NSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      56e62a73
    • H
      s390: update defconfigs · ac94a291
      Heiko Carstens 提交于
      Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: NVasily Gorbik <gor@linux.ibm.com>
      ac94a291
  10. 31 12月, 2020 1 次提交
  11. 16 12月, 2020 1 次提交
    • J
      mm/gup_benchmark: rename to mm/gup_test · 9c84f229
      John Hubbard 提交于
      Patch series "selftests/vm: gup_test, hmm-tests, assorted improvements", v3.
      
      Summary: This series provides two main things, and a number of smaller
      supporting goodies.  The two main points are:
      
      1) Add a new sub-test to gup_test, which in turn is a renamed version
         of gup_benchmark.  This sub-test allows nicer testing of dump_pages(),
         at least on user-space pages.
      
         For quite a while, I was doing a quick hack to gup_test.c whenever I
         wanted to try out changes to dump_page().  Then Matthew Wilcox asked me
         what I meant when I said "I used my dump_page() unit test", and I
         realized that it might be nice to check in a polished up version of
         that.
      
         Details about how it works and how to use it are in the commit
         description for patch #6 ("selftests/vm: gup_test: introduce the
         dump_pages() sub-test").
      
      2) Fixes a limitation of hmm-tests: these tests are incredibly useful,
         but only if people actually build and run them.  And it turns out that
         libhugetlbfs is a little too effective at throwing a wrench in the
         works, there.  So I've added a little configuration check that removes
         just two of the 21 hmm-tests, if libhugetlbfs is not available.
      
         Further details in the commit description of patch #8
         ("selftests/vm: hmm-tests: remove the libhugetlbfs dependency").
      
      Other smaller things that this series does:
      
      a) Remove code duplication by creating gup_test.h.
      
      b) Clear up the sub-test organization, and their invocation within
         run_vmtests.sh.
      
      c) Other minor assorted improvements.
      
      [1] v2 is here:
      https://lore.kernel.org/linux-doc/20200929212747.251804-1-jhubbard@nvidia.com/
      
      [2] https://lore.kernel.org/r/CAHk-=wgh-TMPHLY3jueHX7Y2fWh3D+nMBqVS__AZm6-oorquWA@mail.gmail.com
      
      This patch (of 9):
      
      Rename nearly every "gup_benchmark" reference and file name to "gup_test".
      The one exception is for the actual gup benchmark test itself.
      
      The current code already does a *little* bit more than benchmarking, and
      definitely covers more than get_user_pages_fast().  More importantly,
      however, subsequent patches are about to add some functionality that is
      non-benchmark related.
      
      Closely related changes:
      
      * Kconfig: in addition to renaming the options from GUP_BENCHMARK to
        GUP_TEST, update the help text to reflect that it's no longer a
        benchmark-only test.
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-1-jhubbard@nvidia.com
      Link: https://lkml.kernel.org/r/20201026064021.3545418-2-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c84f229
  12. 03 11月, 2020 1 次提交
  13. 14 9月, 2020 2 次提交
  14. 02 9月, 2020 1 次提交
  15. 02 7月, 2020 1 次提交
  16. 11 3月, 2020 1 次提交
  17. 18 2月, 2020 1 次提交
  18. 04 10月, 2019 1 次提交
  19. 13 9月, 2019 1 次提交
  20. 20 8月, 2019 1 次提交
  21. 30 7月, 2019 1 次提交
  22. 19 6月, 2019 1 次提交
  23. 15 6月, 2019 1 次提交
  24. 07 6月, 2019 1 次提交
  25. 14 5月, 2019 1 次提交
    • M
      s390: move arch/s390/defconfig to arch/s390/configs/defconfig · f3e20ad6
      Masahiro Yamada 提交于
      As of Linux 5.1, alpha and s390 are the last architectures that
      have defconfig in arch/*/ instead of arch/*/configs/.
      
        $ find arch -name defconfig | sort
        arch/alpha/defconfig
        arch/arm64/configs/defconfig
        arch/csky/configs/defconfig
        arch/nds32/configs/defconfig
        arch/riscv/configs/defconfig
        arch/s390/defconfig
      
      The arch/$(ARCH)/defconfig is the hard-coded default in Kconfig,
      and I want to deprecate it after evacuating the remaining defconfig
      into the standard location, arch/*/configs/.
      
      Define KBUILD_DEFCONFIG like other architectures, and move defconfig
      into the configs/ subdirectory.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      f3e20ad6
  26. 29 4月, 2019 1 次提交
  27. 05 11月, 2018 1 次提交
  28. 08 10月, 2018 1 次提交
    • H
      s390/zcrypt: multiple zcrypt device nodes support · 00fab235
      Harald Freudenberger 提交于
      This patch is an extension to the zcrypt device driver to provide,
      support and maintain multiple zcrypt device nodes. The individual
      zcrypt device nodes can be restricted in terms of crypto cards,
      domains and available ioctls. Such a device node can be used as a
      base for container solutions like docker to control and restrict
      the access to crypto resources.
      
      The handling is done with a new sysfs subdir /sys/class/zcrypt.
      Echoing a name (or an empty sting) into the attribute "create" creates
      a new zcrypt device node. In /sys/class/zcrypt a new link will appear
      which points to the sysfs device tree of this new device. The
      attribute files "ioctlmask", "apmask" and "aqmask" in this directory
      are used to customize this new zcrypt device node instance. Finally
      the zcrypt device node can be destroyed by echoing the name into
      /sys/class/zcrypt/destroy. The internal structs holding the device
      info are reference counted - so a destroy will not hard remove a
      device but only marks it as removable when the reference counter drops
      to zero.
      
      The mask values are bitmaps in big endian order starting with bit 0.
      So adapter number 0 is the leftmost bit, mask is 0x8000...  The sysfs
      attributes accept 2 different formats:
      * Absolute hex string starting with 0x like "0x12345678" does set
        the mask starting from left to right. If the given string is shorter
        than the mask it is padded with 0s on the right. If the string is
        longer than the mask an error comes back (EINVAL).
      * Relative format - a concatenation (done with ',') of the
        terms +<bitnr>[-<bitnr>] or -<bitnr>[-<bitnr>]. <bitnr> may be any
        valid number (hex, decimal or octal) in the range 0...255. Here are
        some examples:
          "+0-15,+32,-128,-0xFF"
          "-0-255,+1-16,+0x128"
          "+1,+2,+3,+4,-5,-7-10"
      
      A simple usage examples:
      
        # create new zcrypt device 'my_zcrypt':
        echo "my_zcrypt" >/sys/class/zcrypt/create
        # go into the device dir of this new device
        echo "my_zcrypt" >create
        cd my_zcrypt/
        ls -l
        total 0
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 apmask
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 aqmask
        -r--r--r-- 1 root root 4096 Jul 20 15:23 dev
        -rw-r--r-- 1 root root 4096 Jul 20 15:23 ioctlmask
        lrwxrwxrwx 1 root root    0 Jul 20 15:23 subsystem -> ../../../../class/zcrypt
        ...
        # customize this zcrypt node clone
        # enable only adapter 0 and 2
        echo "0xa0" >apmask
        # enable only domain 6
        echo "+6" >aqmask
        # enable all 256 ioctls
        echo "+0-255" >ioctls
        # now the /dev/my_zcrypt may be used
        # finally destroy it
        echo "my_zcrypt" >/sys/class/zcrypt/destroy
      
      Please note that a very similar 'filtering behavior' also applies to
      the parent z90crypt device. The two mask attributes apmask and aqmask
      in /sys/bus/ap act the very same for the z90crypt device node. However
      the implementation here is totally different as the ap bus acts on
      bind/unbind of queue devices and associated drivers but the effect is
      still the same. So there are two filters active for each additional
      zcrypt device node: The adapter/domain needs to be enabled on the ap
      bus level and it needs to be active on the zcrypt device node level.
      Signed-off-by: NHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      00fab235
  29. 04 9月, 2018 1 次提交
  30. 16 4月, 2018 1 次提交
  31. 16 10月, 2017 1 次提交
  32. 08 6月, 2017 1 次提交
  33. 01 3月, 2017 1 次提交
  34. 23 2月, 2017 1 次提交
  35. 16 1月, 2017 1 次提交
  36. 31 8月, 2016 1 次提交
    • J
      mm/usercopy: get rid of CONFIG_DEBUG_STRICT_USER_COPY_CHECKS · 0d025d27
      Josh Poimboeuf 提交于
      There are three usercopy warnings which are currently being silenced for
      gcc 4.6 and newer:
      
      1) "copy_from_user() buffer size is too small" compile warning/error
      
         This is a static warning which happens when object size and copy size
         are both const, and copy size > object size.  I didn't see any false
         positives for this one.  So the function warning attribute seems to
         be working fine here.
      
         Note this scenario is always a bug and so I think it should be
         changed to *always* be an error, regardless of
         CONFIG_DEBUG_STRICT_USER_COPY_CHECKS.
      
      2) "copy_from_user() buffer size is not provably correct" compile warning
      
         This is another static warning which happens when I enable
         __compiletime_object_size() for new compilers (and
         CONFIG_DEBUG_STRICT_USER_COPY_CHECKS).  It happens when object size
         is const, but copy size is *not*.  In this case there's no way to
         compare the two at build time, so it gives the warning.  (Note the
         warning is a byproduct of the fact that gcc has no way of knowing
         whether the overflow function will be called, so the call isn't dead
         code and the warning attribute is activated.)
      
         So this warning seems to only indicate "this is an unusual pattern,
         maybe you should check it out" rather than "this is a bug".
      
         I get 102(!) of these warnings with allyesconfig and the
         __compiletime_object_size() gcc check removed.  I don't know if there
         are any real bugs hiding in there, but from looking at a small
         sample, I didn't see any.  According to Kees, it does sometimes find
         real bugs.  But the false positive rate seems high.
      
      3) "Buffer overflow detected" runtime warning
      
         This is a runtime warning where object size is const, and copy size >
         object size.
      
      All three warnings (both static and runtime) were completely disabled
      for gcc 4.6 with the following commit:
      
        2fb0815c ("gcc4: disable __compiletime_object_size for GCC 4.6+")
      
      That commit mistakenly assumed that the false positives were caused by a
      gcc bug in __compiletime_object_size().  But in fact,
      __compiletime_object_size() seems to be working fine.  The false
      positives were instead triggered by #2 above.  (Though I don't have an
      explanation for why the warnings supposedly only started showing up in
      gcc 4.6.)
      
      So remove warning #2 to get rid of all the false positives, and re-enable
      warnings #1 and #3 by reverting the above commit.
      
      Furthermore, since #1 is a real bug which is detected at compile time,
      upgrade it to always be an error.
      
      Having done all that, CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is no longer
      needed.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: "H . Peter Anvin" <hpa@zytor.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Byungchul Park <byungchul.park@lge.com>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0d025d27