1. 10 1月, 2018 8 次提交
    • M
      powerpc/pseries: Query hypervisor for RFI flush settings · 8989d568
      Michael Neuling 提交于
      A new hypervisor call is available which tells the guest settings
      related to the RFI flush. Use it to query the appropriate flush
      instruction(s), and whether the flush is required.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8989d568
    • M
      powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti · bc9c9304
      Michael Ellerman 提交于
      Because there may be some performance overhead of the RFI flush, add
      kernel command line options to disable it.
      
      We add a sensibly named 'no_rfi_flush' option, but we also hijack the
      x86 option 'nopti'. The RFI flush is not the same as KPTI, but if we
      see 'nopti' we can guess that the user is trying to avoid any overhead
      of Meltdown mitigations, and it means we don't have to educate every
      one about a different command line option.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      bc9c9304
    • M
      powerpc/64s: Add support for RFI flush of L1-D cache · aa8a5e00
      Michael Ellerman 提交于
      On some CPUs we can prevent the Meltdown vulnerability by flushing the
      L1-D cache on exit from kernel to user mode, and from hypervisor to
      guest.
      
      This is known to be the case on at least Power7, Power8 and Power9. At
      this time we do not know the status of the vulnerability on other CPUs
      such as the 970 (Apple G5), pasemi CPUs (AmigaOne X1000) or Freescale
      CPUs. As more information comes to light we can enable this, or other
      mechanisms on those CPUs.
      
      The vulnerability occurs when the load of an architecturally
      inaccessible memory region (eg. userspace load of kernel memory) is
      speculatively executed to the point where its result can influence the
      address of a subsequent speculatively executed load.
      
      In order for that to happen, the first load must hit in the L1,
      because before the load is sent to the L2 the permission check is
      performed. Therefore if no kernel addresses hit in the L1 the
      vulnerability can not occur. We can ensure that is the case by
      flushing the L1 whenever we return to userspace. Similarly for
      hypervisor vs guest.
      
      In order to flush the L1-D cache on exit, we add a section of nops at
      each (h)rfi location that returns to a lower privileged context, and
      patch that with some sequence. Newer firmwares are able to advertise
      to us that there is a special nop instruction that flushes the L1-D.
      If we do not see that advertised, we fall back to doing a displacement
      flush in software.
      
      For guest kernels we support migration between some CPU versions, and
      different CPUs may use different flush instructions. So that we are
      prepared to migrate to a machine with a different flush instruction
      activated, we may have to patch more than one flush instruction at
      boot if the hypervisor tells us to.
      
      In the end this patch is mostly the work of Nicholas Piggin and
      Michael Ellerman. However a cast of thousands contributed to analysis
      of the issue, earlier versions of the patch, back ports testing etc.
      Many thanks to all of them.
      Tested-by: NJon Masters <jcm@redhat.com>
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      aa8a5e00
    • N
      powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL · c7305645
      Nicholas Piggin 提交于
      In the SLB miss handler we may be returning to user or kernel. We need
      to add a check early on and save the result in the cr4 register, and
      then we bifurcate the return path based on that.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      c7305645
    • N
      powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL · a08f828c
      Nicholas Piggin 提交于
      Similar to the syscall return path, in fast_exception_return we may be
      returning to user or kernel context. We already have a test for that,
      because we conditionally restore r13. So use that existing test and
      branch, and bifurcate the return based on that.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      a08f828c
    • N
      powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL · b8e90cb7
      Nicholas Piggin 提交于
      In the syscall exit path we may be returning to user or kernel
      context. We already have a test for that, because we conditionally
      restore r13. So use that existing test and branch, and bifurcate the
      return based on that.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      b8e90cb7
    • N
      powerpc/64s: Simple RFI macro conversions · 222f20f1
      Nicholas Piggin 提交于
      This commit does simple conversions of rfi/rfid to the new macros that
      include the expected destination context. By simple we mean cases
      where there is a single well known destination context, and it's
      simply a matter of substituting the instruction for the appropriate
      macro.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      222f20f1
    • N
      powerpc/64: Add macros for annotating the destination of rfid/hrfid · 50e51c13
      Nicholas Piggin 提交于
      The rfid/hrfid ((Hypervisor) Return From Interrupt) instruction is
      used for switching from the kernel to userspace, and from the
      hypervisor to the guest kernel. However it can and is also used for
      other transitions, eg. from real mode kernel code to virtual mode
      kernel code, and it's not always clear from the code what the
      destination context is.
      
      To make it clearer when reading the code, add macros which encode the
      expected destination context.
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      50e51c13
  2. 09 1月, 2018 2 次提交
  3. 08 1月, 2018 1 次提交
    • M
      powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ · e2d59152
      Michael Ellerman 提交于
      The hotplug code uses its own workqueue to handle IRQ requests
      (pseries_hp_wq), however that workqueue is initialized after
      init_ras_IRQ(). That can lead to a kernel panic if any hotplug
      interrupts fire after init_ras_IRQ() but before pseries_hp_wq is
      initialised. eg:
      
        UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
        NET: Registered protocol family 1
        Unpacking initramfs...
        (qemu) object_add memory-backend-ram,id=mem1,size=10G
        (qemu) device_add pc-dimm,id=dimm1,memdev=mem1
        Unable to handle kernel paging request for data at address 0xf94d03007c421378
        Faulting instruction address: 0xc00000000012d744
        Oops: Kernel access of bad area, sig: 11 [#1]
        LE SMP NR_CPUS=2048 NUMA pSeries
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2-ziviani+ #26
        task:         (ptrval) task.stack:         (ptrval)
        NIP:  c00000000012d744 LR: c00000000012d744 CTR: 0000000000000000
        REGS:         (ptrval) TRAP: 0380   Not tainted  (4.15.0-rc2-ziviani+)
        MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE>  CR: 28088042  XER: 20040000
        CFAR: c00000000012d3c4 SOFTE: 0
        ...
        NIP [c00000000012d744] __queue_work+0xd4/0x5c0
        LR [c00000000012d744] __queue_work+0xd4/0x5c0
        Call Trace:
        [c0000000fffefb90] [c00000000012d744] __queue_work+0xd4/0x5c0 (unreliable)
        [c0000000fffefc70] [c00000000012dce4] queue_work_on+0xb4/0xf0
      
      This commit makes the RAS IRQ registration explicitly dependent on the
      creation of the pseries_hp_wq.
      Reported-by: NMin Deng <mdeng@redhat.com>
      Reported-by: NDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Tested-by: NJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e2d59152
  4. 02 1月, 2018 1 次提交
    • J
      powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR · ecb101ae
      John Sperbeck 提交于
      The recent refactoring of the powerpc page fault handler in commit
      c3350602 ("powerpc/mm: Make bad_area* helper functions") caused
      access to protected memory regions to indicate SEGV_MAPERR instead of
      the traditional SEGV_ACCERR in the si_code field of a user-space
      signal handler. This can confuse debug libraries that temporarily
      change the protection of memory regions, and expect to use SEGV_ACCERR
      as an indication to restore access to a region.
      
      This commit restores the previous behavior. The following program
      exhibits the issue:
      
          $ ./repro read  || echo "FAILED"
          $ ./repro write || echo "FAILED"
          $ ./repro exec  || echo "FAILED"
      
          #include <stdio.h>
          #include <stdlib.h>
          #include <string.h>
          #include <unistd.h>
          #include <signal.h>
          #include <sys/mman.h>
          #include <assert.h>
      
          static void segv_handler(int n, siginfo_t *info, void *arg) {
                  _exit(info->si_code == SEGV_ACCERR ? 0 : 1);
          }
      
          int main(int argc, char **argv)
          {
                  void *p = NULL;
                  struct sigaction act = {
                          .sa_sigaction = segv_handler,
                          .sa_flags = SA_SIGINFO,
                  };
      
                  assert(argc == 2);
                  p = mmap(NULL, getpagesize(),
                          (strcmp(argv[1], "write") == 0) ? PROT_READ : 0,
                          MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
                  assert(p != MAP_FAILED);
      
                  assert(sigaction(SIGSEGV, &act, NULL) == 0);
                  if (strcmp(argv[1], "read") == 0)
                          printf("%c", *(unsigned char *)p);
                  else if (strcmp(argv[1], "write") == 0)
                          *(unsigned char *)p = 0;
                  else if (strcmp(argv[1], "exec") == 0)
                          ((void (*)(void))p)();
                  return 1;  /* failed to generate SEGV */
          }
      
      Fixes: c3350602 ("powerpc/mm: Make bad_area* helper functions")
      Cc: stable@vger.kernel.org # v4.14+
      Signed-off-by: NJohn Sperbeck <jsperbeck@google.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      [mpe: Add commit references in change log]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ecb101ae
  5. 22 12月, 2017 2 次提交
  6. 19 12月, 2017 1 次提交
    • M
      powerpc/kernel: Print actual address of regs when oopsing · 182dc9c7
      Michael Ellerman 提交于
      When we oops or otherwise call show_regs() we print the address of the
      regs structure. Being able to see the address is fairly useful,
      firstly to verify that the regs pointer is not completely bogus, and
      secondly it allows you to dump the regs and surrounding memory with a
      debugger if you have one.
      
      In the normal case the regs will be located somewhere on the stack, so
      printing their location discloses no further information than printing
      the stack pointer does already.
      
      So switch to %px and print the actual address, not the hashed value.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      182dc9c7
  7. 13 12月, 2017 3 次提交
    • A
      powerpc/perf: Fix kfree memory allocated for nest pmus · 110df8bd
      Anju T Sudhakar 提交于
      imc_common_cpuhp_mem_free() is the common function for all
      IMC (In-memory Collection counters) domains to unregister cpuhotplug
      callback and free memory. Since kfree of memory allocated for
      nest-imc (per_nest_pmu_arr) is in the common code, all
      domains (core/nest/thread) can do the kfree in the failure case.
      
      This could potentially create a call trace as shown below, where
      core(/thread/nest) imc pmu initialization fails and in the failure
      path imc_common_cpuhp_mem_free() free the memory(per_nest_pmu_arr),
      which is allocated by successfully registered nest units.
      
      The call trace is generated in a scenario where core-imc
      initialization is made to fail and a cpuhotplug is performed in a p9
      system. During cpuhotplug ppc_nest_imc_cpu_offline() tries to access
      per_nest_pmu_arr, which is already freed by core-imc.
      
        NIP [c000000000cb6a94] mutex_lock+0x34/0x90
        LR [c000000000cb6a88] mutex_lock+0x28/0x90
        Call Trace:
          mutex_lock+0x28/0x90 (unreliable)
          perf_pmu_migrate_context+0x90/0x3a0
          ppc_nest_imc_cpu_offline+0x190/0x1f0
          cpuhp_invoke_callback+0x160/0x820
          cpuhp_thread_fun+0x1bc/0x270
          smpboot_thread_fn+0x250/0x290
          kthread+0x1a8/0x1b0
          ret_from_kernel_thread+0x5c/0x74
      
      To address this scenario do the kfree(per_nest_pmu_arr) only in case
      of nest-imc initialization failure, and when there is no other nest
      units registered.
      
      Fixes: 73ce9aec ("powerpc/perf: Fix IMC_MAX_PMU macro")
      Signed-off-by: NAnju T Sudhakar <anju@linux.vnet.ibm.com>
      Reviewed-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      110df8bd
    • A
      powerpc/perf/imc: Fix nest-imc cpuhotplug callback failure · ad2b6e01
      Anju T Sudhakar 提交于
      Oops is observed during boot:
      
        Faulting instruction address: 0xc000000000248340
        cpu 0x0: Vector: 380 (Data Access Out of Range) at [c000000ff66fb850]
            pc: c000000000248340: event_function_call+0x50/0x1f0
            lr: c00000000024878c: perf_remove_from_context+0x3c/0x100
            sp: c000000ff66fbad0
           msr: 9000000000009033
           dar: 7d20e2a6f92d03c0
          pid = 14, comm = cpuhp/0
      
      While registering the cpuhotplug callbacks for nest-imc, if we fail in
      the cpuhotplug online path for any random node in a multi node
      system (because the opal call to stop nest-imc counters fails for that
      node), ppc_nest_imc_cpu_offline() will get invoked for other nodes who
      successfully returned from cpuhotplug online path.
      
      This call trace is generated since in the ppc_nest_imc_cpu_offline()
      path we are trying to migrate the event context, when nest-imc
      counters are not even initialized.
      
      Patch to add a check to ensure that nest-imc is registered before
      migrating the event context.
      
      Fixes: 885dcd70 ("powerpc/perf: Add nest IMC PMU support")
      Signed-off-by: NAnju T Sudhakar <anju@linux.vnet.ibm.com>
      Reviewed-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ad2b6e01
    • R
      powerpc/perf: Dereference BHRB entries safely · f41d84dd
      Ravi Bangoria 提交于
      It's theoretically possible that branch instructions recorded in
      BHRB (Branch History Rolling Buffer) entries have already been
      unmapped before they are processed by the kernel. Hence, trying to
      dereference such memory location will result in a crash. eg:
      
          Unable to handle kernel paging request for data at address 0xd000000019c41764
          Faulting instruction address: 0xc000000000084a14
          NIP [c000000000084a14] branch_target+0x4/0x70
          LR [c0000000000eb828] record_and_restart+0x568/0x5c0
          Call Trace:
          [c0000000000eb3b4] record_and_restart+0xf4/0x5c0 (unreliable)
          [c0000000000ec378] perf_event_interrupt+0x298/0x460
          [c000000000027964] performance_monitor_exception+0x54/0x70
          [c000000000009ba4] performance_monitor_common+0x114/0x120
      
      Fix it by deferefencing the addresses safely.
      
      Fixes: 69123184 ("powerpc/perf: Fix setting of "to" addresses for BHRB")
      Cc: stable@vger.kernel.org # v3.10+
      Suggested-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Reviewed-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      [mpe: Use probe_kernel_read() which is clearer, tweak change log]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      f41d84dd
  8. 06 12月, 2017 2 次提交
    • M
      powerpc/xmon: Don't print hashed pointers in xmon · d8104182
      Michael Ellerman 提交于
      Since commit ad67b74d ("printk: hash addresses printed with %p")
      pointers printed with %p are hashed, ie. you don't see the actual
      pointer value but rather a cryptographic hash of its value.
      
      In xmon we want to see the actual pointer values, because xmon is a
      debugger, so replace %p with %px which prints the actual pointer
      value.
      
      We justify doing this in xmon because 1) xmon is a kernel crash
      debugger, it's only accessible via the console 2) xmon doesn't print
      to dmesg, so the pointers it prints are not able to be leaked that
      way.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d8104182
    • N
      powerpc/64s: Initialize ISAv3 MMU registers before setting partition table · 371b8044
      Nicholas Piggin 提交于
      kexec can leave MMU registers set when booting into a new kernel,
      the PIDR (Process Identification Register) in particular. The boot
      sequence does not zero PIDR, so it only gets set when CPUs first
      switch to a userspace processes (until then it's running a kernel
      thread with effective PID = 0).
      
      This leaves a window where a process table entry and page tables are
      set up due to user processes running on other CPUs, that happen to
      match with a stale PID. The CPU with that PID may cause speculative
      accesses that address quadrant 0 (aka userspace addresses), which will
      result in cached translations and PWC (Page Walk Cache) for that
      process, on a CPU which is not in the mm_cpumask and so they will not
      be invalidated properly.
      
      The most common result is the kernel hanging in infinite page fault
      loops soon after kexec (usually in schedule_tail, which is usually the
      first non-speculative quadrant 0 access to a new PID) due to a stale
      PWC. However being a stale translation error, it could result in
      anything up to security and data corruption problems.
      
      Fix this by zeroing out PIDR at boot and kexec.
      
      Fixes: 7e381c0f ("powerpc/mm/radix: Add mmu context handling callback for radix")
      Cc: stable@vger.kernel.org # v4.7+
      Signed-off-by: NNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      371b8044
  9. 05 12月, 2017 1 次提交
    • D
      Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier" · ab9dbf77
      David Gibson 提交于
      This reverts commit a3b2cb30.
      
      That commit tried to fix problems with panic on powerpc in certain
      circumstances, where some output from the generic panic code was being
      dropped.
      
      Unfortunately, it breaks things worse in other circumstances. In
      particular when running a PAPR guest, it will now attempt to reboot
      instead of informing the hypervisor (KVM or PowerVM) that the guest
      has crashed. The crash notification is important to some
      virtualization management layers.
      
      Revert it for now until we can come up with a better solution.
      
      Fixes: a3b2cb30 ("powerpc: Do not call ppc_md.panic in fadump panic notifier")
      Cc: stable@vger.kernel.org # v4.14+
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      [mpe: Tweak change log a bit]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      ab9dbf77
  10. 04 12月, 2017 2 次提交
    • R
      powerpc/perf: Fix oops when grouping different pmu events · 5aa04b3e
      Ravi Bangoria 提交于
      When user tries to group imc (In-Memory Collections) event with
      normal event, (sometime) kernel crashes with following log:
      
          Faulting instruction address: 0x00000000
          [link register   ] c00000000010ce88 power_check_constraints+0x128/0x980
          ...
          c00000000010e238 power_pmu_event_init+0x268/0x6f0
          c0000000002dc60c perf_try_init_event+0xdc/0x1a0
          c0000000002dce88 perf_event_alloc+0x7b8/0xac0
          c0000000002e92e0 SyS_perf_event_open+0x530/0xda0
          c00000000000b004 system_call+0x38/0xe0
      
      'event_base' field of 'struct hw_perf_event' is used as flags for
      normal hw events and used as memory address for imc events. While
      grouping these two types of events, collect_events() tries to
      interpret imc 'event_base' as a flag, which causes a corruption
      resulting in a crash.
      
      Consider only those events which belongs to 'perf_hw_context' in
      collect_events().
      Signed-off-by: NRavi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
      Reviewed-By: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      5aa04b3e
    • L
      Linux 4.15-rc2 · ae64f9bd
      Linus Torvalds 提交于
      ae64f9bd
  11. 03 12月, 2017 4 次提交
  12. 02 12月, 2017 11 次提交
    • L
      Merge tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs · 2db767d9
      Linus Torvalds 提交于
      Pull NFS client fixes from Anna Schumaker:
       "These patches fix a problem with compiling using an old version of
        gcc, and also fix up error handling in the SUNRPC layer.
      
         - NFSv4: Ensure gcc 4.4.4 can compile initialiser for
           "invalid_stateid"
      
         - SUNRPC: Allow connect to return EHOSTUNREACH
      
         - SUNRPC: Handle ENETDOWN errors"
      
      * tag 'nfs-for-4.15-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        SUNRPC: Handle ENETDOWN errors
        SUNRPC: Allow connect to return EHOSTUNREACH
        NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid"
      2db767d9
    • L
      Merge tag 'xfs-4.15-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 788c1da0
      Linus Torvalds 提交于
      Pull xfs fixes from Darrick Wong:
       "Here are some bug fixes for 4.15-rc2.
      
         - fix memory leaks that appeared after removing ifork inline data
           buffer
      
         - recover deferred rmap update log items in correct order
      
         - fix memory leaks when buffer construction fails
      
         - fix memory leaks when bmbt is corrupt
      
         - fix some uninitialized variables and math problems in the quota
           scrubber
      
         - add some omitted attribution tags on the log replay commit
      
         - fix some UBSAN complaints about integer overflows with large sparse
           files
      
         - implement an effective inode mode check in online fsck
      
         - fix log's inability to retry quota item writeout due to transient
           errors"
      
      * tag 'xfs-4.15-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: Properly retry failed dquot items in case of error during buffer writeback
        xfs: scrub inode mode properly
        xfs: remove unused parameter from xfs_writepage_map
        xfs: ubsan fixes
        xfs: calculate correct offset in xfs_scrub_quota_item
        xfs: fix uninitialized variable in xfs_scrub_quota
        xfs: fix leaks on corruption errors in xfs_bmap.c
        xfs: fortify xfs_alloc_buftarg error handling
        xfs: log recovery should replay deferred ops in order
        xfs: always free inline data before resetting inode fork during ifree
      788c1da0
    • L
      Merge tag 'riscv-for-linus-4.15-rc2_cleanups' of... · e1ba1c99
      Linus Torvalds 提交于
      Merge tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux
      
      Pull RISC-V cleanups and ABI fixes from Palmer Dabbelt:
       "This contains a handful of small cleanups that are a result of
        feedback that didn't make it into our original patch set, either
        because the feedback hadn't been given yet, I missed the original
        emails, or we weren't ready to submit the changes yet.
      
        I've been maintaining the various cleanup patch sets I have as their
        own branches, which I then merged together and signed. Each merge
        commit has a short summary of the changes, and each branch is based on
        your latest tag (4.15-rc1, in this case). If this isn't the right way
        to do this then feel free to suggest something else, but it seems sane
        to me.
      
        Here's a short summary of the changes, roughly in order of how
        interesting they are.
      
         - libgcc.h has been moved from include/lib, where it's the only
           member, to include/linux. This is meant to avoid tab completion
           conflicts.
      
         - VDSO entries for clock_get/gettimeofday/getcpu have been added.
           These are simple syscalls now, but we want to let glibc use them
           from the start so we can make them faster later.
      
         - A VDSO entry for instruction cache flushing has been added so
           userspace can flush the instruction cache.
      
         - The VDSO symbol versions for __vdso_cmpxchg{32,64} have been
           removed, as those VDSO entries don't actually exist.
      
         - __io_writes has been corrected to respect the given type.
      
         - A new READ_ONCE in arch_spin_is_locked().
      
         - __test_and_op_bit_ord() is now actually ordered.
      
         - Various small fixes throughout the tree to enable allmodconfig to
           build cleanly.
      
         - Removal of some dead code in our atomic support headers.
      
         - Improvements to various comments in our atomic support headers"
      
      * tag 'riscv-for-linus-4.15-rc2_cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/linux: (23 commits)
        RISC-V: __io_writes should respect the length argument
        move libgcc.h to include/linux
        RISC-V: Clean up an unused include
        RISC-V: Allow userspace to flush the instruction cache
        RISC-V: Flush I$ when making a dirty page executable
        RISC-V: Add missing include
        RISC-V: Use define for get_cycles like other architectures
        RISC-V: Provide stub of setup_profiling_timer()
        RISC-V: Export some expected symbols for modules
        RISC-V: move empty_zero_page definition to C and export it
        RISC-V: io.h: type fixes for warnings
        RISC-V: use RISCV_{INT,SHORT} instead of {INT,SHORT} for asm macros
        RISC-V: use generic serial.h
        RISC-V: remove spin_unlock_wait()
        RISC-V: `sfence.vma` orderes the instruction cache
        RISC-V: Add READ_ONCE in arch_spin_is_locked()
        RISC-V: __test_and_op_bit_ord should be strongly ordered
        RISC-V: Remove smb_mb__{before,after}_spinlock()
        RISC-V: Remove __smp_bp__{before,after}_atomic
        RISC-V: Comment on why {,cmp}xchg is ordered how it is
        ...
      e1ba1c99
    • L
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 4b1967c9
      Linus Torvalds 提交于
      Pull arm64 fixes from Will Deacon:
       "The critical one here is a fix for fpsimd register corruption across
        signals which was introduced by the SVE support code (the register
        files overlap), but the others are worth having as well.
      
        Summary:
      
         - Fix FP register corruption when SVE is not available or in use
      
         - Fix out-of-tree module build failure when CONFIG_ARM64_MODULE_PLTS=y
      
         - Missing 'const' generating errors with LTO builds
      
         - Remove unsupported events from Cortex-A73 PMU description
      
         - Removal of stale and incorrect comments"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: context: Fix comments and remove pointless smp_wmb()
        arm64: cpu_ops: Add missing 'const' qualifiers
        arm64: perf: remove unsupported events for Cortex-A73
        arm64: fpsimd: Fix failure to restore FPSIMD state after signals
        arm64: pgd: Mark pgd_cache as __ro_after_init
        arm64: ftrace: emit ftrace-mod.o contents through code
        arm64: module-plts: factor out PLT generation code for ftrace
        arm64: mm: cleanup stale AIVIVT references
      4b1967c9
    • P
      RISC-V: Fixes for clean allmodconfig build · 3b62de26
      Palmer Dabbelt 提交于
      Olaf said: Here's a short series of patches that produces a working
      allmodconfig. Would be nice to see them go in so we can add build
      coverage.
      
      I've dropped patches 8 and 10 from the original set:
      
      * [PATCH 08/10] (RISC-V: Set __ARCH_WANT_RENAMEAT to pick up generic
        version) has a better fix that I've sent out for review, we don't want
        renameat.
      * [PATCH 10/10] (input: joystick: riscv has get_cycles) has already been
        taken into Dmitry Torokhov's tree.
      3b62de26
    • P
      move libgcc.h to include/linux · 185e788c
      Palmer Dabbelt 提交于
      185e788c
    • P
      7382fbde
    • P
      RISC-V: User-Visible Changes · 07f8ba74
      Palmer Dabbelt 提交于
      This merge contains the user-visible, ABI-breaking changes that we want
      to make sure we have in Linux before our first release.   Highlights
      include:
      
      * VDSO entries for clock_get/gettimeofday/getcpu have been added.  These
        are simple syscalls now, but we want to let glibc use them from the
        start so we can make them faster later.
      * A VDSO entry for instruction cache flushing has been added so
        userspace can flush the instruction cache.
      * The VDSO symbol versions for __vdso_cmpxchg{32,64} have been removed,
        as those VDSO entries don't actually exist.
      
      Conflicts:
              arch/riscv/include/asm/tlbflush.h
      07f8ba74
    • P
      RISC-V Atomic Cleanups · f8182f61
      Palmer Dabbelt 提交于
      This patch set is the result of some feedback that filtered through
      after our original patch set was reviewed, some of which was the result
      of me missing some email.  It contains:
      
      * A new READ_ONCE in arch_spin_is_locked()
      * __test_and_op_bit_ord() is now actually ordered
      * Improvements to various comments
      * Removal of some dead code
      f8182f61
    • P
      RISC-V: __io_writes should respect the length argument · da894ff1
      Palmer Dabbelt 提交于
      Whoops -- I must have just been being an idiot again.  Thanks to Segher
      for finding the bug :).
      
      CC: Segher Boessenkool <segher@kernel.crashing.org>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      da894ff1
    • C
      move libgcc.h to include/linux · 4db2b604
      Christoph Hellwig 提交于
      Introducing a new include/lib directory just for this file totally
      messes up tab completion for include/linux, which is highly annoying.
      
      Move it to include/linux where we have headers for all kinds of other
      lib/ code as well.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      4db2b604
  13. 01 12月, 2017 2 次提交