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] [day] [month] [year] [list]
Message-ID: <Y87JbLHfRqAfQpHy@kroah.com>
Date:   Mon, 23 Jan 2023 18:52:44 +0100
From:   Greg KH <greg@...ah.com>
To:     Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Cc:     Stephen Rothwell <sfr@...b.auug.org.au>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build failure after merge of the tty tree

On Mon, Jan 23, 2023 at 10:46:28AM +0100, Bartosz Golaszewski wrote:
> On Mon, 23 Jan 2023 at 03:18, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> >
> > Hi all,
> >
> > After merging the tty tree, today's linux-next build (x86_64 allmodconfig)
> > failed like this:
> >
> > drivers/tty/serial/qcom_geni_serial.c: In function 'setup_fifos':
> > drivers/tty/serial/qcom_geni_serial.c:1058:17: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo'
> >  1058 |         if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
> >       |                 ^~
> > drivers/tty/serial/qcom_geni_serial.c:1059:21: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo'
> >  1059 |                 port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo,
> >       |                     ^~
> > drivers/tty/serial/qcom_geni_serial.c:1059:63: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo'
> >  1059 |                 port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo,
> >       |                                                               ^~
> > drivers/tty/serial/qcom_geni_serial.c:1062:26: error: 'struct qcom_geni_serial_port' has no member named 'rx_fifo'
> >  1062 |                 if (!port->rx_fifo)
> >       |                          ^~
> >
> > Caused by commit
> >
> >   2aaa43c70778 ("tty: serial: qcom-geni-serial: add support for serial engine DMA")
> >
> > interacting with commit
> >
> >   b8caf69a6946 ("tty: serial: qcom-geni-serial: fix slab-out-of-bounds on RX FIFO buffer")
> >
> > from Linus' tree.
> >
> > I have applied the following merge fix patch for today (I am not sure
> > if it is actually correct, but it builds).
> >
> > From: Stephen Rothwell <sfr@...b.auug.org.au>
> > Date: Mon, 23 Jan 2023 13:09:27 +1100
> > Subject: [PATCH] tty: fix up for "tty: serial: qcom-geni-serial: add support
> >  for serial engine DMA"
> >
> > interacting with "tty: serial: qcom-geni-serial: fix slab-out-of-bounds
> > on RX FIFO buffer".
> >
> > Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> > ---
> >  drivers/tty/serial/qcom_geni_serial.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> > index d98e0a8aae7c..61350007bf1c 100644
> > --- a/drivers/tty/serial/qcom_geni_serial.c
> > +++ b/drivers/tty/serial/qcom_geni_serial.c
> > @@ -1055,11 +1055,11 @@ static int setup_fifos(struct qcom_geni_serial_port *port)
> >         uport->fifosize =
> >                 (port->tx_fifo_depth * port->tx_fifo_width) / BITS_PER_BYTE;
> >
> > -       if (port->rx_fifo && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
> > -               port->rx_fifo = devm_krealloc(uport->dev, port->rx_fifo,
> > +       if (port->rx_buf && (old_rx_fifo_depth != port->rx_fifo_depth) && port->rx_fifo_depth) {
> > +               port->rx_buf = devm_krealloc(uport->dev, port->rx_buf,
> >                                               port->rx_fifo_depth * sizeof(u32),
> >                                               GFP_KERNEL);
> > -               if (!port->rx_fifo)
> > +               if (!port->rx_buf)
> >                         return -ENOMEM;
> >         }
> >
> > --
> > 2.35.1
> >
> > --
> > Cheers,
> > Stephen Rothwell
> 
> This looks fine and works fine:
> 
> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Tested-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

Thanks for this, someone else just sent the same thing, I've queued it
up too.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ