Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@debian.org>
To: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: "Pali Rohár" <pali.rohar@gmail.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Linux OMAP Mailing List" <linux-omap@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	freemangordon@abv.bg
Subject: Re: Re: [PATCH] ARM: OMAP2+: Add support for thumb mode on DT booted N900
Date: Thu, 6 Feb 2014 01:39:58 +0100	[thread overview]
Message-ID: <20140206003958.GB654@earth.universe> (raw)
In-Reply-To: <52F29F7C.4080502@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]

Hi,

On Wed, Feb 05, 2014 at 10:30:52PM +0200, Ivaylo Dimitrov wrote:
> In theory having that workaround disabled might be a security
> problem, but honestly, knowing its nature I don't think it is easily
> exploitable, if at all. The final result when bitten by it is a
> SIGILL, but in userspace, not in the kernel(assuming the kernel is
> ARM), and userspace runs in totally different mode (nonsecure,
> nonprivileged) compared to the kernel(nonsecure, privileged) and
> IIRC every mode has its own set of stack, registers etc. BTW I don't
> think the kernel itself can be thumb2-compiled for cores with that
> errata, but I might wrong. Also, as Pali noted, the problem appears
> if and only if there is an userspace binary containing thumb2 code.
> If all of the userspace is pure ARM, there is no problem.

Ok. I assumed, that a single thumb2-compiled binary can potentially
trigger problems for the whole system. Basically because the ERRATA
helptext in KConfig is:

[...], Cortex-A8 does not recover from the stale interworking branch
prediction.

> And as the errata workaround has its drawbacks (BTB is cleared on
> every context switch which affects performance), one might want to
> not have it enabled.

I guess the workaround would be persistently enabled if there were
no drawbacks.

> Maybe that warning should be spit only if CONFIG_THUMB2_KERNEL (or
> whatever the option was) is enabled. Though if that option is
> enabled I'd rather #error during compile time if errata workaround
> is not enabled, instead of printing a warning while booting a
> system that will crash in a matter of seconds.

THUMB2 userland code is supported by the kernel by default, so that
does not work. (Enabling CONFIG_THUMB2_KERNEL will result in a
thumb2-compiled kernel.)

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-02-06  0:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 12:33 [PATCH] ARM: OMAP2+: Add support for thumb mode on DT booted N900 Sebastian Reichel
2014-02-05 13:12 ` Pali Rohár
2014-02-05 16:31   ` Sebastian Reichel
2014-02-05 16:38     ` Pali Rohár
2014-02-05 17:17       ` Sebastian Reichel
2014-02-05 20:30         ` Ivaylo Dimitrov
2014-02-06  0:39           ` Sebastian Reichel [this message]
2014-02-05 20:42         ` Pali Rohár
2014-02-06  0:25           ` Sebastian Reichel
2014-02-16 23:04 ` Pavel Machek
2014-02-17 21:30 ` [PATCHv2] " Sebastian Reichel
2014-02-21 23:08   ` Tony Lindgren
2014-03-01 21:32   ` Pali Rohár

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=20140206003958.GB654@earth.universe \
    --to=sre@debian.org \
    --cc=freemangordon@abv.bg \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox