From: Ramalingam C <ramalingam.c@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] i915/gem_caching: Fix mmap protection for writes
Date: Fri, 7 Aug 2020 00:40:46 +0530 [thread overview]
Message-ID: <20200806191042.GA451@intel.com> (raw)
In-Reply-To: <20200806183143.311857-1-chris@chris-wilson.co.uk>
On 2020-08-06 at 19:31:43 +0100, Chris Wilson wrote:
> As we are about to write into the mmap'ed pointer using memset, we need
> to specify PROT_WRITE [if we only say PROT_READ, then the memset should
> generate a SIGSEGV].
>
> Fixes: 897d21d14e99 ("i915/gem_caching: Remove libdrm dependency")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> ---
> tests/i915/gem_caching.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_caching.c b/tests/i915/gem_caching.c
> index 1d8989db7..894c4b12e 100644
> --- a/tests/i915/gem_caching.c
> +++ b/tests/i915/gem_caching.c
> @@ -282,7 +282,7 @@ igt_main
> val2 = i + 63;
> cpu_ptr = gem_mmap__cpu(data.fd, scratch_buf->handle,
> 0, scratch_buf->surface[0].size,
> - PROT_READ);
> + PROT_WRITE);
>
> memset(cpu_ptr + start, val2, len);
>
> --
> 2.28.0
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
WARNING: multiple messages have this Message-ID (diff)
From: Ramalingam C <ramalingam.c@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Subject: Re: [Intel-gfx] [PATCH i-g-t] i915/gem_caching: Fix mmap protection for writes
Date: Fri, 7 Aug 2020 00:40:46 +0530 [thread overview]
Message-ID: <20200806191042.GA451@intel.com> (raw)
In-Reply-To: <20200806183143.311857-1-chris@chris-wilson.co.uk>
On 2020-08-06 at 19:31:43 +0100, Chris Wilson wrote:
> As we are about to write into the mmap'ed pointer using memset, we need
> to specify PROT_WRITE [if we only say PROT_READ, then the memset should
> generate a SIGSEGV].
>
> Fixes: 897d21d14e99 ("i915/gem_caching: Remove libdrm dependency")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> Cc: Ramalingam C <ramalingam.c@intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
> ---
> tests/i915/gem_caching.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_caching.c b/tests/i915/gem_caching.c
> index 1d8989db7..894c4b12e 100644
> --- a/tests/i915/gem_caching.c
> +++ b/tests/i915/gem_caching.c
> @@ -282,7 +282,7 @@ igt_main
> val2 = i + 63;
> cpu_ptr = gem_mmap__cpu(data.fd, scratch_buf->handle,
> 0, scratch_buf->surface[0].size,
> - PROT_READ);
> + PROT_WRITE);
>
> memset(cpu_ptr + start, val2, len);
>
> --
> 2.28.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-08-06 19:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 18:31 [igt-dev] [PATCH i-g-t] i915/gem_caching: Fix mmap protection for writes Chris Wilson
2020-08-06 18:31 ` [Intel-gfx] " Chris Wilson
2020-08-06 19:10 ` Ramalingam C [this message]
2020-08-06 19:10 ` Ramalingam C
2020-08-06 19:20 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-08-07 4:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-08-07 8:04 ` [igt-dev] [PATCH i-g-t] " Grzegorzek, Dominik
2020-08-07 8:04 ` [Intel-gfx] " Grzegorzek, Dominik
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=20200806191042.GA451@intel.com \
--to=ramalingam.c@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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 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.