All of lore.kernel.org
 help / color / mirror / Atom feed
From: gilles.chanteperdrix@xenomai.org (Gilles Chanteperdrix)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: avoid attempting to flush the gate_vma with VIVT caches
Date: Fri, 20 Jul 2012 22:41:15 +0200	[thread overview]
Message-ID: <5009C26B.6080901@xenomai.org> (raw)
In-Reply-To: <20120719122814.GE29153@mudshark.cambridge.arm.com>

On 07/19/2012 02:28 PM, Will Deacon wrote:
> Gilles, Uros,
> 
> On Mon, Jul 16, 2012 at 05:23:46PM +0100, Will Deacon wrote:
>> The vivt_flush_cache_{range,page} functions check that the mm_struct
>> of the VMA being flushed has been active on the current CPU before
>> performing the cache maintenance.
>>
>> The gate_vma has a NULL mm_struct pointer and, as such, will cause a
>> kernel fault if we try to flush it with the above operations. This
>> happens during ELF core dumps, which include the gate_vma as it may be
>> useful for debugging purposes.
>>
>> This patch adds checks to the VIVT cache flushing functions so that VMAs
>> with a NULL mm_struct are ignored.
> 
> Would one of you be able to test this patch please?

Sorry for the delay, I am getting this mail just now.

> I've not managed to
> trigger the bug you reported on my boards,

I found this bug with the LTP testsuite, more precisely the test named
"abort01".

> so it would be useful to know
> whether or not this patch solves the problem for you.

Fixes linux 3.4 bug for me. But... are you sure this is the right fix? I
mean you are adding an almost always useless test to many cache flushes,
except in one corner case. Would not it make more sense to make the fix
local, and fix gate_vma to have a static mm struct with a valid cpumask?
Being 0 or 1 whether we want to flush the vector page (I believe we do
not want to flush it, but am not sure).

-- 
                                                                Gilles.

  parent reply	other threads:[~2012-07-20 20:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16 16:23 [PATCH] ARM: mm: avoid attempting to flush the gate_vma with VIVT caches Will Deacon
2012-07-19 12:28 ` Will Deacon
2012-07-19 13:03   ` Uros Bizjak
2012-07-19 16:37     ` Will Deacon
2012-07-20 20:41   ` Gilles Chanteperdrix [this message]
2012-07-21 13:18     ` Gilles Chanteperdrix
2012-07-21 14:35       ` Will Deacon
2012-07-21 14:40         ` Gilles Chanteperdrix
2012-07-21 14:47           ` Gilles Chanteperdrix
2012-07-22 13:03             ` Will Deacon
2012-07-22 13:26               ` Gilles Chanteperdrix
2012-07-22 15:09                 ` Will Deacon
2012-07-22 15:35                   ` Gilles Chanteperdrix
2012-07-22 16:57                   ` Uros Bizjak

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=5009C26B.6080901@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --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.