From: Justin Cormack <justin@specialbusservice.com>
To: musl@lists.openwall.com
Subject: Re: termios ugliness
Date: Fri, 16 Nov 2012 08:27:08 +0000 [thread overview]
Message-ID: <CAK4o1WxguwA+Wr8nuBgdt7zokYj_-gac6Wy+oofqz54Ex8nrpQ@mail.gmail.com> (raw)
In-Reply-To: <20121116035211.GA30974@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]
On 16 Nov 2012 03:52, "Rich Felker" <dalias@aerifal.cx> wrote:
>
> Hi all,
>
> In the process of integrating the powerpc port, it's come to my
> attention that the termios structure (used for setting terminal
> attributes) differs gratuitously between archs at the kernel level.
> glibc (and thus the LSB ABI, which we've tried to follow) fudges
> around this by always using the same userspace structure and
> translating from the kernelspace structure. I'm not sure what the
> benefit of this is (aside from having extra slots for expansion in
> c_cc array), but the downsides are (1) binary bloat and ugly
> arch-specific code for conversion, and (2) failure of a direct TCGETS
> ioctl (as opposed to a tcgetattr function call) to fill the struct
> properly, since it bypasses the translation.
>
> My leaning is to ignore the existing ABI on this and just use the
> arch-specific structure from the kernel on ppc and any other archs
> with this brokenness (alpha seems to be the main other one, possibly
> the only). Unlike x86, x86_64, or arm, I don't see a lot of usefulness
> in running glibc binaries on musl-powerpc; if it's ever needed, we
> could do patch-up work in the dynamic linker (which will eventually be
> needed anyway to deal with wrong regoff_t on x86_64 and 32-bit-off_t
> functions on 32-bit archs) to load such apps/libs.
>
> Since it's a decision we can't really change later without breaking
> ABI, though, I'd like to ask the community: does anybody have a strong
> feeling about whether we should use the kernel termios structure
> directly or do like glibc and use an arch-generic userspace termios
> structure and code to convert to/from the kernel version?
>
> The powerpc port will probably be considered experimental in the
> upcoming release, so we can take our time on the issue a bit, but I'd
> still rather hear comments sooner than later if you have some.
>
> Rich
I would prefer the kernel structure.
Justin
[-- Attachment #2: Type: text/html, Size: 2339 bytes --]
next prev parent reply other threads:[~2012-11-16 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 3:52 Rich Felker
2012-11-16 4:42 ` Kurt H Maier
2012-11-16 8:27 ` Justin Cormack [this message]
2012-11-16 16:34 ` John Spencer
2012-11-16 18:59 ` Rich Felker
2012-11-17 1:46 ` Alex Caudill
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=CAK4o1WxguwA+Wr8nuBgdt7zokYj_-gac6Wy+oofqz54Ex8nrpQ@mail.gmail.com \
--to=justin@specialbusservice.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).