mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH 16/16] fix struct termios in mips termios.h
Date: Fri, 1 Jul 2016 15:00:00 -0400	[thread overview]
Message-ID: <20160701190000.GD15995@brightrain.aerifal.cx> (raw)
In-Reply-To: <c7be426e8975197f3ef96f8638efb45bc9b2fca3.1460250248.git.nsz@port70.net>

On Sun, Apr 10, 2016 at 02:16:24PM +0200, Szabolcs Nagy wrote:
> mips termios struct has no ispeed and ospeed members in glibc,
> mips64 is already consistent with glibc.
> 
> this is an abi change.
> ---
>  arch/mips/bits/termios.h | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/mips/bits/termios.h b/arch/mips/bits/termios.h
> index 29b4b22..d97df8c 100644
> --- a/arch/mips/bits/termios.h
> +++ b/arch/mips/bits/termios.h
> @@ -1,13 +1,10 @@
> -struct termios
> -{
> +struct termios {
>  	tcflag_t c_iflag;
>  	tcflag_t c_oflag;
>  	tcflag_t c_cflag;
>  	tcflag_t c_lflag;
>  	cc_t c_line;
>  	cc_t c_cc[NCCS];
> -	speed_t __c_ispeed;
> -	speed_t __c_ospeed;
>  };

This patch (and the whole series) have been pending for a long time
because I did not remember all the motivations behind what musl is
doing now vs what glibc and the kernel do. I've finally gotten around
to digging it up, and here's what the situation seems to be:

While the kernel has lots of nasty legacy arch-specific termios
variants, glibc unifies them (mostly, with some minor exceptions like
omitting the speed fields on mips) and performs userspace
translations.

musl matches the glibc ABI on x86 and other "important ABI targets",
but does not perform any translation. Instead we allow cc_line to
move, and NCCS to vary (only if needed to make other members line up
with the ABI!), on a per-arch basis so that the kernel interfaces can
be used directly without translation. However, space for the unused
speed fields (and for most archs, the excessive NCCS value) were kept
around _in case_ we ever want to switch to doing some level of
translation to provide these facilities. The space for these things is
not to match existing kernel ABIs, but as safety room for
extensibility. So I do not want to be removing them or introducing new
archs that lack them.

What I'd like to do is go ahead and add them back to mips64/n32 (where
they were omitted) and drop this patch. Most of the rest of the
patches in this series are probably okay; I'll continue reviewing
them. The other mips64 ones need to be duplicated for n32, I think.

Rich


      reply	other threads:[~2016-07-01 19:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 12:09 [PATCH 00/16] sys/ioctl.h and termios.h cleanups Szabolcs Nagy
2016-04-10 12:10 ` [PATCH 01/16] use the generic ioctl.h for x86_64, x32 and aarch64 Szabolcs Nagy
2016-04-10 12:10 ` [PATCH 02/16] remove linux asm/sockios.h macros from ioctl.h Szabolcs Nagy
2016-04-10 12:11 ` [PATCH 03/16] remove ioctl macros that were removed from linux uapi Szabolcs Nagy
2016-04-10 12:11 ` [PATCH 04/16] add missing SIOCSIFNAME from linux/sockios.h to ioctl.h Szabolcs Nagy
2016-04-10 12:11 ` [PATCH 05/16] add missing TIOC* macros " Szabolcs Nagy
2016-04-10 12:12 ` [PATCH 06/16] remove mips and powerpc ioctls that are missing from linux uapi Szabolcs Nagy
2016-04-10 12:12 ` [PATCH 07/16] fix mips and mips64 TIOCM_* macros in ioctl.h Szabolcs Nagy
2016-04-10 12:12 ` [PATCH 08/16] fix TIOCMSET in mips ioctl.h Szabolcs Nagy
2016-04-10 12:13 ` [PATCH 09/16] remove termios2 related ioctls from sh ioctl.h Szabolcs Nagy
2016-04-10 12:13 ` [PATCH 10/16] fix FIOQSIZE in arm ioctl.h Szabolcs Nagy
2016-04-10 12:14 ` [PATCH 11/16] fix generic termios.h to be more consistent with glibc Szabolcs Nagy
2016-04-10 12:14 ` [PATCH 12/16] fix powerpc " Szabolcs Nagy
2016-04-10 12:15 ` [PATCH 13/16] fix mips " Szabolcs Nagy
2016-04-10 12:15 ` [PATCH 14/16] fix TCS* definitions in mips termios.h Szabolcs Nagy
2016-04-10 12:16 ` [PATCH 15/16] fix CBAUDEX in powerpc termios.h Szabolcs Nagy
2016-04-10 12:16 ` [PATCH 16/16] fix struct termios in mips termios.h Szabolcs Nagy
2016-07-01 19:00   ` Rich Felker [this message]

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=20160701190000.GD15995@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --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).