linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>, hpa@zytor.com
Cc: linux-api@vger.kernel.org, libc-alpha@sourceware.org,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] Linux: Define struct termios2 in <termios.h> under _GNU_SOURCE [BZ #10339]
Date: Tue, 16 Apr 2019 09:11:05 -0300	[thread overview]
Message-ID: <6ffef0ec-d479-e61d-079e-2b0882142afd@linaro.org> (raw)
In-Reply-To: <87lg0az2xk.fsf@oldenburg2.str.redhat.com>



On 16/04/2019 06:59, Florian Weimer wrote:
> * hpa:
> 
>> Using symbol versioning doesn't really help much since the real
>> problem is that struct termios can be passed around in userspace, and
>> the interfaces between user space libraries don't have any
>> versioning. However, my POC code deals with that too by only seeing
>> BOTHER when necessary, so if the structure is extended garbage in the
>> extra fields will be ignored unless new baud rates are in use.
> 
> That still doesn't solve the problem of changing struct offsets after a
> struct field of type struct termios.

We will need symbol versioning at least on sparc, since currently it 
defines NCSS 17 and termios-c_cc.h defines 16 control characters (there 
is no space to squeeze more fields one termios).  ANd The WIP branch
gratuitously change the termios struct size on the architecture.  

I am not sure which would be the best option to avoid the the user space 
libraries compatibility issue. It is unlikely to happen, it would require
one to use old libraries along with newer libraries build against a newer
glibc.  Not sure how often this scenarios arises in realworld (specially
on sparc).

I think MIPS would be fine to lower NCSS to 24, as WIP branch does.  And
alpha is also fine since it already provides the c_* fields.

> 
>> Exporting termios2 to user space feels a bit odd at this stage as it
>> would only be usable as a fallback on old glibc. Call it
>> kernel_termios2 at least.
> 
> I'm not sure why we should do that?  The kernel calls it struct termios2
> in its UAPI headers.  If that name is not appropriate, it should be
> changed first in the UAPI headers.
> 
> Thanks,
> Florian
> 

  reply	other threads:[~2019-04-16 12:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 10:47 [PATCH] Linux: Define struct termios2 in <termios.h> under _GNU_SOURCE [BZ #10339] Florian Weimer
2019-04-09 15:02 ` hpa
2019-04-10  6:50   ` Florian Weimer
2019-04-15 15:54     ` hpa
2019-04-09 15:07 ` hpa
2019-04-09 16:04   ` Florian Weimer
2019-04-10 20:24 ` Adhemerval Zanella
2019-04-11 11:07   ` Florian Weimer
2019-04-11 12:53     ` Adhemerval Zanella
2019-04-12  7:50       ` Florian Weimer
2019-04-15 12:28         ` Florian Weimer
2019-04-15 15:53         ` hpa
2019-04-15 17:22           ` Adhemerval Zanella
2019-04-17 22:04             ` H. Peter Anvin
2019-04-18 11:09               ` Adhemerval Zanella
2019-04-18 14:46                 ` hpa
2019-04-16  9:59           ` Florian Weimer
2019-04-16 12:11             ` Adhemerval Zanella [this message]
2019-04-17 22:06             ` H. Peter Anvin
2019-04-17 21:22 ` Joseph Myers

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=6ffef0ec-d479-e61d-079e-2b0882142afd@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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.
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).