From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
To: Andrei Vagin <avagin@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
David Hildenbrand <david@redhat.com>,
Shuah Khan <shuah@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
criu@lists.linux.dev, Andrei Vagin <avagin@gmail.com>
Subject: Re: [PATCH 2/3] tools headers UAPI: Sync linux/fs.h with the kernel sources
Date: Mon, 31 Mar 2025 12:27:05 +0100 [thread overview]
Message-ID: <1d9f9bab-6e0a-4b30-82b3-774bd0d9465c@lucifer.local> (raw)
In-Reply-To: <20250324065328.107678-3-avagin@google.com>
On Mon, Mar 24, 2025 at 06:53:27AM +0000, Andrei Vagin wrote:
> From: Andrei Vagin <avagin@gmail.com>
>
> Required for a new PAGEMAP_SCAN test to verify guard region reporting.
>
> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> ---
> tools/include/uapi/linux/fs.h | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/tools/include/uapi/linux/fs.h b/tools/include/uapi/linux/fs.h
> index 8a27bc5c7a7f..24ddf7bc4f25 100644
> --- a/tools/include/uapi/linux/fs.h
> +++ b/tools/include/uapi/linux/fs.h
> @@ -40,6 +40,15 @@
> #define BLOCK_SIZE_BITS 10
> #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
>
> +/* flags for integrity meta */
> +#define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */
> +#define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */
> +#define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */
> +
> +#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \
> + IO_INTEGRITY_CHK_REFTAG | \
> + IO_INTEGRITY_CHK_APPTAG)
> +
> #define SEEK_SET 0 /* seek relative to beginning of file */
> #define SEEK_CUR 1 /* seek relative to current file position */
> #define SEEK_END 2 /* seek relative to end of file */
> @@ -329,9 +338,16 @@ typedef int __bitwise __kernel_rwf_t;
> /* per-IO negation of O_APPEND */
> #define RWF_NOAPPEND ((__force __kernel_rwf_t)0x00000020)
>
> +/* Atomic Write */
> +#define RWF_ATOMIC ((__force __kernel_rwf_t)0x00000040)
> +
> +/* buffered IO that drops the cache after reading or writing data */
> +#define RWF_DONTCACHE ((__force __kernel_rwf_t)0x00000080)
> +
> /* mask of flags supported by the kernel */
> #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
> - RWF_APPEND | RWF_NOAPPEND)
> + RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
> + RWF_DONTCACHE)
>
> #define PROCFS_IOCTL_MAGIC 'f'
>
> @@ -347,6 +363,7 @@ typedef int __bitwise __kernel_rwf_t;
> #define PAGE_IS_PFNZERO (1 << 5)
> #define PAGE_IS_HUGE (1 << 6)
> #define PAGE_IS_SOFT_DIRTY (1 << 7)
> +#define PAGE_IS_GUARD (1 << 8)
>
> /*
> * struct page_region - Page region with flags
> --
> 2.49.0.395.g12beb8f557-goog
>
next prev parent reply other threads:[~2025-03-31 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-24 6:53 [PATCH 0/3 v2] fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions Andrei Vagin
2025-03-24 6:53 ` [PATCH 1/3] " Andrei Vagin
2025-03-24 6:53 ` [PATCH 2/3] tools headers UAPI: Sync linux/fs.h with the kernel sources Andrei Vagin
2025-03-31 11:27 ` Lorenzo Stoakes [this message]
2025-03-24 6:53 ` [PATCH 3/3] selftests/mm: add PAGEMAP_SCAN guard region test Andrei Vagin
2025-03-31 11:27 ` Lorenzo Stoakes
2025-03-31 11:26 ` [PATCH 0/3 v2] fs/proc: extend the PAGEMAP_SCAN ioctl to report guard regions Lorenzo Stoakes
2025-03-31 16:12 ` Andrei Vagin
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=1d9f9bab-6e0a-4b30-82b3-774bd0d9465c@lucifer.local \
--to=lorenzo.stoakes@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@gmail.com \
--cc=avagin@google.com \
--cc=corbet@lwn.net \
--cc=criu@lists.linux.dev \
--cc=david@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
/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