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: <6df24716-8b41-8e9a-f2f4-a0f5d49643bd@telliq.com>
Date:   Wed, 10 Mar 2021 14:54:30 +0100
From:   Jan Kardell <jan.kardell@...liq.com>
To:     Linux ARM <linux-arm-kernel@...ts.infradead.org>
Cc:     linux-kernel@...r.kernel.org, Russell King <linux@...linux.org.uk>,
        linux-omap@...r.kernel.org, Tony Lindgren <tony@...mide.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org
Subject: arm: lockdep complaining about locks allocations in static memory

Hi,

During work lift the software and kernel versions on our custom TI 
am3352 board I started to see lockdep warnings after enabling 
CONFIG_PREEMT. Lockdep seems to think the memory that previously was 
initmem is static memory. I'm using linux 5.4, as that is what is used 
in the next OpenWrt version.

[ 92.198989] WARNING: CPU: 0 PID: 2015 at kernel/locking/lockdep.c:1119 
alloc_netdev_mqs+0xb4/0x3b0

I guess CONFIG_PREEMT just changes the timing of allocations, and is 
otherwise irrelevant.

This was fixed for s390 in linux 5.2 commit 
7a5da02de8d6eafba99556f8c98e5313edebb449 by adding the function 
arch_is_kernel_initmem_freed(). Later a very similar change was made for 
powerpc, and a different solution for x86. I now believe that is needed 
for arm as well. Though I don't know the inner workings of arm memory 
management so I don't know if an identical solution to s390 will do for 
arm, but my experiments suggests it works for am335x. The commit message 
for s390 says "virt == phys", but that seems not to be the case for my 
arm system.

//Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ