lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231102185934.773885-1-cmllamas@google.com>
Date:   Thu,  2 Nov 2023 18:59:01 +0000
From:   Carlos Llamas <cmllamas@...gle.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, kernel-team@...roid.com,
        Carlos Llamas <cmllamas@...gle.com>,
        Todd Kjos <tkjos@...gle.com>,
        Alice Ryhl <aliceryhl@...gle.com>,
        John Stultz <jstultz@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Tim Murray <timmurray@...gle.com>
Subject: [PATCH 00/21] binder: convert alloc->mutex to spinlock

This series refactors the binder buffer allocation space to be able to
convert the alloc->mutex into a spinlock. Doing so decreases the latency
of binder transactions seen under worst-case scenarios.

I attempted to organize and improve readability of things that were
touched during this process. I also include a couple of fixes (unrelated
to the lock convertion) for issues I found along the way.

Regards,
Carlos Llamas

Cc: Todd Kjos <tkjos@...gle.com>
Cc: Alice Ryhl <aliceryhl@...gle.com>
Cc: John Stultz <jstultz@...gle.com>
Cc: Suren Baghdasaryan <surenb@...gle.com> 
Cc: Tim Murray <timmurray@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Carlos Llamas (21):
  binder: use EPOLLERR from eventpoll.h
  binder: fix use-after-free in shinker's callback
  binder: fix race between mmput() and do_exit()
  binder: fix async space check for 0-sized buffers
  binder: fix trivial typo of binder_free_buf_locked()
  binder: fix comment on binder_alloc_new_buf() return value
  binder: remove extern from function prototypes
  binder: keep vma addresses type as unsigned long
  binder: split up binder_update_page_range()
  binder: do unlocked work in binder_alloc_new_buf()
  binder: remove pid param in binder_alloc_new_buf()
  binder: separate the no-space debugging logic
  binder: relocate low space calculation
  binder: do not add pages to LRU in release path
  binder: relocate binder_alloc_clear_buf()
  binder: refactor page range allocation
  binder: malloc new_buffer outside of locks
  binder: initialize lru pages in mmap callback
  binder: perform page allocation outside of locks
  binder: reverse locking order in shrinker callback
  binder: switch alloc->mutex to spinlock_t

 drivers/android/binder.c                |  25 +-
 drivers/android/binder_alloc.c          | 746 ++++++++++++------------
 drivers/android/binder_alloc.h          |  57 +-
 drivers/android/binder_alloc_selftest.c |   8 +-
 drivers/android/binder_trace.h          |   2 +-
 5 files changed, 428 insertions(+), 410 deletions(-)


base-commit: 21e80f3841c01aeaf32d7aee7bbc87b3db1aa0c6
-- 
2.42.0.869.gea05f2083d-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ