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-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 1 Jun 2024 15:35:28 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH 0/4 v3] perf: Fix leaked sigtrap events

Le Fri, May 31, 2024 at 01:25:26PM -0300, Arnaldo Carvalho de Melo a écrit :
> With Frederic's patchset:
> 
> [acme@...e linux]$ b4 am -ctsl --cc-trailers 20240516140936.13694-1-frederic@...nel.org
> Grabbing thread from lore.kernel.org/all/20240516140936.13694-1-frederic@...nel.org/t.mbox.gz
> Checking for newer revisions
> Grabbing search results from lore.kernel.org
> Analyzing 5 messages in the thread
> Looking for additional code-review trailers on lore.kernel.org
> <SNIP>
> Total patches: 4
> ---
> Cover: ./v3_20240516_frederic_perf_fix_leaked_sigtrap_events.cover
>  Link: https://lore.kernel.org/r/20240516140936.13694-1-frederic@kernel.org
>  Base: not specified
>        git am ./v3_20240516_frederic_perf_fix_leaked_sigtrap_events.mbx
> [acme@...e linux]$        git am ./v3_20240516_frederic_perf_fix_leaked_sigtrap_events.mbx
> Applying: task_work: s/task_work_cancel()/task_work_cancel_func()/
> Applying: task_work: Introduce task_work_cancel() again
> Applying: perf: Fix event leak upon exit
> Applying: perf: Fix event leak upon exec and file release
> [acme@...e linux]$
> 
> [acme@...e linux]$ git log --oneline -9
> 1f88fa6e3adb (HEAD -> linux-rt-devel-6.10.y-rt-sigtrap-fix-frederic-v3) perf: Fix event leak upon exec and file release
> 44cde14a096c perf: Fix event leak upon exit
> 512f8f5cbaed task_work: Introduce task_work_cancel() again
> e7bee294ec69 task_work: s/task_work_cancel()/task_work_cancel_func()/
> 4de7b8e17201 Revert "perf: Move irq_work_queue() where the event is prepared."
> 5efa195af234 Revert "perf: Enqueue SIGTRAP always via task_work."
> 26ac4dfa180a Revert "perf: Remove perf_swevent_get_recursion_context() from perf_pending_task()."
> c2fb5208a68e Revert "perf: Split __perf_pending_irq() out of perf_pending_irq()"
> 6d20efa57a89 (tag: v6.10-rc1-rt1-rebase, tag: v6.10-rc1-rt1, linux-rt-devel/linux-6.10.y-rt-rebase, linux-rt-devel/linux-6.10.y-rt, linux-rt-devel/for-kbuild-bot/prepare-release, linux-rt-devel/for-kbuild-bot/current-stable) Add localversion for -RT release
> [acme@...e linux]$
> 
> The workload that is used to do that, as a reminder, is 'perf test sigtrap'.
> 
> [  121.217475] BUG: scheduling while atomic: perf/7955/0x00000002
> [  121.217478] BUG: scheduling while atomic: perf/7956/0x00000002
> <SNIP list of modules>
> [  121.217492] BUG: scheduling while atomic: perf/7954/0x00000002
> <SNIP list of modules>
> [  121.217570] Preemption disabled at:
> <SNIP>
> [  121.217571] [<0000000000000000>] 0x0
> <SNIP>
> [  121.217609] Preemption disabled at:
> <SNIP>
> [  121.217610] [<0000000000000000>] 0x0

Right because my patchset doesn't fix the pre-existing RT issue where
perf_sigtrap takes a sleeping lock while preemption is disabled. Sebastian
will need to rebase on top of this patchset and then also convert the perf
recursion context to be per task on RT to avoid preemption disablement.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ