Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 27 Apr 2016 04:44:56 +0000
From: Jaydeep Patil <Jaydeep.Patil@...tec.com>
To: Szabolcs Nagy <nsz@...t70.net>, "musl@...ts.openwall.com"
	<musl@...ts.openwall.com>
Subject: RE: mips64/n32 struct termios

>-----Original Message-----
>From: Szabolcs Nagy [mailto:nsz@...t70.net]
>Sent: 27 April 2016 AM 12:14
>To: musl@...ts.openwall.com
>Cc: Jaydeep Patil
>Subject: Re: [musl] mips64/n32 struct termios
>
>* Rich Felker <dalias@...c.org> [2016-04-26 13:27:04 -0400]:
>> I noticed that the mips64/n32 versions of struct termios have omitted
>> the two speed_t fields at the end, which other archs (including mips)
>> all have. It's dubious whether these make sense or are useful for
>> anything, and I don't even recall the whole history of why we have
>> them, but as long as we do have them for all the other archs I kind of
>> think it makes sense to put them back for mips64/n32 in case we ever
>> need them for something (or for expansion) or want generic code to be
>> able to access them.
>>
>> Was there a reason they were omitted in the new ports? Any objection
>> to adding them back?
>
>see my [PATCH 16/16] fix struct termios in mips termios.h (that can be done in
>the other direction fixing mips64,n32)
>
>termios struct is special on mips and ppc:
>
>mips glibc: NCCS = 32, no speed fields
>mips linux: NCCS = 23
>
>ppc glibc: NCCS = 32, speed fields
>ppc linux: NCCS = 19, c_line swapped, only termios, no termios2
>
>other glibc: NCCS = 32, speed fields
>other linux: NCCS = 19
>
>the kernel side only has speed fields in termios2 except on ppc where termios
>has them, in glibc termios has speed fields except on mips.  (the __ prefixed
>fields are only present in musl probably to match the termios struct size on
>x86.)
>
>i don't know why there are these differences and how it can work in practice,
>but e.g. util-linux ldattach seems to use them with BOTHER cflag and probably
>one can query them with TCGETS(2).
>
>glibc tcsetattr/tcgetattr translates glibc termios to kernel termios, so one can
>set/get the fields that way too and there is further powerpc specific magic in
>that translation.

I don't see any significance/reference to input/output speed fields of the struct termios in mips linux/glibc. 
We can omit these fields.

>>
>> Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.