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] [day] [month] [year] [list]
Date:	Mon, 4 Jan 2016 15:18:41 +0000
From:	Catalin Marinas <catalin.marinas@....com>
To:	Zhi-zhou Zhang <zhizhou.zh@...il.com>
Cc:	jistone@...hat.com, daniel.thompson@...aro.org,
	marc.zyngier@....com, mark.rutland@....com, will.deacon@....com,
	salyzyn@...roid.com, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] arm64: entry.S: add missing trace_hardirqs_off

On Sat, Dec 26, 2015 at 01:57:18PM +0800, Zhi-zhou Zhang wrote:
> Before calling schedule, we should trace hardirqs correctly. If not,
> we get following warning message when enabled CONFIG_DEBUG_LOCKDEP:
> 
> [    9.243073] DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)
> [ ... ]
> [    9.262681] possible reason: unannotated irqs-off.
> [    9.263018] irq event stamp: 256209
> [    9.263266] hardirqs last  enabled at (256209): [<ffffffc000085a98>] el0_irq_naked+0x1c/0x24
> [    9.263820] hardirqs last disabled at (256207): [<ffffffc0000bad20>] __do_softirq+0x170/0x28c
> [    9.264419] softirqs last  enabled at (256208): [<ffffffc0000bad9c>] __do_softirq+0x1ec/0x28c
> [    9.264976] softirqs last disabled at (256189): [<ffffffc0000bb194>] irq_exit+0x9c/0xec
> 
> Signed-off-by: Zhi-zhou Zhang <zhizhou.zh@...il.com>
> ---
>  arch/arm64/kernel/entry.S | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S
> index 7ed3d75..4769190 100644
> --- a/arch/arm64/kernel/entry.S
> +++ b/arch/arm64/kernel/entry.S
> @@ -634,6 +634,9 @@ work_pending:
>  	bl	do_notify_resume
>  	b	ret_to_user
>  work_resched:
> +#ifdef CONFIG_TRACE_IRQFLAGS
> +	bl	trace_hardirqs_off
> +#endif
>  	bl	schedule

A similar patch is already in -next as commit db3899a6477a (arm64: Add
trace_hardirqs_off annotation in ret_to_user)

-- 
Catalin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ