linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	linux-arm-kernel@lists.infradead.org,
	Ravi Bangoria <ravi.bangoria@linux.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Kim Phillips <kim.phillips@arm.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	open list <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jiri Olsa <jolsa@redhat.com>,
	l.stach@pengutronix.de
Subject: Re: [PATCH 2/2] perf tests: Add a test for the ARM 32-bit [vectors] page
Date: Thu, 25 Oct 2018 19:03:32 +0100	[thread overview]
Message-ID: <20181025180332.GD30658@n2100.armlinux.org.uk> (raw)
In-Reply-To: <a6f5b6e7-4d3e-dd8f-4028-0ee370b11722@gmail.com>

On Thu, Oct 25, 2018 at 10:53:12AM -0700, Florian Fainelli wrote:
> Something like this below? It does not have to be an alternative
> solution, I would find it useful for perf to make sure the vectors page
> is present in the virtual address space by having an explicit test. perf
> maintains, what do you think?

Yep, I'd swap the two tests merely because the check for 'sig' will be
slightly cheaper than the mask-and-test of addr, but it probably doesn't
make that much difference.

> 
> diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
> index f4ea4c62c613..b045b48d368d 100644
> --- a/arch/arm/mm/fault.c
> +++ b/arch/arm/mm/fault.c
> @@ -173,6 +173,11 @@ __do_user_fault(struct task_struct *tsk, unsigned
> long addr,
>                 show_regs(regs);
>         }
>  #endif
> +#ifndef CONFIG_KUSER_HELPERS
> +       if (((addr & PAGE_MASK) == 0xffff0000) && (sig == SIGSEGV))
> +               printk(KERN_DEBUG "%s: CONFIG_KUSER_HELPERS disabled at
> 0x%08lx\n",
> +                      tsk->comm, addr);
> +#endif
> 
>         tsk->thread.address = addr;
>         tsk->thread.error_code = fsr;
> 
> 
> > 
> > BTW, I note that the help text for CONFIG_KUSER_HELPERS needs to be
> > updated.
> > 
> 
> 
> -- 
> Florian

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25  0:09 [PATCH 0/2] perf tests: Check for ARM " Florian Fainelli
2018-10-25  0:09 ` [PATCH 1/2] perf tools: Make find_vdso_map() more modular Florian Fainelli
2018-10-25  0:14   ` Florian Fainelli
2018-10-25  0:09 ` [PATCH 2/2] perf tests: Add a test for the ARM 32-bit [vectors] page Florian Fainelli
2018-10-25  2:10   ` Andrew Lunn
2018-10-25 17:19     ` Florian Fainelli
2018-10-25 17:32       ` Russell King - ARM Linux
2018-10-25 17:53         ` Florian Fainelli
2018-10-25 18:03           ` Russell King - ARM Linux [this message]
2018-10-31 22:21 ` [PATCH 0/2] perf tests: Check for ARM " Florian Fainelli

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=20181025180332.GD30658@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jolsa@redhat.com \
    --cc=kim.phillips@arm.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tmricht@linux.ibm.com \
    --subject='Re: [PATCH 2/2] perf tests: Add a test for the ARM 32-bit [vectors] page' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).