1. 02 9月, 2021 1 次提交
    • N
      x86/setup: Explicitly include acpi.h · ea7b4244
      Nathan Chancellor 提交于
      After commit 342f43af ("iscsi_ibft: fix crash due to KASLR physical
      memory remapping") x86_64_defconfig shows the following errors:
      
        arch/x86/kernel/setup.c: In function ‘setup_arch’:
        arch/x86/kernel/setup.c:916:13: error: implicit declaration of function ‘acpi_mps_check’ [-Werror=implicit-function-declaration]
          916 |         if (acpi_mps_check()) {
              |             ^~~~~~~~~~~~~~
        arch/x86/kernel/setup.c:1110:9: error: implicit declaration of function ‘acpi_table_upgrade’ [-Werror=implicit-function-declaration]
         1110 |         acpi_table_upgrade();
              |         ^~~~~~~~~~~~~~~~~~
        [... more acpi noise ...]
      
      acpi.h was being implicitly included from iscsi_ibft.h in this
      configuration so the removal of that header means these functions have
      no definition or declaration.
      
      In most other configurations, <linux/acpi.h> continued to be included
      through at least <linux/tboot.h> if CONFIG_INTEL_TXT was enabled, and
      there were probably other implicit include paths too.
      
      Add acpi.h explicitly so there is no more error, and so that we don't
      continue to depend on these unreliable implicit include paths.
      Tested-by: NMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: NNathan Chancellor <nathan@kernel.org>
      Cc: Maurizio Lombardi <mlombard@redhat.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea7b4244
  2. 30 8月, 2021 3 次提交
    • H
      s390: remove SCHED_CORE from defconfigs · 92793224
      Heiko Carstens 提交于
      This causes too many problems. Enable it again when everything has
      been sorted out.
      Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
      92793224
    • A
      ixp4xx_eth: make ptp support a platform driver · 9055a2f5
      Arnd Bergmann 提交于
      After the recent ixp4xx cleanups, the ptp driver has gained a
      build failure in some configurations:
      
      drivers/net/ethernet/xscale/ptp_ixp46x.c: In function 'ptp_ixp_init':
      drivers/net/ethernet/xscale/ptp_ixp46x.c:290:51: error: 'IXP4XX_TIMESYNC_BASE_VIRT' undeclared (first use in this function)
      
      Avoid the last bit of hardcoded constants from platform headers
      by turning the ptp driver bit into a platform driver and passing
      the IRQ and MMIO address as resources.
      
      This is a bit tricky:
      
      - The interface between the two drivers is now the new
        ixp46x_ptp_find() function, replacing the global
        ixp46x_phc_index variable. The call is done as late
        as possible, in hwtstamp_set(), to ensure that the
        ptp device is fully probed.
      
      - As the ptp driver is now called by the network driver, the
        link dependency is reversed, which in turn requires a small
        Makefile hack
      
      - The GPIO number is still left hardcoded. This is clearly not
        great, but it can be addressed later. Note that commit 98ac0cc2
        ("ARM: ixp4xx: Convert to MULTI_IRQ_HANDLER") changed the
        IRQ number to something meaningless. Passing the correct IRQ
        in a resource fixes this.
      
      - When the PTP driver is disabled, ethtool .get_ts_info()
        now correctly lists only software timestamping regardless
        of the hardware.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      [Fix a missing include]
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9055a2f5
    • H
      Revert "parisc: Add assembly implementations for memset, strlen, strcpy, strncpy and strcat" · f6a3308d
      Helge Deller 提交于
      This reverts commit 83af58f8.
      
      It turns out that at least the assembly implementation for strncpy() was
      buggy.  Revert the whole commit and return back to the default coding.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      Cc: <stable@vger.kernel.org> # v5.4+
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f6a3308d
  3. 28 8月, 2021 1 次提交
  4. 27 8月, 2021 7 次提交
    • J
      um: vector: adjust to coalesce API changes · 4baf0e0b
      Johannes Berg 提交于
      The API changes were propagated to most drivers, but clearly
      arch/um/drivers/ was missed, perhaps due to looking only at
      the drivers/ folder. Fix that.
      
      Fixes: f3ccfda1 ("ethtool: extend coalesce setting uAPI with CQE mode")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Link: https://lore.kernel.org/r/20210827094759.f3ab06684bd0.I985181cc00fe017cfe6413d9e1bb720cbe852e6d@changeidSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      4baf0e0b
    • S
      crypto: aesni - xts_crypt() return if walk.nbytes is 0 · 72ff2bf0
      Shreyansh Chouhan 提交于
      xts_crypt() code doesn't call kernel_fpu_end() after calling
      kernel_fpu_begin() if walk.nbytes is 0. The correct behavior should be
      not calling kernel_fpu_begin() if walk.nbytes is 0.
      
      Reported-by: syzbot+20191dc583eff8602d2d@syzkaller.appspotmail.com
      Signed-off-by: NShreyansh Chouhan <chouhan.shreyansh630@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      72ff2bf0
    • T
      crypto: x86/sm4 - add AES-NI/AVX2/x86_64 implementation · 5b2efa2b
      Tianjia Zhang 提交于
      Like the implementation of AESNI/AVX, this patch adds an accelerated
      implementation of AESNI/AVX2. In terms of code implementation, by
      reusing AESNI/AVX mode-related codes, the amount of code is greatly
      reduced. From the benchmark data, it can be seen that when the block
      size is 1024, compared to AVX acceleration, the performance achieved
      by AVX2 has increased by about 70%, it is also 7.7 times of the pure
      software implementation of sm4-generic.
      
      The main algorithm implementation comes from SM4 AES-NI work by
      libgcrypt and Markku-Juhani O. Saarinen at:
      https://github.com/mjosaarinen/sm4ni
      
      This optimization supports the four modes of SM4, ECB, CBC, CFB,
      and CTR. Since CBC and CFB do not support multiple block parallel
      encryption, the optimization effect is not obvious.
      
      Benchmark on Intel i5-6200U 2.30GHz, performance data of three
      implementation methods, pure software sm4-generic, aesni/avx
      acceleration, and aesni/avx2 acceleration, the data comes from
      the 218 mode and 518 mode of tcrypt. The abscissas are blocks of
      different lengths. The data is tabulated and the unit is Mb/s:
      
      block-size  |    16      64     128     256    1024    1420    4096
      sm4-generic
          ECB enc | 60.94   70.41   72.27   73.02   73.87   73.58   73.59
          ECB dec | 61.87   70.53   72.15   73.09   73.89   73.92   73.86
          CBC enc | 56.71   66.31   68.05   69.84   70.02   70.12   70.24
          CBC dec | 54.54   65.91   68.22   69.51   70.63   70.79   70.82
          CFB enc | 57.21   67.24   69.10   70.25   70.73   70.52   71.42
          CFB dec | 57.22   64.74   66.31   67.24   67.40   67.64   67.58
          CTR enc | 59.47   68.64   69.91   71.02   71.86   71.61   71.95
          CTR dec | 59.94   68.77   69.95   71.00   71.84   71.55   71.95
      sm4-aesni-avx
          ECB enc | 44.95  177.35  292.06  316.98  339.48  322.27  330.59
          ECB dec | 45.28  178.66  292.31  317.52  339.59  322.52  331.16
          CBC enc | 57.75   67.68   69.72   70.60   71.48   71.63   71.74
          CBC dec | 44.32  176.83  284.32  307.24  328.61  312.61  325.82
          CFB enc | 57.81   67.64   69.63   70.55   71.40   71.35   71.70
          CFB dec | 43.14  167.78  282.03  307.20  328.35  318.24  325.95
          CTR enc | 42.35  163.32  279.11  302.93  320.86  310.56  317.93
          CTR dec | 42.39  162.81  278.49  302.37  321.11  310.33  318.37
      sm4-aesni-avx2
          ECB enc | 45.19  177.41  292.42  316.12  339.90  322.53  330.54
          ECB dec | 44.83  178.90  291.45  317.31  339.85  322.55  331.07
          CBC enc | 57.66   67.62   69.73   70.55   71.58   71.66   71.77
          CBC dec | 44.34  176.86  286.10  501.68  559.58  483.87  527.46
          CFB enc | 57.43   67.60   69.61   70.52   71.43   71.28   71.65
          CFB dec | 43.12  167.75  268.09  499.33  558.35  490.36  524.73
          CTR enc | 42.42  163.39  256.17  493.95  552.45  481.58  517.19
          CTR dec | 42.49  163.11  256.36  493.34  552.62  481.49  516.83
      Signed-off-by: NTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      5b2efa2b
    • T
      crypto: x86/sm4 - export reusable AESNI/AVX functions · de79d9aa
      Tianjia Zhang 提交于
      Export the reusable functions in the SM4 AESNI/AVX implementation,
      mainly public functions, which are used to develop the SM4 AESNI/AVX2
      implementation, and eliminate unnecessary duplication of code.
      
      At the same time, in order to make the public function universal,
      minor fixes was added.
      Signed-off-by: NTianjia Zhang <tianjia.zhang@linux.alibaba.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      de79d9aa
    • A
      s390/smp: do not use nodat_stack for secondary CPU start · d6be5d0a
      Alexander Gordeev 提交于
      The secondary CPU start C routine uses nodat_stack as a
      interim stack before finally switching to kernel_stack.
      Such scheme is superfluous, since the assembler restart
      interrupt handler (that secondary CPU starter is called
      from) does not need to use any stack for switching into
      DAT mode. Once DAT is on, any stack including virtually-
      mapped one could be used.
      
      Avoid the use of nodat_stack and smp_start_secondary()
      helper. Instead, initiate kernel_stack directly from
      the restart interrupt handler.
      Signed-off-by: NAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
      d6be5d0a
    • A
      s390/smp: enable DAT before CPU restart callback is called · 915fea04
      Alexander Gordeev 提交于
      The restart interrupt is triggered whenever a secondary CPU is
      brought online, a remote function call dispatched from another
      CPU or a manual PSW restart is initiated and causes the system
      to kdump. The handling routine is always called with DAT turned
      off. It then initializes the stack frame and invokes a callback.
      
      The existing callbacks handle DAT as follows:
      
        * __do_restart() and __machine_kexec() turn in on upon entry;
        * __ipl_run(), __reipl_run() and __dump_run() do not turn it
          right away, but all of them call diag308() - which turns DAT
          on, but only if kasan is enabled;
      
      In addition to the described complexity all callbacks (and the
      functions they call) should avoid kasan instrumentation while
      DAT is off.
      
      This update enables DAT in the assembler restart handler and
      relieves any callbacks (which are mostly C functions) from
      dealing with DAT altogether.
      
      There are four types of CPU restart that initialize control
      registers in different ways:
      
        1. Start of secondary CPU on boot - control registers are
           inherited from the IPL CPU;
        2. Restart of online CPU - control registers of the CPU being
           restarted are kept;
        3. Hotplug of offline CPU - control registers are inherited
           from the starting CPU;
        4. Start of offline CPU triggered by manual PSW restart -
           the control registers are read from the absolute lowcore
           and contain the boot time IPL CPU values updated with all
           follow-up calls of smp_ctl_set_bit() and smp_ctl_clear_bit()
           routines;
      
      In first three cases contents of the control registers is the
      most recent. In the latter case control registers are good
      enough to facilitate successful completion of kdump operation.
      Suggested-by: NHeiko Carstens <hca@linux.ibm.com>
      Signed-off-by: NAlexander Gordeev <agordeev@linux.ibm.com>
      Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
      915fea04
    • H
      s390: update defconfigs · e7dc78d3
      Heiko Carstens 提交于
      Ingo Franzki reported that our defconfig and debug_config went out of
      sync with respect to DM_INTEGRITY. Fix it.
      Reported-by: NIngo Franzki <ifranzki@linux.ibm.com>
      Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
      e7dc78d3
  5. 26 8月, 2021 16 次提交
  6. 25 8月, 2021 12 次提交