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: <CAC1kPDM76fLgE-cbKvMO3=B1hKhjTNMYmJw5XpOPV5UAxXx=Yg@mail.gmail.com>
Date: Thu, 19 Jun 2025 15:43:31 +0800
From: Chen Linxuan <chenlinxuan@...ontech.com>
To: Shuah Khan <skhan@...uxfoundation.org>
Cc: Chen Linxuan <chenlinxuan@...ontech.com>, Shuah Khan <shuah@...nel.org>, zhanjun@...ontech.com, 
	niecheng1@...ontech.com, linux-kselftest@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] selftests/memfd: clean Makefile

On Thu, Jun 19, 2025 at 5:21 AM Shuah Khan <skhan@...uxfoundation.org> wrote:
>
> On 6/9/25 20:05, Chen Linxuan wrote:
> > When writing a test for fusectl, I referred to this Makefile as a
> > reference for creating a FUSE daemon in the selftests.
> > While doing so, I noticed that there is a minor issue in the Makefile.
>
> What happens if this change isn't made?

Nothing will happen.
When I was writing tests for the fusectl filesystem in the kernel repository,
I came across this file as a reference.
Then I found that the process of passing CFLAGS was not correct.
So, for the reason of not wanting others to be misled again,
I want to update the compilation process here.

>
> >
> > The fuse_mnt.c file is not actually compiled into fuse_mnt.o,
> > and the code setting CFLAGS for it never takes effect.
> > The reason fuse_mnt compiles successfully is because CFLAGS is set
> > at the very beginning of the file.
> >
> > Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
> > ---
> >   tools/testing/selftests/memfd/Makefile | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile
> > index 163b6f68631c4..e9b886c65153d 100644
> > --- a/tools/testing/selftests/memfd/Makefile
> > +++ b/tools/testing/selftests/memfd/Makefile
> > @@ -1,5 +1,4 @@
> >   # SPDX-License-Identifier: GPL-2.0
> > -CFLAGS += -D_FILE_OFFSET_BITS=64
>
> What's the reason for deleting the above?

The CFLAGS update here actually doesn't take effect.
I believe it is the -D_FILE_OFFSET_BITS=64 in VAR_CFLAGS that truly
takes effect.

>
> >   CFLAGS += $(KHDR_INCLUDES)
> >
> >   TEST_GEN_PROGS := memfd_test
> > @@ -16,10 +15,9 @@ ifeq ($(VAR_LDLIBS),)
> >   VAR_LDLIBS := -lfuse -pthread
> >   endif
> >
> > -fuse_mnt.o: CFLAGS += $(VAR_CFLAGS)
> > -
> >   include ../lib.mk
> >
> > +$(OUTPUT)/fuse_mnt: CFLAGS += $(VAR_CFLAGS)
> >   $(OUTPUT)/fuse_mnt: LDLIBS += $(VAR_LDLIBS)
> >
> >   $(OUTPUT)/memfd_test: memfd_test.c common.c
>
> thanks,
> -- Shuah
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ