All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
@ 2011-09-15 19:16 Daniel J Walsh
  2011-09-16  7:13 ` Guido Trentalancia
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel J Walsh @ 2011-09-15 19:16 UTC (permalink / raw)
  To: eparis; +Cc: selinux

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This patch looks good to me. acked.

I think Steven Smalley also agrees with this patch.  He can NACK it
now or forever hold his peace...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5yTyIACgkQrlYvE4MpobPvTACfZdTv/nZhO8v0/3z4JmFSTq7+
qYsAoLffVmxlhRt8RMWA6MlNgH2jeSrP
=op1/
-----END PGP SIGNATURE-----

[-- Attachment #2: 0011-policycoreutils-setfiles-FIXME-switch-from-stat-to-s.patch --]
[-- Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
  2011-09-15 19:16 [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to Daniel J Walsh
@ 2011-09-16  7:13 ` Guido Trentalancia
  2011-09-16 12:41   ` Stephen Smalley
  0 siblings, 1 reply; 6+ messages in thread
From: Guido Trentalancia @ 2011-09-16  7:13 UTC (permalink / raw)
  To: Daniel J Walsh; +Cc: eparis, selinux

On Thu, 2011-09-15 at 15:16 -0400, Daniel J Walsh wrote:
> From 1268e66e94286a55c399383d5959734d3597792d Mon Sep 17 00:00:00 2001
> From: Eric Paris <eparis@redhat.com>
> Date: Sun, 10 Jul 2011 16:54:25 +0200
> Subject: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from
> stat to
>  stat64
> 
> This looks bad.  glibc takes care of this.  We should do send this
> upstream but I would like to know why you did it in Fedora....
> 
> NOT-Signed-off-by: Eric Paris <eparis@redhat.com>
> ---
>  policycoreutils/setfiles/restore.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-) 

Perhaps you could exploit a few #ifdef's here ?

Such as _LARGEFILE_SOURCE _LARGEFILE64_SOURCE and/or
_FILE_OFFSET_BITS=64 ?

More available from:

info libc 'Feature Test Macros'

Guido


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
  2011-09-16  7:13 ` Guido Trentalancia
@ 2011-09-16 12:41   ` Stephen Smalley
  2011-09-16 13:07     ` Guido Trentalancia
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Smalley @ 2011-09-16 12:41 UTC (permalink / raw)
  To: Guido Trentalancia; +Cc: Daniel J Walsh, eparis, selinux

On Fri, 2011-09-16 at 09:13 +0200, Guido Trentalancia wrote:
> On Thu, 2011-09-15 at 15:16 -0400, Daniel J Walsh wrote:
> > From 1268e66e94286a55c399383d5959734d3597792d Mon Sep 17 00:00:00 2001
> > From: Eric Paris <eparis@redhat.com>
> > Date: Sun, 10 Jul 2011 16:54:25 +0200
> > Subject: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from
> > stat to
> >  stat64
> > 
> > This looks bad.  glibc takes care of this.  We should do send this
> > upstream but I would like to know why you did it in Fedora....
> > 
> > NOT-Signed-off-by: Eric Paris <eparis@redhat.com>
> > ---
> >  policycoreutils/setfiles/restore.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-) 
> 
> Perhaps you could exploit a few #ifdef's here ?
> 
> Such as _LARGEFILE_SOURCE _LARGEFILE64_SOURCE and/or
> _FILE_OFFSET_BITS=64 ?
> 
> More available from:
> 
> info libc 'Feature Test Macros'

We were doing that before converting setfiles from using nftw(3) to
using fts(3) for the file tree walk.  But fts.h has this gem:
/* The fts interface is incompatible with the LFS interface which
   transparently uses the 64-bit file access functions.  */
#ifdef __USE_FILE_OFFSET64
# error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
#endif


-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
  2011-09-16 12:41   ` Stephen Smalley
@ 2011-09-16 13:07     ` Guido Trentalancia
  2011-09-16 15:06       ` Stephen Smalley
  0 siblings, 1 reply; 6+ messages in thread
From: Guido Trentalancia @ 2011-09-16 13:07 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Daniel J Walsh, eparis, selinux

On Fri, 2011-09-16 at 08:41 -0400, Stephen Smalley wrote:
> On Fri, 2011-09-16 at 09:13 +0200, Guido Trentalancia wrote:
> > On Thu, 2011-09-15 at 15:16 -0400, Daniel J Walsh wrote:
> > > From 1268e66e94286a55c399383d5959734d3597792d Mon Sep 17 00:00:00 2001
> > > From: Eric Paris <eparis@redhat.com>
> > > Date: Sun, 10 Jul 2011 16:54:25 +0200
> > > Subject: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from
> > > stat to
> > >  stat64
> > > 
> > > This looks bad.  glibc takes care of this.  We should do send this
> > > upstream but I would like to know why you did it in Fedora....
> > > 
> > > NOT-Signed-off-by: Eric Paris <eparis@redhat.com>
> > > ---
> > >  policycoreutils/setfiles/restore.c |    8 ++++----
> > >  1 files changed, 4 insertions(+), 4 deletions(-) 
> > 
> > Perhaps you could exploit a few #ifdef's here ?
> > 
> > Such as _LARGEFILE_SOURCE _LARGEFILE64_SOURCE and/or
> > _FILE_OFFSET_BITS=64 ?
> > 
> > More available from:
> > 
> > info libc 'Feature Test Macros'
> 
> We were doing that before converting setfiles from using nftw(3) to
> using fts(3) for the file tree walk.  But fts.h has this gem:
> /* The fts interface is incompatible with the LFS interface which
>    transparently uses the 64-bit file access functions.  */
> #ifdef __USE_FILE_OFFSET64
> # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
> #endif

That must be the reason why other projects are moving in the opposite
direction, see for example:

http://sourceforge.net/tracker/index.php?func=detail&aid=3126942&group_id=3382&atid=103382

Guido


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
  2011-09-16 13:07     ` Guido Trentalancia
@ 2011-09-16 15:06       ` Stephen Smalley
  2011-09-16 15:40         ` Guido Trentalancia
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Smalley @ 2011-09-16 15:06 UTC (permalink / raw)
  To: Guido Trentalancia; +Cc: Daniel J Walsh, eparis, selinux

On Fri, 2011-09-16 at 15:07 +0200, Guido Trentalancia wrote:
> On Fri, 2011-09-16 at 08:41 -0400, Stephen Smalley wrote:
> > On Fri, 2011-09-16 at 09:13 +0200, Guido Trentalancia wrote:
> > > On Thu, 2011-09-15 at 15:16 -0400, Daniel J Walsh wrote:
> > > > From 1268e66e94286a55c399383d5959734d3597792d Mon Sep 17 00:00:00 2001
> > > > From: Eric Paris <eparis@redhat.com>
> > > > Date: Sun, 10 Jul 2011 16:54:25 +0200
> > > > Subject: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from
> > > > stat to
> > > >  stat64
> > > > 
> > > > This looks bad.  glibc takes care of this.  We should do send this
> > > > upstream but I would like to know why you did it in Fedora....
> > > > 
> > > > NOT-Signed-off-by: Eric Paris <eparis@redhat.com>
> > > > ---
> > > >  policycoreutils/setfiles/restore.c |    8 ++++----
> > > >  1 files changed, 4 insertions(+), 4 deletions(-) 
> > > 
> > > Perhaps you could exploit a few #ifdef's here ?
> > > 
> > > Such as _LARGEFILE_SOURCE _LARGEFILE64_SOURCE and/or
> > > _FILE_OFFSET_BITS=64 ?
> > > 
> > > More available from:
> > > 
> > > info libc 'Feature Test Macros'
> > 
> > We were doing that before converting setfiles from using nftw(3) to
> > using fts(3) for the file tree walk.  But fts.h has this gem:
> > /* The fts interface is incompatible with the LFS interface which
> >    transparently uses the 64-bit file access functions.  */
> > #ifdef __USE_FILE_OFFSET64
> > # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
> > #endif
> 
> That must be the reason why other projects are moving in the opposite
> direction, see for example:
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=3126942&group_id=3382&atid=103382

The discussion of the change for setfiles can be found in the list
archives, e.g.
http://marc.info/?t=124639081000002&r=1&w=2
http://marc.info/?l=selinux&m=124688830500777&w=2

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to
  2011-09-16 15:06       ` Stephen Smalley
@ 2011-09-16 15:40         ` Guido Trentalancia
  0 siblings, 0 replies; 6+ messages in thread
From: Guido Trentalancia @ 2011-09-16 15:40 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Daniel J Walsh, eparis, selinux

On Fri, 2011-09-16 at 11:06 -0400, Stephen Smalley wrote:
> On Fri, 2011-09-16 at 15:07 +0200, Guido Trentalancia wrote:
> > On Fri, 2011-09-16 at 08:41 -0400, Stephen Smalley wrote:
> > > On Fri, 2011-09-16 at 09:13 +0200, Guido Trentalancia wrote:
> > > > On Thu, 2011-09-15 at 15:16 -0400, Daniel J Walsh wrote:
> > > > > From 1268e66e94286a55c399383d5959734d3597792d Mon Sep 17 00:00:00 2001
> > > > > From: Eric Paris <eparis@redhat.com>
> > > > > Date: Sun, 10 Jul 2011 16:54:25 +0200
> > > > > Subject: [PATCH 11/67] policycoreutils: setfiles: FIXME switch from
> > > > > stat to
> > > > >  stat64
> > > > > 
> > > > > This looks bad.  glibc takes care of this.  We should do send this
> > > > > upstream but I would like to know why you did it in Fedora....
> > > > > 
> > > > > NOT-Signed-off-by: Eric Paris <eparis@redhat.com>
> > > > > ---
> > > > >  policycoreutils/setfiles/restore.c |    8 ++++----
> > > > >  1 files changed, 4 insertions(+), 4 deletions(-) 
> > > > 
> > > > Perhaps you could exploit a few #ifdef's here ?
> > > > 
> > > > Such as _LARGEFILE_SOURCE _LARGEFILE64_SOURCE and/or
> > > > _FILE_OFFSET_BITS=64 ?
> > > > 
> > > > More available from:
> > > > 
> > > > info libc 'Feature Test Macros'
> > > 
> > > We were doing that before converting setfiles from using nftw(3) to
> > > using fts(3) for the file tree walk.  But fts.h has this gem:
> > > /* The fts interface is incompatible with the LFS interface which
> > >    transparently uses the 64-bit file access functions.  */
> > > #ifdef __USE_FILE_OFFSET64
> > > # error "<fts.h> cannot be used with -D_FILE_OFFSET_BITS==64"
> > > #endif
> > 
> > That must be the reason why other projects are moving in the opposite
> > direction, see for example:
> > 
> > http://sourceforge.net/tracker/index.php?func=detail&aid=3126942&group_id=3382&atid=103382
> 
> The discussion of the change for setfiles can be found in the list
> archives, e.g.
> http://marc.info/?t=124639081000002&r=1&w=2
> http://marc.info/?l=selinux&m=124688830500777&w=2

Hi Stephen,

thanks for getting back.

Yes, I read that already. I still cannot understand the point since it
says about the benchmark results: "so not much of a change".

Last thing I can add is that I'm pretty sure I've seen around code
designed to fall back to the other scheme when _FILE_OFFSET_BITS=64 is
defined.

Regards,

Guido


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-16 15:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-15 19:16 [PATCH 11/67] policycoreutils: setfiles: FIXME switch from stat to Daniel J Walsh
2011-09-16  7:13 ` Guido Trentalancia
2011-09-16 12:41   ` Stephen Smalley
2011-09-16 13:07     ` Guido Trentalancia
2011-09-16 15:06       ` Stephen Smalley
2011-09-16 15:40         ` Guido Trentalancia

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.