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, 1 Nov 2021 12:42:22 +0100
From:   Jan Kara <jack@...e.cz>
To:     Gabriel Krisman Bertazi <krisman@...labora.com>
Cc:     Guenter Roeck <linux@...ck-us.net>, jack@...e.com,
        amir73il@...il.com, djwong@...nel.org, tytso@....edu,
        david@...morbit.com, dhowells@...hat.com, khazhy@...gle.com,
        linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
        linux-api@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v8 31/32] samples: Add fs error monitoring example

On Thu 28-10-21 15:56:28, Gabriel Krisman Bertazi wrote:
> Guenter Roeck <linux@...ck-us.net> writes:
> 
> > On Mon, Oct 18, 2021 at 09:00:14PM -0300, Gabriel Krisman Bertazi wrote:
> >> Introduce an example of a FAN_FS_ERROR fanotify user to track filesystem
> >> errors.
> >> 
> >> Reviewed-by: Amir Goldstein <amir73il@...il.com>
> >> Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
> >> Reviewed-by: Jan Kara <jack@...e.cz>
> >> ---
> >> Changes since v4:
> >>   - Protect file_handle defines with ifdef guards
> >> 
> >> Changes since v1:
> >>   - minor fixes
> >> ---
> >>  samples/Kconfig               |   9 +++
> >>  samples/Makefile              |   1 +
> >>  samples/fanotify/Makefile     |   5 ++
> >>  samples/fanotify/fs-monitor.c | 142 ++++++++++++++++++++++++++++++++++
> >>  4 files changed, 157 insertions(+)
> >>  create mode 100644 samples/fanotify/Makefile
> >>  create mode 100644 samples/fanotify/fs-monitor.c
> >> 
> >> diff --git a/samples/Kconfig b/samples/Kconfig
> >> index b0503ef058d3..88353b8eac0b 100644
> >> --- a/samples/Kconfig
> >> +++ b/samples/Kconfig
> >> @@ -120,6 +120,15 @@ config SAMPLE_CONNECTOR
> >>  	  with it.
> >>  	  See also Documentation/driver-api/connector.rst
> >>  
> >> +config SAMPLE_FANOTIFY_ERROR
> >> +	bool "Build fanotify error monitoring sample"
> >> +	depends on FANOTIFY
> >
> > This needs something like
> > 	depends on CC_CAN_LINK
> > or possibly even
> > 	depends on CC_CAN_LINK && HEADERS_INSTALL
> > to avoid compilation errors such as
> >
> > samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file or directory
> >     7 | #include <errno.h>
> >       |          ^~~~~~~~~
> > compilation terminated.
> >
> > when using a toolchain without C library support, such as those provided
> > on kernel.org.
> 
> Thank you, Guenter.
> 
> We discussed this, but I wasn't sure how to silence the error and it
> didn't trigger in the past versions.
> 
> The original patch is already in Jan's tree.  Jan, would you pick the
> pack below to address it?  Feel free to squash it into the original
> commit, if you think it is saner..

Thanks guys, I've added the patch to my tree. If we had more time, I'd
probably squash it but given I'd like to send Linus a pull request at the
end of the week I don't want to touch commits that are already in next.

								Honza

> -- >8 --
> From: Gabriel Krisman Bertazi <krisman@...labora.com>
> Date: Thu, 28 Oct 2021 15:34:46 -0300
> Subject: [PATCH] samples: Make fs-monitor depend on libc and headers
> 
> Prevent build errors when headers or libc are not available, such as on
> kernel build bots, like the below:
> 
> samples/fanotify/fs-monitor.c:7:10: fatal error: errno.h: No such file
> or directory
>   7 | #include <errno.h>
>     |          ^~~~~~~~~
> 
> Suggested-by: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Gabriel Krisman Bertazi <krisman@...labora.com>
> ---
>  samples/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/Kconfig b/samples/Kconfig
> index 88353b8eac0b..56539b21f2c7 100644
> --- a/samples/Kconfig
> +++ b/samples/Kconfig
> @@ -122,7 +122,7 @@ config SAMPLE_CONNECTOR
>  
>  config SAMPLE_FANOTIFY_ERROR
>  	bool "Build fanotify error monitoring sample"
> -	depends on FANOTIFY
> +	depends on FANOTIFY && CC_CAN_LINK && HEADERS_INSTALL
>  	help
>  	  When enabled, this builds an example code that uses the
>  	  FAN_FS_ERROR fanotify mechanism to monitor filesystem
> -- 
> 2.33.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ