From: Richard Palethorpe <rpalethorpe@suse.de>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] security/dirtypipe: Add test for CVE-2022-0847
Date: Wed, 13 Jul 2022 06:19:07 +0100 [thread overview]
Message-ID: <8735f5oae1.fsf@suse.de> (raw)
In-Reply-To: <1657598596-2296-1-git-send-email-xuyang2018.jy@fujitsu.com>
Hello,
Yang Xu <xuyang2018.jy@fujitsu.com> writes:
> +static void run(void)
> +{
> + off_t offset;
> + int data_size, len;
> + ssize_t nbytes;
> +
> + offset = 1;
Still setting offset to 1.
> + data_size = strlen(TEXT);
> +
> + fd = SAFE_OPEN(TESTFILE, O_RDONLY);
> +
> + prepare_pipe();
> +
> + offset = 0;
> + /*
> + * splice one byte from the start into the pipe;
> + * this will add a reference to the page cache, but since
> + * copy_page_to_iter_pipe() does not initialize the "flags",
> + * PIPE_BUF_FLAG_CAN_MERGE is still set
> + */
> + nbytes = splice(fd, &offset, p[1], NULL, 1, 0);
As offset is 0 we can just pass NULL. Otherwise all looks good, I'll fix
it up and merge it.
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-07-13 5:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-07 10:44 [LTP] [PATCH] security/dirtypipe: Add test for CVE-2022-0847 Yang Xu
2022-07-11 10:26 ` Richard Palethorpe
2022-07-12 1:44 ` xuyang2018.jy
2022-07-12 4:03 ` [LTP] [PATCH v2] " Yang Xu
2022-07-13 5:19 ` Richard Palethorpe [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=8735f5oae1.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=ltp@lists.linux.it \
--cc=xuyang2018.jy@fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.