1. 20 Nov, 2020 10 commits
    • Vasily Gorbik's avatar
      s390/decompressor: add stacktrace support · 8977ab65
      Vasily Gorbik authored
      Decompressor works on a single statically allocated stack. Stacktrace
      implementation with -mbackchain just takes few lines of code.
      
      Linux version 5.10.0-rc3-22793-g0f84a355b776-dirty (gor@tuxmaker) #27 SMP PREEMPT Mon Nov 9 17:30:18 CET 2020
      Kernel fault: interruption code 0005 ilc:2
      PSW : 0000000180000000 0000000000012f92 (parse_boot_command_line+0x27a/0x46c)
            R:0 T:0 IO:0 EX:0 Key:0 M:0 W:0 P:0 AS:0 CC:0 PM:0 RI:0 EA:3
      GPRS: 0000000000000000 00ffffffffffffff 0000000000000000 000000000001a62c
            000000000000bf60 0000000000000000 00000000000003c0 0000000000000000
            0000000000000080 000000000002322d 000000007f29ef20 0000000000efd018
            000000000311c000 0000000000010070 0000000000012f82 000000000000bea8
      Call Trace:
      (sp:000000000000bea8 [<000000000002016e>] 000000000002016e)
       sp:000000000000bf18 [<0000000000012408>] startup_kernel+0x88/0x2fc
       sp:000000000000bf60 [<00000000000100c4>] startup_normal+0xb0/0xb0
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      8977ab65
    • Vasily Gorbik's avatar
      s390/decompressor: add symbols support · 24621896
      Vasily Gorbik authored
      Information printed by print_pgm_check_info() is crucial for
      debugging decompressor problems. Printing instruction addresses is
      better than nothing, but turns further debugging into tedious job of
      figuring out which function those addresses correspond to.
      
      This change adds simplistic symbols resolution support. And adds %pS
      format specifier support to decompressor_printk().
      
      Decompressor symbols list is extracted and sorted with
      nm -n -S:
      ...
      0000000000010000 0000000000000014 T startup
      0000000000010014 00000000000000b0 t startup_normal
      0000000000010180 00000000000000b2 t startup_kdump
      ...
      
      Then functions are filtered and contracted to a form:
      "10000 14 startup\0""10014 b0 startup_normal\0""10180 b2 startup_kdump\0"
      ...
      Which makes it trivial to find beginning of an entry and names are 0
      terminated, so could be used as is. Symbols are binary-searched.
      
      To get symbols list with final addresses and then get it into the
      decompressor's image the same trick as for kallsyms is used.
      Decompressor's vmlinux is linked twice.
      
      Symbols are stored in .decompressor.syms section, current size is about
      2kb.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      24621896
    • Vasily Gorbik's avatar
      s390/decompressor: correct some asm symbols annotations · ec55d1e1
      Vasily Gorbik authored
      Use SYM_CODE_* annotations for asm functions, so that function lengths
      are recognized correctly.
      
      Also currently the most part of startup is marked as startup_kdump. Move
      misplaced startup_kdump where it belongs.
      
      $ nm -n -S arch/s390/boot/compressed/vmlinux
      Before:
      0000000000010000 T startup
      0000000000010010 T startup_kdump
      After:
      0000000000010000 0000000000000014 T startup
      0000000000010014 00000000000000b0 t startup_normal
      0000000000010180 00000000000000b2 t startup_kdump
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      ec55d1e1
    • Vasily Gorbik's avatar
      s390/decompressor: add decompressor_printk · 9a78c70a
      Vasily Gorbik authored
      The decompressor does not have any special debug means. Running the
      kernel under qemu with gdb is helpful but tedious exercise if done
      repeatedly. It is also not applicable to debugging under LPAR and z/VM.
      
      One special thing which stands out is a working sclp_early_printk,
      which could be used once the kernel switches to 64-bit addressing mode.
      
      But sclp_early_printk does not provide any string formating capabilities.
      Formatting and printing string without printk-alike function is a
      not fun. The lack of printk-alike function means people would save up on
      testing and introduce more bugs.
      
      So, finally, provide decompressor_printk function, which fits on one
      screen and trades features for simplicity.
      
      It only supports "%s", "%x" and "%lx" specifiers and zero padding for
      hex values.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      9a78c70a
    • Vasily Gorbik's avatar
      s390/ftrace: assume -mhotpatch or -mrecord-mcount always available · c9343637
      Vasily Gorbik authored
      Currently the kernel minimal compiler requirement is gcc 4.9 or
      clang 10.0.1.
      * gcc -mhotpatch option is supported since 4.8.
      * A combination of -pg -mrecord-mcount -mnop-mcount -mfentry flags is
      supported since gcc 9 and since clang 10.
      
      Drop support for old -pg function prologues. Which leaves binary
      compatible -mhotpatch / -mnop-mcount -mfentry prologues in a form:
      	brcl	0,0
      Which are also do not require initial nop optimization / conversion and
      presence of _mcount symbol.
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      c9343637
    • Vasily Gorbik's avatar
      s390: unify identity mapping limits handling · 73045a08
      Vasily Gorbik authored
      Currently we have to consider too many different values which
      in the end only affect identity mapping size. These are:
      1. max_physmem_end - end of physical memory online or standby.
         Always <= end of the last online memory block (get_mem_detect_end()).
      2. CONFIG_MAX_PHYSMEM_BITS - the maximum size of physical memory the
         kernel is able to support.
      3. "mem=" kernel command line option which limits physical memory usage.
      4. OLDMEM_BASE which is a kdump memory limit when the kernel is executed as
         crash kernel.
      5. "hsa" size which is a memory limit when the kernel is executed during
         zfcp/nvme dump.
      
      Through out kernel startup and run we juggle all those values at once
      but that does not bring any amusement, only confusion and complexity.
      
      Unify all those values to a single one we should really care, that is
      our identity mapping size.
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      73045a08
    • Julian Wiedmann's avatar
      s390/prng: let misc_register() add the prng sysfs attributes · 1e632eaa
      Julian Wiedmann authored
      Instead of creating the sysfs attributes for the prng devices by hand,
      describe them in .groups and let the misdevice core handle it.
      
      This also ensures that the attributes are available when the KOBJ_ADD
      event is raised.
      Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
      Reviewed-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      1e632eaa
    • Mauro Carvalho Chehab's avatar
      s390/cio: fix kernel-doc markups in cio driver. · 5ec11d09
      Mauro Carvalho Chehab authored
      Fix typo in the kernel-doc markups
      	1. ccw driver -> ccw_driver
      	2. ccw_device_id_is_equal() -> ccw_dev_id_is_equal
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      [vneethv@linux.ibm.com: slight modification in the changelog]
      Reviewed-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      5ec11d09
    • Heiko Carstens's avatar
      s390: add separate program check exit path · 0cd9b723
      Heiko Carstens authored
      System call and program check handler both use the system call exit
      path when returning to previous context. However the program check
      handler jumps right to the end of the system call exit path if the
      previous context is kernel context.
      
      This lead to the quite odd double disabling of interrupts in the
      system call exit path introduced with commit ce9dfafe ("s390:
      fix system call exit path").
      
      To avoid that have a separate program check handler exit path if the
      previous context is kernel context.
      Reviewed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      0cd9b723
    • Heiko Carstens's avatar
      Merge branch 'fixes' into features · 6c816038
      Heiko Carstens authored
      * fixes:
        s390/cpum_sf.c: fix file permission for cpum_sfb_size
        s390: update defconfigs
        s390: fix system call exit path
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      6c816038
  2. 18 Nov, 2020 4 commits
  3. 12 Nov, 2020 3 commits
  4. 09 Nov, 2020 19 commits
    • Harald Freudenberger's avatar
      s390/zcrypt/pkey: introduce zcrypt_wait_api_operational() function · 43cb5a7c
      Harald Freudenberger authored
      The zcrypt api provides a new function to wait until the zcrypt
      api is operational:
      
        int zcrypt_wait_api_operational(void);
      
      The AP bus scan and the binding of ap devices to device drivers is
      an asynchronous job. This function waits until these initial jobs
      are done and so the zcrypt api should be ready to serve crypto
      requests - if there are resources available. The function uses an
      internal timeout of 60s. The very first caller will either wait for
      ap bus bindings complete or the timeout happens. This state will be
      remembered for further callers which will only be blocked until a
      decision is made (timeout or bindings complete).
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      43cb5a7c
    • Harald Freudenberger's avatar
      s390/ap: ap bus userspace notifications for some bus conditions · 837cd105
      Harald Freudenberger authored
      This patch adds notifications to userspace for two important
      conditions of the ap bus:
      
      I) Initial ap bus scan done. This indicates that the initial
         scan of all the ap devices (cards, queues) is complete and
         ap devices have been build up for all the hardware found.
         This condition is signaled with
         1) An ap bus change uevent send to userspace with an environment
            key/value pair "INITSCAN=done":
      	# udevadm monitor -k -p
      	...
      	KERNEL[97.830919] change   /devices/ap (ap)
      	ACTION=change
      	DEVPATH=/devices/ap
      	SUBSYSTEM=ap
      	INITSCAN=done
      	SEQNUM=10421
         2) A sysfs attribute /sys/bus/ap/scans which shows the
            number of completed ap bus scans done since bus init.
            So a value of 1 or greater signals that the initial
            ap bus scan is complete.
         Note: The initial ap bus scan complete condition is fulfilled
         and will be signaled even if there was no ap resource found.
      
      II) APQN driver bindings complete. This indicates that all
          APQNs have been bound to an zcrypt or alternate device
          driver. Only with the help of an device driver an APQN
          can be used for crypto load. So the binding complete
          condition is the starting point for user space to be
          sure all crypto resources on the ap bus are available
          for use.
          This condition is signaled with
          1) An ap bus change uevent send to userspace with an environment
             key/value pair "BINDINGS=complete":
      	 # udevadm monitor -k -p
      	 ...
      	 KERNEL[97.830975] change   /devices/ap (ap)
      	 ACTION=change
      	 DEVPATH=/devices/ap
      	 SUBSYSTEM=ap
      	 BINDINGS=complete
      	 SEQNUM=10422
          2) A sysfs attribute /sys/bus/ap/bindings showing
      	 "<nr of bound apqns>/<total nr of apqns> (complete)"
             when all available apqns have been bound to device drivers, or
      	 "<nr of bound apqns>/<total nr of apqns>"
             when there are some apqns not bound to an device driver.
          Note: The binding complete condition is also fulfilled, when
          there are no apqns available to bind any device driver. In
          this case the binding complete will be signaled AFTER init
          scan is done.
          Note: This condition may arise multiple times when after
          initial scan modifications on the bindings take place. For
          example a manual unbind of an APQN switches the binding
          complete condition off. When at a later time the unbound APQNs
          are bound with an device driver the binding is (again) complete
          resulting in another uevent and marking the bindings sysfs
          attribute with '(complete)'.
      
      There is also a new function to be used within the kernel:
      
        int ap_wait_init_apqn_bindings_complete(unsigned long timeout)
      
      Interface to wait for the AP bus to have done one initial ap bus
      scan and all detected APQNs have been bound to device drivers.
      If these both conditions are not fulfilled, this function blocks
      on a condition with wait_for_completion_interruptible_timeout().
      If these both conditions are fulfilled (before the timeout hits)
      the return value is 0. If the timeout (in jiffies) hits instead
      -ETIME is returned. On failures negative return values are
      returned to the caller. Please note that further unbind/bind
      actions after initial binding complete is through do not cause this
      function to block again.
      Reviewed-by: default avatarIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      837cd105
    • Christian Borntraeger's avatar
      s390/trng: set quality to 1024 · d041315e
      Christian Borntraeger authored
      The s390-trng does provide 100% entropy. The quality value is supported
      to be between 1 and 1024 and not 1..1000.  Use 1024 to make this driver
      the preferred one. If we ever have a better driver that has the same
      quality but is faster we can change this again when merging the new
      driver. No need to be conservative.
      
      This makes sure that the hw variant is preferred over things like
      virtio-rng, where the hypervisor has a potential to be misconfigured
      and thus should have a slightly lower confidence.
      
      Cc: Harald Freudenberger <freude@linux.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      d041315e
    • Daniel Vetter's avatar
      s390/pci: remove races against pte updates · a67a88b0
      Daniel Vetter authored
      Way back it was a reasonable assumptions that iomem mappings never
      change the pfn range they point at. But this has changed:
      
      - gpu drivers dynamically manage their memory nowadays, invalidating
      ptes with unmap_mapping_range when buffers get moved
      
      - contiguous dma allocations have moved from dedicated carvetouts to
      cma regions. This means if we miss the unmap the pfn might contain
      pagecache or anon memory (well anything allocated with GFP_MOVEABLE)
      
      - even /dev/mem now invalidates mappings when the kernel requests that
      iomem region when CONFIG_IO_STRICT_DEVMEM is set, see
      commit 3234ac66 ("/dev/mem: Revoke mappings when a driver claims the
      region")
      
      Accessing pfns obtained from ptes without holding all the locks is
      therefore no longer a good idea. Fix this.
      
      Since zpci_memcpy_from|toio seems to not do anything nefarious with
      locks we just need to open code get_pfn and follow_pfn and make sure
      we drop the locks only after we're done. The write function also needs
      the copy_from_user move, since we can't take userspace faults while
      holding the mmap sem.
      Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Cc: linux-mm@kvack.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: linux-media@vger.kernel.org
      Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
      Cc: linux-s390@vger.kernel.org
      Cc: Niklas Schnelle <schnelle@linux.ibm.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarNiklas Schnelle <schnelle@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a67a88b0
    • Vasily Gorbik's avatar
      s390/early: rewrite program parameter setup in C · d7e7fbba
      Vasily Gorbik authored
      And move it earlier in the decompressor.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      d7e7fbba
    • Vasily Gorbik's avatar
      s390/kasan: move memory needs estimation into a function · 0c4ec024
      Vasily Gorbik authored
      Also correct rounding downs in estimation calculations.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      0c4ec024
    • Vasily Gorbik's avatar
      s390/kasan: make kasan header self-contained · e385b550
      Vasily Gorbik authored
      It is relying on _REGION1_SHIFT / _REGION2_SHIFT values which come from
      asm/pgtable.h, so include it.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      e385b550
    • Vasily Gorbik's avatar
      s390/kasan: remove obvious parameter with the only possible value · 54b52981
      Vasily Gorbik authored
      Kasan early code is only working on init_mm, remove unneeded pgd
      parameter from kasan_copy_shadow and rename it to
      kasan_copy_shadow_mapping.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      54b52981
    • Vasily Gorbik's avatar
      s390/kasan: avoid confusing naming · 92bca2fe
      Vasily Gorbik authored
      Kasan has nothing to do with vmemmap, strip vmemmap from function names
      to avoid confusing people.
      Reviewed-by: default avatarAlexander Egorenkov <egorenar@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      92bca2fe
    • Vasily Gorbik's avatar
      s390/decompressor: fix build warning · 39f2899b
      Vasily Gorbik authored
      Fixes the following warning with CONFIG_KERNEL_UNCOMPRESSED=y
      
      arch/s390/boot/compressed/decompressor.h:6:46: warning: non-void function
      does not return a value [-Wreturn-type]
      static inline void *decompress_kernel(void) {}
                                                   ^
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      39f2899b
    • Heiko Carstens's avatar
      s390/mm: let vmalloc area size depend on physical memory size · 90178c19
      Heiko Carstens authored
      To make sure that the vmalloc area size is for almost all cases large
      enough let it depend on the (potential) physical memory size. There is
      still the possibility to override this with the vmalloc kernel command
      line parameter.
      Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
      Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      90178c19
    • Heiko Carstens's avatar
      s390/mm: extend default vmalloc area size to 512GB · fc67c880
      Heiko Carstens authored
      We've seen several occurences in the past where the default vmalloc
      size of 128GB is not sufficient. Therefore extend the default size.
      Reviewed-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
      Reviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      fc67c880
    • Vasily Gorbik's avatar
      s390: make sure vmemmap is top region table entry aligned · 97b142b7
      Vasily Gorbik authored
      Since commit 29d37e5b ("s390/protvirt: add ultravisor initialization")
      vmax is adjusted to the ultravisor secure storage limit. This limit is
      currently applied when 4-level paging is used. Later vmax is also used
      to align vmemmap address to the top region table entry border. When vmax
      is set to the ultravisor secure storage limit this is no longer the case.
      
      Instead of changing vmax, make only MODULES_END be affected by the
      secure storage limit, so that vmax stays intact for further vmemmap
      address alignment.
      Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      97b142b7
    • Vasily Gorbik's avatar
      s390/kasan: remove 3-level paging support · a3453d92
      Vasily Gorbik authored
      Compiling the kernel with Kasan disables automatic 3-level vs 4-level
      kernel space paging selection, because the shadow memory offset has
      to be known at compile time and there is no such offset which would be
      acceptable for both 3 and 4-level paging. Instead S390_4_LEVEL_PAGING
      option was introduced which allowed to pick how many paging levels to
      use under Kasan.
      
      With the introduction of protected virtualization, kernel memory layout
      may be affected due to ultravisor secure storage limit. This adds
      additional complexity into how memory layout would look like in
      combination with Kasan predefined shadow memory offsets. To simplify
      this make Kasan 4-level paging default and remove Kasan 3-level paging
      support.
      Suggested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Reviewed-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      a3453d92
    • Vasily Gorbik's avatar
      s390: remove unused s390_base_ext_handler · f38b0a74
      Vasily Gorbik authored
      s390_base_ext_handler_fn haven't been used since its introduction in
      commit ab14de6c ("[S390] Convert memory detection into C code.").
      
      s390_base_ext_handler itself is currently falsely storing 16 registers
      at __LC_SAVE_AREA_ASYNC rewriting several following lowcore values:
      cpu_flags, return_psw, return_mcck_psw, sync_enter_timer and
      async_enter_timer.
      
      Besides that s390_base_ext_handler itself is only potentially hiding
      EXT interrupts which should not have happen in the first place. Any
      piece of code which requires EXT interrupts before fully functional
      ext_int_handler is enabled has to do it on its own, like this is done
      by sclp_early_cmd() which is doing EXT interrupts handling synchronously
      in sclp_early_wait_irq().
      
      With s390_base_ext_handler removed unexpected EXT interrupt leads
      to disabled wait with the address 0x1b0 (__LC_EXT_NEW_PSW), which is
      currently setup in the decompressor.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      f38b0a74
    • Vasily Gorbik's avatar
      s390/udelay: make it work for the early code · 85cde019
      Vasily Gorbik authored
      Currently udelay relies on working EXT interrupts handler, which is not
      the case during early startup. In such cases udelay_simple() has to be
      used instead.
      
      To avoid mistakes of calling udelay too early, which could happen from
      the common code as well - make udelay work for the early code by
      introducing static branch and redirecting all udelay calls to
      udelay_simple until EXT interrupts handler is fully initialized and
      async stack is allocated.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      85cde019
    • Vasily Gorbik's avatar
      s390/head: set io/ext handlers to disabled wait · 13b5bd8a
      Vasily Gorbik authored
      Set io/ext handlers to disabled wait in the initial lowcore, so that they
      are effective right from the kernel start, when a boot method used does
      not rewrite this part of the lowcore for its own needs (i.e. kexec, z/vm
      ipl reader boot, qemu direct boot, load from removable media or server).
      
      When the kernel is loaded by zipl, scsi loader or qemu loader, some or
      all of the io/ext/pgm handlers addresses might be rewritten. Rewrite them
      to initial values again as early as possible.
      Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      13b5bd8a
    • Heiko Carstens's avatar
      s390: fix system call exit path · ce9dfafe
      Heiko Carstens authored
      The system call exit path is running with interrupts enabled while
      checking for TIF/PIF/CIF bits which require special handling. If all
      bits have been checked interrupts are disabled and the kernel exits to
      user space.
      The problem is that after checking all bits and before interrupts are
      disabled bits can be set already again, due to interrupt handling.
      
      This means that the kernel can exit to user space with some
      TIF/PIF/CIF bits set, which should never happen. E.g. TIF_NEED_RESCHED
      might be set, which might lead to additional latencies, since that bit
      will only be recognized with next exit to user space.
      
      Fix this by checking the corresponding bits only when interrupts are
      disabled.
      
      Fixes: 0b0ed657 ("s390: remove critical section cleanup from entry.S")
      Cc: <stable@vger.kernel.org> # 5.8
      Acked-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      ce9dfafe
    • Linus Torvalds's avatar
      Linux 5.10-rc3 · f8394f23
      Linus Torvalds authored
      f8394f23
  5. 08 Nov, 2020 4 commits
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.10-rc3' of... · 15f5d201
      Linus Torvalds authored
      Merge tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core documentation fixes from Greg KH:
       "Some small Documentation fixes that were fallout from the larger
        documentation update we did in 5.10-rc2.
      
        Nothing major here at all, but all of these have been in linux-next
        and resolve build warnings when building the documentation files"
      
      * tag 'driver-core-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        Documentation: remove mic/index from misc-devices/index.rst
        scripts: get_api.pl: Add sub-titles to ABI output
        scripts: get_abi.pl: Don't let ABI files to create subtitles
        docs: leds: index.rst: add a missing file
        docs: ABI: sysfs-class-net: fix a typo
        docs: ABI: sysfs-driver-dma-ioatdma: what starts with /sys
      15f5d201
    • Linus Torvalds's avatar
      Merge tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · bbc82184
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are a small number of small tty and serial fixes for some
        reported problems for the tty core, vt code, and some serial drivers.
      
        They include fixes for:
      
         - a buggy and obsolete vt font ioctl removal
      
         - 8250_mtk serial baudrate runtime warnings
      
         - imx serial earlycon build configuration fix
      
         - txx9 serial driver error path cleanup issues
      
         - tty core fix in release_tty that can be triggered by trying to bind
           an invalid serial port name to a speakup console device
      
        Almost all of these have been in linux-next without any problems, the
        only one that hasn't, just deletes code :)"
      
      * tag 'tty-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Disable KD_FONT_OP_COPY
        tty: fix crash in release_tty if tty->port is not set
        serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
        tty: serial: imx: enable earlycon by default if IMX_SERIAL_CONSOLE is enabled
        serial: 8250_mtk: Fix uart_get_baud_rate warning
      bbc82184
    • Linus Torvalds's avatar
      Merge tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · df53b815
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes and new device ids:
      
         - USB gadget fixes for some reported issues
      
         - Fixes for the ever-troublesome apple fastcharge driver, hopefully
           we finally have it right.
      
         - More USB core quirks for odd devices
      
         - USB serial driver fixes for some long-standing issues that were
           recently found
      
         - some new USB serial driver device ids
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: apple-mfi-fastcharge: fix reference leak in apple_mfi_fc_set_property
        usb: mtu3: fix panic in mtu3_gadget_stop()
        USB: serial: option: add Telit FN980 composition 0x1055
        USB: serial: option: add LE910Cx compositions 0x1203, 0x1230, 0x1231
        USB: serial: cyberjack: fix write-URB completion race
        USB: Add NO_LPM quirk for Kingston flash drive
        USB: serial: option: add Quectel EC200T module support
        usb: raw-gadget: fix memory leak in gadget_setup
        usb: dwc2: Avoid leaving the error_debugfs label unused
        usb: dwc3: ep0: Fix delay status handling
        usb: gadget: fsl: fix null pointer checking
        usb: gadget: goku_udc: fix potential crashes in probe
        usb: dwc3: pci: add support for the Intel Alder Lake-S
      df53b815
    • Eddy Wu's avatar
      fork: fix copy_process(CLONE_PARENT) race with the exiting ->real_parent · b4e00444
      Eddy Wu authored
      current->group_leader->exit_signal may change during copy_process() if
      current->real_parent exits.
      
      Move the assignment inside tasklist_lock to avoid the race.
      Signed-off-by: default avatarEddy Wu <eddy_wu@trendmicro.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b4e00444