Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2008 17:36:32 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        arch@FreeBSD.ORG
Subject:   Re: Proposal: a revoke() system call
Message-ID:  <20080708153632.GI14567@hoeg.nl>
In-Reply-To: <20080708161802.N89342@fledge.watson.org>
References:  <9484951.340521215467447990.JavaMail.root@vms126.mailsrvcs.net> <20080708001929.E63144@fledge.watson.org> <20080708161802.N89342@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--wwX5Nmi7feudBrEr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello Robert,

* Robert Watson <rwatson@FreeBSD.org> wrote:
> BTW, on a similar note to the above: I've noticed there are several spots=
=20
> of relative non-atomicity in the Linux emulation code, where rather than=
=20
> just wrapping existing system calls with binary conversion of arguments=
=20
> and return values, we do a semantic wrapping that is necessarily=20
> non-atomic with respect to the native code.  For example, consider the=20
> Linuxulator open code in linux_common_open():

I also noticed similar constructs inside the stat() calls, to translate
device major/minor numbers. As you can see, some stat() routines call
translate_path_major_minor_at() after performing the regular stat()
operation. The translate_path_major_minor_at() is implemented by
calling kern_openat(). This has three disadvantages:

- It is non-atomic.

- It can only perform the translation on nodes it has O_RDONLY access
  to. This shouldn't be a big problem, but may cause inconsistencies
  when users look around in devfs.

- The translation may not always work when the calling process is out of
  file descriptors.

Yours,
--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--wwX5Nmi7feudBrEr
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkhziYAACgkQ52SDGA2eCwUufgCdFABNXxHgwgRGa466AlktkxDv
7AgAnjCTLlEcDeG+6WL7bruGhIwE7on7
=meaN
-----END PGP SIGNATURE-----

--wwX5Nmi7feudBrEr--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080708153632.GI14567>