Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jul 2020 16:36:03 +0000 (09:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 31 Jul 2020 16:36:03 +0000 (09:36 -0700)
Pull arm64 fixes from Will Deacon:
 "The main one is to fix the build after Willy's per-cpu entropy changes
  this week. Although that was already resolved elsewhere, the arm64 fix
  here is useful cleanup anyway.

  Other than that, we've got a fix for building with Clang's integrated
  assembler and a fix to make our IPv4 checksumming robust against
  invalid header lengths (this only seems to be triggerable by injected
  errors).

   - Fix build breakage due to circular headers

   - Fix build regression when using Clang's integrated assembler

   - Fix IPv4 header checksum code to deal with invalid length field

   - Fix broken path for Arm PMU entry in MAINTAINERS"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  MAINTAINERS: Include drivers subdirs for ARM PMU PROFILING AND DEBUGGING entry
  arm64: csum: Fix handling of bad packets
  arm64: Drop unnecessary include from asm/smp.h
  arm64/alternatives: move length validation inside the subsection

MAINTAINERS
arch/arm64/include/asm/alternative.h
arch/arm64/include/asm/checksum.h
arch/arm64/include/asm/smp.h

index f0569cf..b8d6c55 100644 (file)
@@ -1425,7 +1425,7 @@ F:        arch/arm*/include/asm/perf_event.h
 F:     arch/arm*/kernel/hw_breakpoint.c
 F:     arch/arm*/kernel/perf_*
 F:     arch/arm/oprofile/common.c
-F:     drivers/perf/*
+F:     drivers/perf/
 F:     include/linux/perf/arm_pmu.h
 
 ARM PORT
index 12f0eb5..619db9b 100644 (file)
@@ -77,9 +77,9 @@ static inline void apply_alternatives_module(void *start, size_t length) { }
        "663:\n\t"                                                      \
        newinstr "\n"                                                   \
        "664:\n\t"                                                      \
-       ".previous\n\t"                                                 \
        ".org   . - (664b-663b) + (662b-661b)\n\t"                      \
-       ".org   . - (662b-661b) + (664b-663b)\n"                        \
+       ".org   . - (662b-661b) + (664b-663b)\n\t"                      \
+       ".previous\n"                                                   \
        ".endif\n"
 
 #define __ALTERNATIVE_CFG_CB(oldinstr, feature, cfg_enabled, cb)       \
index b6f7bc6..93a161b 100644 (file)
@@ -24,16 +24,17 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
 {
        __uint128_t tmp;
        u64 sum;
+       int n = ihl; /* we want it signed */
 
        tmp = *(const __uint128_t *)iph;
        iph += 16;
-       ihl -= 4;
+       n -= 4;
        tmp += ((tmp >> 64) | (tmp << 64));
        sum = tmp >> 64;
        do {
                sum += *(const u32 *)iph;
                iph += 4;
-       } while (--ihl);
+       } while (--n > 0);
 
        sum += ((sum >> 32) | (sum << 32));
        return csum_fold((__force u32)(sum >> 32));
index ea268d8..a0c8a0b 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/threads.h>
 #include <linux/cpumask.h>
 #include <linux/thread_info.h>
-#include <asm/pointer_auth.h>
 
 DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);