From: Samuel Thibault Subject: Re: POC: ncurses in stubdom Date: Tue, 28 Apr 2009 22:13:03 +0200 Message-ID: <20090428201303.GK5777@const.famille.thibault.fr> References: <877i163pga.fsf@tac.ki.iif.hu> <20090427185955.GF5965@const.famille.thibault.fr> <873abt51e5.fsf@tac.ki.iif.hu> <20090427200544.GN5965@const.famille.thibault.fr> <87skjt3koh.fsf@tac.ki.iif.hu> <20090427211132.GR5965@const.famille.thibault.fr> <87eivc7jbg.fsf@tac.ki.iif.hu> <87ab607i5o.fsf_-_@tac.ki.iif.hu> <20090428183702.GF5777@const.famille.thibault.fr> <87prew5z8o.fsf@tac.ki.iif.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <87prew5z8o.fsf@tac.ki.iif.hu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ferenc Wagner Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ferenc Wagner, le Tue 28 Apr 2009 21:56:07 +0200, a =E9crit : > >> * access() is also blatantly stubbed, as it's pointless in stub > >> domains anyway. > > > > No it's not. It's just a matter of adding the interface to fsio. >=20 > I meant that it makes a distinction on real vs effective UID/GID, > which isn't an issue in the single-user stubdom environment. > Otherwise, I wouldn't do anything but opened races... >=20 > > Trying to open/close the file and returning appropriate errors should > > already be enough to test the R_OK and W_OK cases, >=20 > Only if euid=3Druid, which is always the case in stubdom, isn't it? Yes. > But then trying the operation itself provides the exact same > diagnostics. This is what I mean by "pointless". Ok, but applications could still be upset to see access() work and not open(), or vice-versa. > #if defined(HAVE_POSIX_MEMALIGN) > if (posix_memalign (&p, align, size) !=3D 0) > p =3D 0; > #elif defined(HAVE_MEMALIGN) > p =3D memalign (align, size); Errr, so grub2 doesn't unconditionally use posix_memalign. How did grub2 detect HAVE_POSIX_MEMALIGN? Adding posix_memalign as a proper function shouldn't be hard, though (and could be submitted upstream). Samuel