All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@ozlabs.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, mpe@ellerman.id.au,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V5 2/4] powerpc/mm: Add support for handling > 512TB address in SLB miss
Date: Wed, 21 Mar 2018 15:11:11 +1100	[thread overview]
Message-ID: <20180321041111.GA30287@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <20180318110558.30493-3-aneesh.kumar@linux.vnet.ibm.com>

On Sun, Mar 18, 2018 at 04:35:56PM +0530, Aneesh Kumar K.V wrote:

[snip]
> +static inline int get_ea_context(mm_context_t *ctx, unsigned long ea)
> +{
> +	int index = ea >> MAX_EA_BITS_PER_CONTEXT;
> +
> +	if (likely(index < ARRAY_SIZE(ctx->extended_id)))
> +		return ctx->extended_id[index];
> +	/* should never happen */
> +	BUG();

Are you absolutely sure that we can never get here with an address
greater than 4PB no matter what userspace does?

I would much prefer that we just return 0 here.  I can't see that the
kernel is in a position where it really cannot continue execution at
this point, so BUG is not appropriate.

Paul.

  reply	other threads:[~2018-03-21 10:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-18 11:05 [PATCH V5 0/4] Add support for 4PB virtual address space on hash Aneesh Kumar K.V
2018-03-18 11:05 ` [PATCH V5 1/4] powerpc/mm/slice: Consolidate the return path for the function Aneesh Kumar K.V
2018-03-18 11:05 ` [PATCH V5 2/4] powerpc/mm: Add support for handling > 512TB address in SLB miss Aneesh Kumar K.V
2018-03-21  4:11   ` Paul Mackerras [this message]
2018-03-18 11:05 ` [PATCH V5 3/4] powerpc/mm/hash64: Increase the VA range Aneesh Kumar K.V
2018-03-22 13:00   ` Michael Ellerman
2018-03-18 11:05 ` [PATCH V5 4/4] powerpc/mm/hash: Don't memset pgd table if not needed Aneesh Kumar K.V
2018-03-22 11:54   ` Michael Ellerman

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=20180321041111.GA30287@fergus.ozlabs.ibm.com \
    --to=paulus@ozlabs.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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.