From: David Hildenbrand <david@redhat.com>
To: Vitaly Chikunov <vt@altlinux.org>,
Andrew Morton <akpm@linux-foundation.org>,
Keith Busch <kbusch@kernel.org>, Yang Shi <shy828301@gmail.com>,
Zi Yan <ziy@nvidia.com>, Peter Xu <peterx@redhat.com>,
linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Nadav Amit <nadav.amit@gmail.com>, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] selftests/mm: Fix build with _FORTIFY_SOURCE
Date: Mon, 18 Mar 2024 11:02:39 +0100 [thread overview]
Message-ID: <b7c3a0be-00c6-4add-a3da-3c6195e47b7e@redhat.com> (raw)
In-Reply-To: <20240318023445.3192922-1-vt@altlinux.org>
On 18.03.24 03:34, Vitaly Chikunov wrote:
> Add missing flags argument to open(2) call with O_CREAT.
>
> Some tests fail to compile if _FORTIFY_SOURCE is defined (to any valid
> value) (together with -O), resulting in similar error messages such as:
>
> In file included from /usr/include/fcntl.h:342,
> from gup_test.c:1:
> In function 'open',
> inlined from 'main' at gup_test.c:206:10:
> /usr/include/bits/fcntl2.h:50:11: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments
> 50 | __open_missing_mode ();
> | ^~~~~~~~~~~~~~~~~~~~~~
>
> _FORTIFY_SOURCE is enabled by default in some distributions, so the
> tests are not built by default and are skipped.
>
> open(2) man-page warns about missing flags argument: "if it is not
> supplied, some arbitrary bytes from the stack will be applied as the
> file mode."
>
> Fixes: aeb85ed4f41a ("tools/testing/selftests/vm/gup_benchmark.c: allow user specified file")
> Fixes: fbe37501b252 ("mm: huge_memory: debugfs for file-backed THP split")
> Fixes: c942f5bd17b3 ("selftests: soft-dirty: add test for mprotect")
> Cc: Keith Busch <kbusch@kernel.org>
> Cc: Zi Yan <ziy@nvidia.com>
> Cc: Peter Xu <peterx@redhat.com>
> Cc: Yang Shi <shy828301@gmail.com>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Cc: Nadav Amit <nadav.amit@gmail.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
> ---
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2024-03-18 10:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240318023445.3192922-1-vt@altlinux.org>
2024-03-18 2:59 ` [PATCH] selftests/mm: Fix build with _FORTIFY_SOURCE Zi Yan
2024-03-18 10:02 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7c3a0be-00c6-4add-a3da-3c6195e47b7e@redhat.com \
--to=david@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nadav.amit@gmail.com \
--cc=peterx@redhat.com \
--cc=shuah@kernel.org \
--cc=shy828301@gmail.com \
--cc=vt@altlinux.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).