Thread (8 messages) 8 messages, 3 authors, 2018-03-22

Re: [PATCH V5 2/4] powerpc/mm: Add support for handling > 512TB address in SLB miss

flat view

From: Paul Mackerras <hidden>
Date: 2018-03-21 10:25:54

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

[snip]
quoted hunk ↗ jump to hunk
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help