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]
Message-Id: <85ca7eb4-3e0c-4ffb-8bac-a435594ca0f7@app.fastmail.com>
Date:   Tue, 11 Oct 2022 13:09:13 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Jiri Slaby" <jirislaby@...nel.org>,
        "Elliot Berman" <quic_eberman@...cinc.com>,
        "Bjorn Andersson" <quic_bjorande@...cinc.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Cc:     "Murali Nalajala" <quic_mnalajal@...cinc.com>,
        "Trilok Soni" <quic_tsoni@...cinc.com>,
        "Srivatsa Vaddagiri" <quic_svaddagi@...cinc.com>,
        "Carl van Schaik" <quic_cvanscha@...cinc.com>,
        "Prakruthi Deepak Heragu" <quic_pheragu@...cinc.com>,
        "Andy Gross" <agross@...nel.org>,
        "Dmitry Baryshkov" <dmitry.baryshkov@...aro.org>,
        "Jassi Brar" <jassisinghbrar@...il.com>,
        linux-arm-kernel@...ts.infradead.org,
        "Mark Rutland" <mark.rutland@....com>,
        "Lorenzo Pieralisi" <lorenzo.pieralisi@....com>,
        "Sudeep Holla" <sudeep.holla@....com>,
        "Marc Zyngier" <maz@...nel.org>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
        "Jonathan Corbet" <corbet@....net>,
        "Will Deacon" <will@...nel.org>,
        "Catalin Marinas" <catalin.marinas@....com>,
        devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 13/13] tty: gunyah: Add tty console driver for RM Console
 Services

On Tue, Oct 11, 2022, at 8:02 AM, Jiri Slaby wrote:
> On 11. 10. 22, 2:08, Elliot Berman wrote:
>> +
>> +	/* below are for printk console.
>> +	 * gh_rm_console_* calls will sleep and console_write can be called from
>> +	 * atomic ctx. Two xmit buffers are used. The active buffer is tracked with
>> +	 * co_xmit_idx. Writes go into the co_xmit_buf[co_xmit_idx] buffer.
>> +	 * A work is scheduled to flush the bytes. The work will swap the active buffer
>> +	 * and write out the other buffer.
>> +	 */
>
> Ugh, why? This is too ugly and unnecessary. What about passing the kfifo 
> to gh_rm_console_write() instead? You do memcpy() there anyway.

Another problem here is that you really want the console output to be
printed from atomic context, otherwise one would never see e.g. the
output of a panic() call. Having a deferred write is probably fine for
normal tty operations, but you probably want a different device for the
console here, e.g. the hvc_dcc driver.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ