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]
Date:   Sun,  9 Feb 2020 22:24:42 +0000
From:   Jules Irenge <jbi.octave@...il.com>
To:     boqun.feng@...il.com
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        kasan-dev@...glegroups.com, akpm@...ux-foundation.org,
        dvyukov@...gle.com, glider@...gle.com, aryabinin@...tuozzo.com,
        bsegall@...gle.com, rostedt@...dmis.org, dietmar.eggemann@....com,
        vincent.guittot@...aro.org, juri.lelli@...hat.com,
        peterz@...radead.org, mingo@...hat.com, mgorman@...e.de,
        dvhart@...radead.org, tglx@...utronix.de, namhyung@...nel.org,
        jolsa@...hat.com, alexander.shishkin@...ux.intel.com,
        mark.rutland@....com, acme@...nel.org, viro@...iv.linux.org.uk,
        linux-fsdevel@...r.kernel.org, Jules Irenge <jbi.octave@...il.com>
Subject: [PATCH 00/11] Lock warning cleanup

This patch series adds missing annotations to functions that register warnings of context imbalance when built with Sparse tool.
The adds fix the warnings and give insight on what the functions are actually doing.

1. Within the futex subsystem, a __releases(&pi_state->.pi_mutex.wait_lock) is added because wake_futex_pi() only releases the lock at exit,
must_hold(q->lock_ptr) have been added to fixup_pi_state_owner() because the lock is held at entry and exit;
a __releases(&hb->lock) added to futex_wait_queue_me() as it only releases the lock.

2. Within fs_pin, a __releases(RCU) is added because the function exit RCU critical section at exit.

3. In kasan, an __acquires(&report_lock) has been added to start_report() and   __releases(&report_lock) to end_report() 

4. Within ring_buffer subsystem, a __releases(RCU) has been added perf_output_end() 

5. schedule subsystem recorded an addition of the __releases(rq->lock) annotation and a __must_hold(this_rq->lock)

6. At hrtimer subsystem, __acquires(timer) is added  to lock_hrtimer_base() as the function acquire the lock but never releases it.
Jules Irenge (11):
  hrtimer: Add missing annotation to lock_hrtimer_base()
  futex: Add missing annotation for wake_futex_pi()
  futex: Add missing annotation for fixup_pi_state_owner()
  perf/ring_buffer: Add missing annotation to perf_output_end()
  sched/fair: Add missing annotation for nohz_newidle_balance()
  sched/deadline: Add missing annotation for dl_task_offline_migration()
  fs_pin: Add missing annotation for pin_kill() declaration
  fs_pin: Add missing annotation for pin_kill() definition
  kasan: add missing annotation for start_report()
  kasan: add missing annotation for end_report()
  futex: Add missing annotation for futex_wait_queue_me()

 fs/fs_pin.c                 | 2 +-
 include/linux/fs_pin.h      | 2 +-
 kernel/events/ring_buffer.c | 2 +-
 kernel/futex.c              | 3 +++
 kernel/sched/deadline.c     | 1 +
 kernel/sched/fair.c         | 2 +-
 kernel/time/hrtimer.c       | 1 +
 mm/kasan/report.c           | 4 ++--
 8 files changed, 11 insertions(+), 6 deletions(-)

-- 
2.24.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ