From: Conor Dooley <conor@kernel.org>
To: Eva Kotova <nyandarknessgirl@gmail.com>
Cc: coelacanthus@outlook.com, c141028@gmail.com,
dramforever@live.com, linux-riscv@lists.infradead.org,
palmer@dabbelt.com, xc-tan@outlook.com
Subject: Re: [PATCH] riscv: mmap with PROT_WRITE but no PROT_READ is invalid
Date: Thu, 6 Oct 2022 20:29:14 +0100 [thread overview]
Message-ID: <Yz8siqARjLH07PFt@spud> (raw)
In-Reply-To: <a69ee775-e565-3d72-eb5f-8378616694d3@gmail.com>
Hey Eva,
Resending as I think I may have replied to a mail with an invalid
reply-to address?
On Thu, Oct 06, 2022 at 10:20:02PM +0300, Eva Kotova wrote:
> On Tue, 31 May 2022 00:56:52 PDT (-0700), coelacanthus@outlook.com wrote:
>> As mentioned in Table 4.5 in RISC-V spec Volume 2 Section 4.3, write
>> but not read is "Reserved for future use.". For now, they are not valid.
>> In the current code, -wx is marked as invalid, but -w- is not marked
>> as invalid.
>
> This patch breaks OpenJDK/Java on RISC-V, as it tries to create a w-only
> protective page:
>
> #
> # There is insufficient memory for the Java Runtime Environment to continue.
> # Native memory allocation (mmap) failed to map 4096 bytes for failed to
> allocate memory for PaX check.
> # An error report file with more information is saved as:
> # /root/hs_err_pid107.log
>
> I bisected to this commit since on Linux 5.19+ java no longer works.
> Perhaps some fallback should be implemented, to prevent userspace breakage.
> It is currently documented, that at least on i386 PROT_WRITE mappings imply
> PROT_READ (See man mmap(2) NOTES), this would be a good place to start.
Do these patches solve your problem by any chance?
https://lore.kernel.org/linux-riscv/20220915193702.2201018-1-abrestic@rivosinc.com/
I don't know the "area" at all, so it's a shot in the dark, but these
both have Fixes: tags for the patch that you are blaming.
Thanks,
Conor.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-10-06 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 7:56 [PATCH] riscv: mmap with PROT_WRITE but no PROT_READ is invalid Celeste Liu
2022-07-21 23:19 ` Palmer Dabbelt
2022-10-06 19:17 ` Eva Kotova
2022-10-06 19:29 ` Conor Dooley [this message]
2022-10-11 11:23 ` Heinrich Schuchardt
2022-10-11 11:31 ` Coelacanthus
2022-10-06 19:20 ` Eva Kotova
2022-10-06 19:26 ` Conor Dooley
2022-10-06 19:55 ` Eva Kotova
2022-10-06 20:03 ` Conor Dooley
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=Yz8siqARjLH07PFt@spud \
--to=conor@kernel.org \
--cc=c141028@gmail.com \
--cc=coelacanthus@outlook.com \
--cc=dramforever@live.com \
--cc=linux-riscv@lists.infradead.org \
--cc=nyandarknessgirl@gmail.com \
--cc=palmer@dabbelt.com \
--cc=xc-tan@outlook.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