mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Cc: "Khachaturov, Vassilii" <Vassilii.Khachaturov@comverse.com>,
	linux-kernel@vger.kernel.org
Subject: Re: uid_t and gid_t vs.  __kernel_uid_t and __kernel_gid_t
Date: Wed, 16 May 2001 01:33:55 -0300	[thread overview]
Message-ID: <20010516013355.A1299@bacchus.dhis.org> (raw)
In-Reply-To: <2E927786773@vcnet.vc.cvut.cz>
In-Reply-To: <2E927786773@vcnet.vc.cvut.cz>; from VANDROVE@vc.cvut.cz on Mon, May 14, 2001 at 09:14:26PM +0000

On Mon, May 14, 2001 at 09:14:26PM +0000, Petr Vandrovec wrote:

> > I had to communicate uid/gid from an application down 
> > to a driver, and discovered that uid and gid in user
> > space are different from those in kernel space.
> 
> ncpfs uses 'unsigned long' in its ncp_mount_data_v4, as MIPS uses
> 'long' type for uid/gid. Unfortunately it still needs conversions
> on some archs, so maybe using u_int64_t is just best solution
> (AFAIK as MIPS unsigned long is 64bit, you have to use u_int64_t
> if you want same type accross architectures).

Only for the 64 bit ABI and kernel on MIPS have a long data type of 64 bits.
General rule for Linux sizeof(pointer) = sizeof(long).

> Kernel part then just checks wheter uid == (__kernel_uid_t)uid and 
> gives up if they differ.

Otherwise funny ones line (u16) 65536 == 0 -> root access could happen ...

  Ralf

  reply	other threads:[~2001-05-17 19:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-14 21:14 Petr Vandrovec
2001-05-16  4:33 ` Ralf Baechle [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-14 19:37 Khachaturov, Vassilii
2001-05-14 19:49 ` Chris Wing
2001-05-14 19:27 Chris Wing
2001-05-14 19:00 Khachaturov, Vassilii

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=20010516013355.A1299@bacchus.dhis.org \
    --to=ralf@uni-koblenz.de \
    --cc=VANDROVE@vc.cvut.cz \
    --cc=Vassilii.Khachaturov@comverse.com \
    --cc=linux-kernel@vger.kernel.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 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®