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]
Message-Id: <20210928203011.da1f059b72be9ada7d67fe35@linux-foundation.org>
Date:   Tue, 28 Sep 2021 20:30:11 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     arnd@...db.de, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-s390@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
        linux-arch@...r.kernel.org,
        Gerald Schaefer <gerald.schaefer@...ux.ibm.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: [PATCH v2 2/4] mm: Make generic arch_is_kernel_initmem_freed()
 do what it says

On Tue, 28 Sep 2021 09:15:35 +0200 Christophe Leroy <christophe.leroy@...roup.eu> wrote:

> Commit 7a5da02de8d6 ("locking/lockdep: check for freed initmem in
> static_obj()") added arch_is_kernel_initmem_freed() which is supposed
> to report whether an object is part of already freed init memory.
> 
> For the time being, the generic version of arch_is_kernel_initmem_freed()
> always reports 'false', allthough free_initmem() is generically called
> on all architectures.
> 
> Therefore, change the generic version of arch_is_kernel_initmem_freed()
> to check whether free_initmem() has been called. If so, then check
> if a given address falls into init memory.
> 
> In order to use function init_section_contains(), the fonction is
> moved at the end of asm-generic/section.h

i386 allmodconfig:

In file included from arch/x86/platform/intel-quark/imr.c:28:
./include/asm-generic/sections.h: In function 'arch_is_kernel_initmem_freed':
./include/asm-generic/sections.h:171:6: error: 'system_state' undeclared (first use in this function)
  171 |  if (system_state < SYSTEM_FREEING_INITMEM)
      |      ^~~~~~~~~~~~
./include/asm-generic/sections.h:171:6: note: each undeclared identifier is reported only once for each function it appears in
./include/asm-generic/sections.h:171:21: error: 'SYSTEM_FREEING_INITMEM' undeclared (first use in this function)
  171 |  if (system_state < SYSTEM_FREEING_INITMEM)
      |                     ^~~~~~~~~~~~~~~~~~~~~~


I don't think it would be a good idea to include kernel.h from
sections.h - it's unclear to me which is the "innermost" of those two. 
It would be better to uninline arch_is_kernel_initmem_freed().  Surely
there's no real reason for inlining it?

Anyway, I'll drop the series for now.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ