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]
Message-ID: <87cymbzj50.fsf@intel.com>
Date: Wed, 14 Aug 2024 09:57:31 +0300
From: Jani Nikula <jani.nikula@...el.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, intel-xe@...ts.freedesktop.org,
 linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
 akinobu.mita@...il.com, lucas.demarchi@...el.com, rodrigo.vivi@...el.com,
 thomas.hellstrom@...ux.intel.com, robdclark@...il.com,
 quic_abhinavk@...cinc.com, dmitry.baryshkov@...aro.org
Subject: Re: [PATCH 1/3] fault-inject: improve build for
 CONFIG_FAULT_INJECTION=n

On Tue, 13 Aug 2024, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Tue, 13 Aug 2024 15:12:35 +0300 Jani Nikula <jani.nikula@...el.com> wrote:
>
>> The fault-inject.h users across the kernel need to add a lot of #ifdef
>> CONFIG_FAULT_INJECTION to cater for shortcomings in the header. Make
>> fault-inject.h self-contained for CONFIG_FAULT_INJECTION=n, and add
>> stubs for DECLARE_FAULT_ATTR(), setup_fault_attr(), should_fail_ex(),
>> and should_fail() to allow removal of conditional compilation.
>> 
>> --- a/include/linux/fault-inject.h
>> +++ b/include/linux/fault-inject.h
>>  
>> -#include <linux/types.h>
>> -#include <linux/debugfs.h>
>
> Removing a nested include exposes all those sites which were
> erroneously depending upon that nested include.  Here's what I have
> found so far, there will be more.

Right. I didn't hit them with the configs I tried... though I wonder why
not, especially lib/fault-inject.c puzzles me.

How do you want to proceed? Arguably uncovering and fixing those places
is good, but that's kind of an unintended consequence here.

BR,
Jani.


>
> --- a/mm/failslab.c~fault-inject-improve-build-for-config_fault_injection=n-fix
> +++ a/mm/failslab.c
> @@ -1,6 +1,7 @@
>  // SPDX-License-Identifier: GPL-2.0
>  #include <linux/fault-inject.h>
>  #include <linux/error-injection.h>
> +#include <linux/debugfs.h>
>  #include <linux/slab.h>
>  #include <linux/mm.h>
>  #include "slab.h"
> --- a/lib/fault-inject.c~fault-inject-improve-build-for-config_fault_injection=n-fix
> +++ a/lib/fault-inject.c
> @@ -2,6 +2,7 @@
>  #include <linux/kernel.h>
>  #include <linux/init.h>
>  #include <linux/random.h>
> +#include <linux/debugfs.h>
>  #include <linux/sched.h>
>  #include <linux/stat.h>
>  #include <linux/types.h>
> --- a/kernel/futex/core.c~fault-inject-improve-build-for-config_fault_injection=n-fix
> +++ a/kernel/futex/core.c
> @@ -34,6 +34,7 @@
>  #include <linux/compat.h>
>  #include <linux/jhash.h>
>  #include <linux/pagemap.h>
> +#include <linux/debugfs.h>
>  #include <linux/plist.h>
>  #include <linux/memblock.h>
>  #include <linux/fault-inject.h>
> _
>

-- 
Jani Nikula, Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ