Bug 3023 - Xorg server+client code not largefile aware
Summary: Xorg server+client code not largefile aware
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: * Other (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: Roland Mainz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 16:36 UTC by Roland Mainz
Modified: 2006-03-05 01:51 UTC (History)
9 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Prototype patch covering Linux and Solaris (3.87 KB, patch)
2005-04-13 16:41 UTC, Roland Mainz
no flags Details | Splinter Review
Patch for 2005-04-23-trunk (5.58 KB, patch)
2005-04-23 13:21 UTC, Roland Mainz
no flags Details | Splinter Review

Description Roland Mainz 2005-04-13 16:36:30 UTC
[Originally reported by Julien Lafon in
http://xprint.mozdev.org/pipermail/xprint/2005-April/000460.html]
The Xorg server and client code is currently not build with the neccesary flags
to make it largefile aware, which may cause the one or other subtle issues at
services such as libX11, Xaw and the Xserver code itself (Julien lafon's report
was mainly about the Xserver but the issues affect other parts of X11, too).
Comment 1 Roland Mainz 2005-04-13 16:41:10 UTC
Created attachment 2417 [details] [review]
Prototype patch covering Linux and Solaris
Comment 2 Roland Mainz 2005-04-13 16:42:29 UTC
torrey/herrb:
Can you do the same change for MacOSX/Darwin and OpenBSD, please ?
Comment 3 Matthieu Herrb 2005-04-13 22:13:55 UTC
(In reply to comment #2)
> torrey/herrb:
> Can you do the same change for MacOSX/Darwin and OpenBSD, please ?

I'll have a deeper look later, but on *BSD (and afaict this includes Darwin)
there's nothing to change. off_t is 64 bits long by default and no special 
calls are needed to open/read/write files above 2GB.
Comment 4 Adam Jackson 2005-04-14 10:48:17 UTC
this patch only widens the types passed in to the system calls themselves, it
does not make 64-bit off_t or fpos_t visible to consumers of the libc wrapper. 
are you sure that's what you intend?
Comment 5 Roland Mainz 2005-04-14 13:49:11 UTC
(In reply to comment #4)
> this patch only widens the types passed in to the system calls themselves, it
> does not make 64-bit off_t or fpos_t visible to consumers of the libc wrapper. 
> are you sure that's what you intend?

Yes as I do not need more for my own work and noone else cared about my original
proposal to solve the issue similar how FreeBSD&co. solved the problem - which
would be far far less work then adding another bunch of bloat to the libc
wrapper. If anyone wants to deal with that issue then go ahead - my schedule is
already too full and it's better for me not to take another burden only required
by politics.
Comment 6 Adam Jackson 2005-04-14 14:29:15 UTC
(In reply to comment #5)
> Yes as I do not need more for my own work and noone else cared about my
> original proposal to solve the issue similar how FreeBSD&co. solved the
> problem - which would be far far less work then adding another bunch of bloat
> to the libc wrapper. If anyone wants to deal with that issue then go ahead -
> my schedule is already too full and it's better for me not to take another
> burden only required by politics.

i don't know which "original proposal" you're referring to, i don't see any
concrete suggestions given in the thread linked in the initial bug report. 
neither was my comment politically motivated.  i don't understand the hostility
here.

i was simply pointing out that if you expect large file access to work from the
loadable modules, you will need to fix the libc wrapper.  otherwise the libc
wrapper's entrypoints will remain 32 bits wide for xf86size_t; they'll get
promoted to 64 bits internally but the modules won't actually be able to use all
64 bits.

since the initial bug report was concerning the postscript driver, and since you
have stated before that you plan to make the Xprint drivers loadable, you may
wish to solve this problem now rather than later.
Comment 7 Roland Mainz 2005-04-15 14:07:21 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Yes as I do not need more for my own work and noone else cared about my
> > original proposal to solve the issue similar how FreeBSD&co. solved the
> > problem - which would be far far less work then adding another bunch of bloat
> > to the libc wrapper. If anyone wants to deal with that issue then go ahead -
> > my schedule is already too full and it's better for me not to take another
> > burden only required by politics.
> 
> i don't know which "original proposal" you're referring to, i don't see any
> concrete suggestions given in the thread linked in the initial bug report. 
> neither was my comment politically motivated.  i don't understand the 
> hostility here.

That was not tought to be hostile, it's just a complaint that fixing this may
end up in a huge pile of work if 100% compatibility to the current module ABI is
required since we have to add transitional interfaces, add macros and all
neccesary infratructure as it was done from Solaris 2.5.1-->Solaris2.6. And this
needs to work properly on all platforms, even those which do not have largefile
support. And it needs to be tested. So far this is a burden which I am not
willing to take right now unless it becomes really neccesary.
I would favor a solution similar to the way the *BSD OSs used here and avoid
adding a giant pile of extra interfaces - just make clean cut and start with a
cleaned-up interface scheme but that will never happen as this would break the
holy(TM) module ABI.

> i was simply pointing out that if you expect large file access to work from 
> the
> loadable modules, you will need to fix the libc wrapper.  otherwise the libc
> wrapper's entrypoints will remain 32 bits wide for xf86size_t; they'll get
> promoted to 64 bits internally but the modules won't actually be able to use 
> all 64 bits.

AFAIK this is not true for the dlloader modules which can use libc directly.

> since the initial bug report was concerning the postscript driver, and since 
> you have stated before that you plan to make the Xprint drivers loadable,
> you may wish to solve this problem now rather than later.

AFAIK the elfloader, a.out-loader&co. are going away post X11R7.0 and since the
dlloader modules can access libc directly I do not think that this is neccesary.
Just the Xserver code itself needs to be largefile aware (and all the libraries
and client-side tools).
Comment 8 Roland Mainz 2005-04-15 17:00:45 UTC
For the log:
On my IRIX box "getconf" generates empty output for:
-- snip --
% getconf LFS_CFLAGS
% getconf LFS_LIBS
-- snip --
so I assume IRIX is largefile aware without needing any extra flags (people in
irc://freenode/#irix confirmed that info).

CC:'ing Dan Mcnichol and Paul Anderson to look what's needed for AIX and
HP/UX...
Comment 9 Roland Mainz 2005-04-23 13:21:06 UTC
Created attachment 2523 [details] [review]
Patch for 2005-04-23-trunk

Same patch as attachment #2417 [details] [review] + Changelog diff...
Comment 10 Roland Mainz 2005-04-23 13:25:31 UTC
Patch checked-in into Xorg trunk...

/cvs/xorg/xc/ChangeLog,v  <--  xc/ChangeLog
new revision: 1.896; previous revision: 1.895
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/config/cf/linux.cf,v  <--  xc/config/cf/linux.cf
new revision: 1.26; previous revision: 1.25
/cvs/xorg/xc/config/cf/sun.cf,v  <--  xc/config/cf/sun.cf
new revision: 1.11; previous revision: 1.10
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...

... leaving bug open for AIX and HP/UX...
Comment 11 Daniel Stone 2006-03-05 20:51:53 UTC
i'm going to go ahead and claim it's fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.