From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] arm64: failed when run the command: timedatectl set-timezone Asia/Shanghai
Date: Wed, 13 Jan 2016 18:47:07 +0000 [thread overview]
Message-ID: <20160113184707.GN23370@leverpostej> (raw)
In-Reply-To: <569682AE.3020300@codeaurora.org>
On Wed, Jan 13, 2016 at 12:00:30PM -0500, Christopher Covington wrote:
> On 01/13/2016 06:09 AM, Mark Rutland wrote:
> > On Wed, Jan 13, 2016 at 09:16:43AM +0800, Xishi Qiu wrote:
> >> In your issue, Tom Schuster said it sounds like bug 910845
> >> https://bugzilla.mozilla.org/show_bug.cgi?id=910845
> >
> > Controlled allocation as in this patch is probably a workable approach.
> >
> > However, the arm64 kernel can be built with a very small VA range, and
> > the base chosen is outside of the minimum range. The kernel currently
> > goes as low as 36 bits (with 16K pages), though the architectural
> > minimum seems to be 24 currently.
> >
> > To be safe for all configurations, I guess the best option is to
> > allocate as close to zero as possible, or to dynamically choose a base
> > depending on the VA range. I'm not sure how to correctly determine the
> > VA range from userspace, however.
>
> Below is how I ended up determining TASK_SIZE for Checkpoint/Restore In
> Userspace (CRIU).
>
> https://github.com/xemul/criu/commit/c0c0546c31e6df4932669f4740197bb830a24c8d
That's very scary. Any pages on a power of two boundary would get
unmapped, silently. That will corrupt data.
As above, the hard-code assumptions of a 39-bit minimum and a 48-bit
maximum are erroneous.
> If this is too hacky, my thought on a more proper interface would be to
> parallel how PAGE_SIZE is communicated. TASK_SIZE could be added to the
> ELF auxiliary vector, such that one could simply run `getconf TASK_SIZE`
> and sysconf(TASK_SIZE).
Assuming we don't have a reliable and safe mechanism already, something
like that sounds sensible to me.
Thanks,
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Christopher Covington <cov@codeaurora.org>
Cc: Xishi Qiu <qiuxishi@huawei.com>,
zhong jiang <zhongjiang@huawei.com>,
Steve Capper <steve.capper@linaro.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
catalin.marinas@arm.com
Subject: Re: [RFC] arm64: failed when run the command: timedatectl set-timezone Asia/Shanghai
Date: Wed, 13 Jan 2016 18:47:07 +0000 [thread overview]
Message-ID: <20160113184707.GN23370@leverpostej> (raw)
In-Reply-To: <569682AE.3020300@codeaurora.org>
On Wed, Jan 13, 2016 at 12:00:30PM -0500, Christopher Covington wrote:
> On 01/13/2016 06:09 AM, Mark Rutland wrote:
> > On Wed, Jan 13, 2016 at 09:16:43AM +0800, Xishi Qiu wrote:
> >> In your issue, Tom Schuster said it sounds like bug 910845
> >> https://bugzilla.mozilla.org/show_bug.cgi?id=910845
> >
> > Controlled allocation as in this patch is probably a workable approach.
> >
> > However, the arm64 kernel can be built with a very small VA range, and
> > the base chosen is outside of the minimum range. The kernel currently
> > goes as low as 36 bits (with 16K pages), though the architectural
> > minimum seems to be 24 currently.
> >
> > To be safe for all configurations, I guess the best option is to
> > allocate as close to zero as possible, or to dynamically choose a base
> > depending on the VA range. I'm not sure how to correctly determine the
> > VA range from userspace, however.
>
> Below is how I ended up determining TASK_SIZE for Checkpoint/Restore In
> Userspace (CRIU).
>
> https://github.com/xemul/criu/commit/c0c0546c31e6df4932669f4740197bb830a24c8d
That's very scary. Any pages on a power of two boundary would get
unmapped, silently. That will corrupt data.
As above, the hard-code assumptions of a 39-bit minimum and a 48-bit
maximum are erroneous.
> If this is too hacky, my thought on a more proper interface would be to
> parallel how PAGE_SIZE is communicated. TASK_SIZE could be added to the
> ELF auxiliary vector, such that one could simply run `getconf TASK_SIZE`
> and sysconf(TASK_SIZE).
Assuming we don't have a reliable and safe mechanism already, something
like that sounds sensible to me.
Thanks,
Mark.
next prev parent reply other threads:[~2016-01-13 18:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 2:47 [RFC] arm64: failed when run the command: timedatectl set-timezone Asia/Shanghai Xishi Qiu
2016-01-12 2:47 ` Xishi Qiu
2016-01-12 3:32 ` Xishi Qiu
2016-01-12 3:32 ` Xishi Qiu
2016-01-12 10:59 ` Steve Capper
2016-01-12 10:59 ` Steve Capper
2016-01-13 1:16 ` Xishi Qiu
2016-01-13 1:16 ` Xishi Qiu
2016-01-13 11:09 ` Mark Rutland
2016-01-13 11:09 ` Mark Rutland
2016-01-13 17:00 ` Christopher Covington
2016-01-13 17:00 ` Christopher Covington
2016-01-13 18:47 ` Mark Rutland [this message]
2016-01-13 18:47 ` Mark Rutland
2016-01-14 1:48 ` Xishi Qiu
2016-01-14 1:48 ` Xishi Qiu
2016-01-14 10:34 ` Mark Rutland
2016-01-14 10:34 ` Mark Rutland
2016-01-18 7:23 ` Jon Masters
2016-01-18 7:23 ` Jon Masters
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=20160113184707.GN23370@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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.