From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: Florian Weimer <fweimer@redhat.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [v2, 1/5] powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation
Date: Tue, 14 Nov 2017 22:12:21 +1100 (AEDT) [thread overview]
Message-ID: <3yblGG320nz9rxl@ozlabs.org> (raw)
In-Reply-To: <20171109172740.19681-2-npiggin@gmail.com>
On Thu, 2017-11-09 at 17:27:36 UTC, Nicholas Piggin wrote:
> When allocating VA space with a hint that crosses 128TB, the SLB addr_limit
> variable is not expanded if addr is not > 128TB, but the slice allocation
> looks at task_size, which is 512TB. This results in slice_check_fit()
> incorrectly succeeding because the slice_count truncates off bit 128 of the
> requested mask, so the comparison to the available mask succeeds.
>
> Fix this by using mm->context.addr_limit instead of mm->task_size for
> testing allocation limits. This causes such allocations to fail.
>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> Fixes: f4ea6dcb08 ("powerpc/mm: Enable mappings above 128TB")
> Reported-by: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/6a72dc038b615229a1b285829d6c83
cheers
next prev parent reply other threads:[~2017-11-14 11:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 17:27 [PATCH v2 0/5] powerpc VA allocator fixes for 512TB support Nicholas Piggin
2017-11-09 17:27 ` [PATCH v2 1/5] powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation Nicholas Piggin
2017-11-13 4:59 ` Aneesh Kumar K.V
2017-11-13 7:36 ` Nicholas Piggin
2017-11-14 11:12 ` Michael Ellerman [this message]
2017-11-09 17:27 ` [PATCH v2 2/5] powerpc/64s/hash: Fix fork() with 512TB process address space Nicholas Piggin
2017-11-13 4:59 ` Aneesh Kumar K.V
2017-11-09 17:27 ` [PATCH v2 3/5] powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary Nicholas Piggin
2017-11-13 4:59 ` Aneesh Kumar K.V
2017-11-09 17:27 ` [PATCH v2 4/5] powerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation Nicholas Piggin
2017-11-13 5:01 ` Aneesh Kumar K.V
2017-11-09 17:27 ` [PATCH v2 5/5] powerpc/64s: mm_context.addr_limit is only used on hash Nicholas Piggin
2017-11-13 5:01 ` Aneesh Kumar K.V
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=3yblGG320nz9rxl@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=fweimer@redhat.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.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.