mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Manfred Spraul <manfred@colorfullife.com>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: Georg Nikodym <georgn@somanetworks.com>, linux-kernel@vger.kernel.org
Subject: Re: v2.4.19-rmk4 slab.c: /proc/slabinfo uses broken instead of slab labels
Date: Fri, 29 Nov 2002 22:51:52 +0000	[thread overview]
Message-ID: <20021129225152.C4496@flint.arm.linux.org.uk> (raw)
In-Reply-To: <3DE7B0C2.7050301@colorfullife.com>; from manfred@colorfullife.com on Fri, Nov 29, 2002 at 07:24:02PM +0100

On Fri, Nov 29, 2002 at 07:24:02PM +0100, Manfred Spraul wrote:
> Russell King wrote:
> >On Thu, Nov 28, 2002 at 11:34:20PM +0100, Manfred Spraul wrote:
> >  
> >
> >>On i386, it's possible to skip set_fs() and use __get_user() - but 
> >>that's i386 specific. For example the i386 oops code uses that.
> >>    
> >>
> >
> >That isn't actually an x86 specific feature - it is a requirement across
> >all architectures that get_user() and friends can access kernel areas
> >after set_fs(get_ds())
> >  
> >
> It's i386 specific that
>     __get_user().
> is equivalent to
>     set_fs(KERNEL_DS)
>     get_user()
> arch/i386/kernel/traps.c uses that in the fault code.
> 
> Portable code must use set_fs()/get_user(), i386 specific code can 
> continue to use __get_user().

That seems broken to me.  IIRC, when all this uaccess stuff went in back
in 2.1 times, the original intention was that __get_user() would fault
even when used from kernel mode, unless set_fs(KERNEL_DS) was in effect.

__get_user() at that time was always meant to be used as a faster version
of get_user(), even by generic code, and relied solely on the TLB protection
mechanisms, whereas get_user() verified the address.

Gah, I _really_ wish that we had a method to notify architecture maintainers
when this type of stuff changes.  Are we supposed to re-read the x86
implementation of everything for each kernel release to try to discover
what subtle semantics have changed?

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2002-11-29 22:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-28 22:34 Manfred Spraul
2002-11-28 22:40 ` Russell King
2002-11-29 18:24   ` Manfred Spraul
2002-11-29 22:51     ` Russell King [this message]
2002-11-29 23:33       ` Manfred Spraul
  -- strict thread matches above, loose matches on Subject: below --
2002-11-27 20:15 Georg Nikodym
2002-11-27 21:40 ` Georg Nikodym

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=20021129225152.C4496@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=georgn@somanetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®