All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] SMAP-detected direct userspace access
Date: Sun, 27 Dec 2015 18:00:02 +0100	[thread overview]
Message-ID: <56801912.3080408@web.de> (raw)
In-Reply-To: <20151218171203.GC21744@hermes.click-hack.org>

On 2015-12-18 18:12, Gilles Chanteperdrix wrote:
> On Fri, Dec 18, 2015 at 05:23:55PM +0100, Jan Kiszka wrote:
>> Hi all,
>>
>> I know this is legacy code, but this is where we currently stumbled into
>> it, and maybe the same pattern also exists in 3.x:
>>
>> http://git.xenomai.org/xenomai-2.6.git/tree/ksrc/skins/posix/syscall.c#n1182
>>
>> more precisely:
>>
>>     return pse51_mutex_check_init(&umx->shadow_mutex, attr);
>>
>> Here we pass the userspace object for initialization to the core instead
>> of handing over the kernel shadow and then copying over the result. Is
>> there a reason for this? Could we have more of such cases?
>>
>> Background: SMAP detects and prevents any direct userspace memory access
>> on x86 except or those that are wrapped in stac() and clac() (which
>> toggle a bit in eflags). Generally a useful feature we should allow to
>> be enabled for robustness reasons.
> 
> BTW, I believe most RTnet ioctls have this issue.
> 

Correct, long-pending deficit that will now start to bite back more
seriously. I was always postponing this until some potential userspace
ABI overhaul.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://xenomai.org/pipermail/xenomai/attachments/20151227/f642dd2d/attachment.sig>

  reply	other threads:[~2015-12-27 17:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 16:23 [Xenomai] SMAP-detected direct userspace access Jan Kiszka
2015-12-18 16:37 ` Philippe Gerum
2015-12-18 17:06 ` Gilles Chanteperdrix
2015-12-18 17:12 ` Gilles Chanteperdrix
2015-12-27 17:00   ` Jan Kiszka [this message]
2015-12-27 17:41     ` Gilles Chanteperdrix
2015-12-27 17:42       ` Jan Kiszka

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=56801912.3080408@web.de \
    --to=jan.kiszka@web.de \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.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.