Re: Status of BOTHER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On October 6, 2018 7:56:02 AM PDT, Johan Hovold <johan@xxxxxxxxxx> wrote:
>On Fri, Oct 05, 2018 at 10:35:54PM -0700, hpa@xxxxxxxxx wrote:
>> On October 5, 2018 4:56:29 PM PDT, Alan Cox <alan@llwyncelyn.cymru>
>wrote:
>> >On Fri, 5 Oct 2018 13:00:05 -0700
>> >"H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>> >
>> >> On 10/5/18 6:34 AM, Johan Hovold wrote:
>> >> >>
>> >> >> Specifically, are there any platforms:
>> >> >>
>> >> >> 1. where simply stuffing values into c_ispeed or c_ospeed and
>> >setting BOTHER
>> >> >>    can be used to set the baud rate, even for the "standard"
>baud
>> >rates
>> >> >>    (obviously breaking if the kernel is too old -- how old is
>> >that?)  
>> >> > 
>> >> > This should work on all archs that define BOTHER and IBSHIFT
>(for
>> >input
>> >> > rates), and also to set standard rates (c_cflag would get
>updated
>> >to a
>> >> > Bfoo value).
>> >> > 
>> >> > Alan added this (modulo some follow-up fixes) in edc6afc54968
>> >("[PATCH]
>> >> > tty: switch to ktermios and new framework").
>> >> >   
>> >> 
>> >> Would you happen to know if there are any architectures *other*
>than
>> >Alpha
>> >> which didn't support this by Linux 3.2 (the current glibc cutoff?)
>
>No, sorry. Some quick forensics didn't reveal any other at least.
>
>> >Alpha and Sparc were the only two oddities - because they used other
>> >people's existing APIs.
>
>> I just did massive cleanup with an axe, and close to -2000 lines of
>> code later,
>
>Nice.
>
>> four architectures are oddballs: sparc, alpha, powerpc, and mips. Of
>> those, alpha is the only one that still doesn't support BOTHER.
>> 
>> Also, both alpha and powerpc, especially the latter, can overrun the
>> baud_table.
>
>Good catch. These would be the only archs with CBAUDEX defined as 0.
>And
>this is actually leaking too... Can we plug powerpc by reducing CBAUD
>to
>the expected five bits (037), while handling alpha by defining BOTHER
>as
>you suggested? This would need to be backported to stable.
>
>Johan

I have plugged the hole I'm a better way by cleaning up a lot of the code in tty_baudrate.c ... which among other things has one of the most bizarrely coded for loops I have ever seen. I'll factor that out of my massive cleanup and together with BOTHER for Alpha should do the trick.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux