1. 28 6月, 2021 7 次提交
    • J
      arm64: dt: Add no-map to the reserved-memory node for OP-TEE for foundation-v8 **not for mainline** · e8a2af69
      Jens Wiklander 提交于
      All the platforms that reserve memory for OP-TEE statically via the
      DT (i.e., not those that reserve it via UEFI or that patch the DT
      dynamically thanks to OP-TEE's CFG_DT option) have to mark it 'no-map'
      so that only the TEE driver may map it.
      Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
      e8a2af69
    • J
      arm64: dt: OP-TEE for Juno **not for mainline** · 1e8f5574
      Jens Wiklander 提交于
      Configures Juno with OP-TEE.
      Reviewed-by: NPascal Brand <pascal.brand@linaro.org>
      Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
      [jf: rebase onto v5.9-rc7]
      Signed-off-by: NJerome Forissier <jerome@forissier.org>
      1e8f5574
    • J
      arm64: dt: OP-TEE for foundation-v8 **not for mainline** · 3055d62c
      Jens Wiklander 提交于
      Configures foundation-v8 with OP-TEE.
      Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
      [jf: rebase onto v5.9-rc7]
      Signed-off-by: NJerome Forissier <jerome@forissier.org>
      3055d62c
    • J
      arm64: dt: Remove timer from mt8173 **not for mainline** · b2c217f3
      Joakim Bech 提交于
      From the commit below, the mt8173-evb failed to boot to console due to
      changes in the mt8173 device tree files.
      
        commit c0d6fe2f
        Merge: b44a3d2a 3e4dda70
        Author: Linus Torvalds <torvalds@linux-foundation.org>
        Date:   Tue Nov 10 15:06:26 2015 -0800
      
            Merge tag 'armsoc-dt' of
            git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
      
      Until properly solved, let's just remove the section in the device tree
      blob that causes this.
      Signed-off-by: NJoakim Bech <joakim.bech@linaro.org>
      Reviewed-by: NPascal Brand <pascal.brand@linaro.org>
      b2c217f3
    • E
      tee: new ioctl to a register tee_shm from a dmabuf file descriptor · abdca0e1
      Etienne Carriere 提交于
      This change allows userland to create a tee_shm object that refers
      to a dmabuf reference.
      
      Userland provides a dmabuf file descriptor as buffer reference.
      The created tee_shm object exported as a brand new dmabuf reference
      used to provide a clean fd to userland. Userland shall closed this new
      fd to release the tee_shm object resources. The initial dmabuf resources
      are tracked independently through original dmabuf file descriptor.
      
      Once the buffer is registered and until it is released, TEE driver
      keeps a refcount on the registered dmabuf structure.
      
      This change only support dmabuf references that relates to physically
      contiguous memory buffers.
      
      New tee_shm flag to identify tee_shm objects built from a registered
      dmabuf: TEE_SHM_EXT_DMA_BUF. Such tee_shm structures are flagged both
      TEE_SHM_DMA_BUF and TEE_SHM_EXT_DMA_BUF.
      Signed-off-by: NEtienne Carriere <etienne.carriere@linaro.org>
      Reviewed-by: NJens Wiklander <jens.wiklander@linaro.org>
      [jf: squash fixup commit ("tee: fix unbalanced context refcount in
       register shm from fd")]
      [jf: rebase onto v5.9-rc8]
      Signed-off-by: NJerome Forissier <jerome@forissier.org>
      [jf: rebase onto v5.12]
      Signed-off-by: NJerome Forissier <jerome@forissier.org>
      abdca0e1
    • L
      Linux 5.13 · 62fb9874
      Linus Torvalds 提交于
      62fb9874
    • L
      Revert "signal: Allow tasks to cache one sigqueue struct" · b4b27b9e
      Linus Torvalds 提交于
      This reverts commits 4bad58eb (and
      399f8dd9, which tried to fix it).
      
      I do not believe these are correct, and I'm about to release 5.13, so am
      reverting them out of an abundance of caution.
      
      The locking is odd, and appears broken.
      
      On the allocation side (in __sigqueue_alloc()), the locking is somewhat
      straightforward: it depends on sighand->siglock.  Since one caller
      doesn't hold that lock, it further then tests 'sigqueue_flags' to avoid
      the case with no locks held.
      
      On the freeing side (in sigqueue_cache_or_free()), there is no locking
      at all, and the logic instead depends on 'current' being a single
      thread, and not able to race with itself.
      
      To make things more exciting, there's also the data race between freeing
      a signal and allocating one, which is handled by using WRITE_ONCE() and
      READ_ONCE(), and being mutually exclusive wrt the initial state (ie
      freeing will only free if the old state was NULL, while allocating will
      obviously only use the value if it was non-NULL, so only one or the
      other will actually act on the value).
      
      However, while the free->alloc paths do seem mutually exclusive thanks
      to just the data value dependency, it's not clear what the memory
      ordering constraints are on it.  Could writes from the previous
      allocation possibly be delayed and seen by the new allocation later,
      causing logical inconsistencies?
      
      So it's all very exciting and unusual.
      
      And in particular, it seems that the freeing side is incorrect in
      depending on "current" being single-threaded.  Yes, 'current' is a
      single thread, but in the presense of asynchronous events even a single
      thread can have data races.
      
      And such asynchronous events can and do happen, with interrupts causing
      signals to be flushed and thus free'd (for example - sending a
      SIGCONT/SIGSTOP can happen from interrupt context, and can flush
      previously queued process control signals).
      
      So regardless of all the other questions about the memory ordering and
      locking for this new cached allocation, the sigqueue_cache_or_free()
      assumptions seem to be fundamentally incorrect.
      
      It may be that people will show me the errors of my ways, and tell me
      why this is all safe after all.  We can reinstate it if so.  But my
      current belief is that the WRITE_ONCE() that sets the cached entry needs
      to be a smp_store_release(), and the READ_ONCE() that finds a cached
      entry needs to be a smp_load_acquire() to handle memory ordering
      correctly.
      
      And the sequence in sigqueue_cache_or_free() would need to either use a
      lock or at least be interrupt-safe some way (perhaps by using something
      like the percpu 'cmpxchg': it doesn't need to be SMP-safe, but like the
      percpu operations it needs to be interrupt-safe).
      
      Fixes: 399f8dd9 ("signal: Prevent sigqueue caching after task got released")
      Fixes: 4bad58eb ("signal: Allow tasks to cache one sigqueue struct")
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Christian Brauner <christian.brauner@ubuntu.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b4b27b9e
  2. 27 6月, 2021 1 次提交
    • L
      Merge tag 's390-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 625acffd
      Linus Torvalds 提交于
      Pull s390 fixes from Vasily Gorbik:
      
       - Fix a couple of late pt_regs flags handling findings of conversion to
         generic entry.
      
       - Fix potential register clobbering in stack switch helper.
      
       - Fix thread/group masks for offline cpus.
      
       - Fix cleanup of mdev resources when remove callback is invoked in
         vfio-ap code.
      
      * tag 's390-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/stack: fix possible register corruption with stack switch helper
        s390/topology: clear thread/group maps for offline cpus
        s390/vfio-ap: clean up mdev resources when remove callback invoked
        s390: clear pt_regs::flags on irq entry
        s390: fix system call restart with multiple signals
      625acffd
  3. 26 6月, 2021 13 次提交
  4. 25 6月, 2021 19 次提交