From: Dmitry Vyukov <dvyukov@google.com>
To: tadeusz.struk@linaro.org
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] usb: mon: make mmapped memory read only
Date: Mon, 19 Sep 2022 06:25:33 +0200 [thread overview]
Message-ID: <20220919042533.2688081-1-dvyukov@google.com> (raw)
In-Reply-To: <20220916224741.2269649-1-tadeusz.struk@linaro.org>
Hi Tadeusz,
Looking at places like these:
https://elixir.bootlin.com/linux/v6.0-rc5/source/drivers/infiniband/hw/qib/qib_file_ops.c#L736
https://elixir.bootlin.com/linux/v6.0-rc5/source/drivers/infiniband/hw/mlx5/main.c#L2088
I think we also need to remove VM_MAYWRITE, otherwise it's still
possible to turn it into a writable mapping with mprotect.
It's also probably better to return an error if VM_WRITE (or VM_EXEC?) is set
rather than silently fix it up.
next prev parent reply other threads:[~2022-09-19 4:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 22:47 Tadeusz Struk
2022-09-17 4:14 ` Tadeusz Struk
2022-09-19 4:25 ` Dmitry Vyukov [this message]
2022-09-19 11:21 ` Dmitry Vyukov
2022-09-19 14:53 ` Tadeusz Struk
2022-09-19 21:59 ` [PATCH v2] " Tadeusz Struk
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=20220919042533.2688081-1-dvyukov@google.com \
--to=dvyukov@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tadeusz.struk@linaro.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
all inboxes | Powered by JetHome®