lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 May 2023 07:48:45 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Arnd Bergmann <arnd@...db.de>,
        Jacky Huang <ychuang570808@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        krzysztof.kozlowski+dt@...aro.org, Lee Jones <lee@...nel.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tomer Maimon <tmaimon77@...il.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>
Cc:     devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-serial@...r.kernel.org, soc@...nel.org, schung@...oton.com,
        mjchen@...oton.com, Jacky Huang <ychuang3@...oton.com>
Subject: Re: [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial driver
 support

On 24. 05. 23, 11:00, Arnd Bergmann wrote:
> On Wed, May 24, 2023, at 10:34, Jacky Huang wrote:
>> On 2023/5/24 下午 03:42, Jiri Slaby wrote:
>>> On 16. 05. 23, 9:52, Jacky Huang wrote:
>>>> +static void ma35d1serial_config_port(struct uart_port *port, int flags)
>>>> +{
>>>> +    /*
>>>> +     * Driver core for serial ports forces a non-zero value for port
>>>> type.
>>>> +     * Write an arbitrary value here to accommodate the serial core
>>>> driver,
>>>> +     * as ID part of UAPI is redundant.
>>>> +     */
>>>> +    port->type = 1;
>>>
>>> So this 1 translates to PORT_8250. Why not to use it directly? Or
>>> something more saner like PORT_16550A?
>>>
>> It's not actually 8250 or 16550A.
>> Can we add the following definition to
>> 'include/uapi/linux/serial_core.h' and use PORT_MA35 instead?
>>
>> #define PORT_MA35    124
> 
> This was already in a previous version, until Greg commented
> that it was probably not needed:
> 
> https://lore.kernel.org/lkml/20fc81c9-5517-ce1e-639a-3b425cf27759@gmail.com/
> 
> Since leaving port->type at PORT_UNKNOWN doesn't work, and almost
> all other drivers have something in serial_core.h, it's probably
> best to do the same here. Checking the other drivers showed that
> drivers/tty/serial/lantiq.c is currently the only exception, it
> defines PORT_LTQ_ASC locally, which causes a conflict with
> PORT_SPRD.

Hmm.

Anyone has an idea what this is really used for in userspace? Can we 
replace all of them by simply some sort of "PORT_OTHER"?

For example:

xdg-open `echo -n 'https://codesearch.debian.net/search?q=\b('; sed -n 
's@...fine\s\(\w\+\)\s.*@\1@ p' include/uapi/linux/serial_core.h | tail 
-20 | sed 's@.* \(.*\)[\x09 ][\x09 ]*.*@\1@...aste -sd'|' | tr -d '\n'; 
echo ')\b'`

gives _no_ clue. FTR the above translates here into:
https://codesearch.debian.net/search?q=\b(PORT_HSCIF|PORT_ASC|PORT_TILEGX|PORT_MEN_Z135|PORT_SC16IS7XX|PORT_MESON|PORT_DIGICOLOR|PORT_SPRD|PORT_CRIS|PORT_STM32|PORT_MVEBU|PORT_PIC32|PORT_MPS2UART|PORT_MTK_BTIF|PORT_RDA|PORT_MLB_USIO|PORT_SIFIVE_V0|PORT_SUNIX|PORT_LINFLEXUART|PORT_SUNPLUS)\b

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ