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: <6f57cd3a-f10d-d94e-d74d-685e2722d11f@redhat.com>
Date:   Mon, 21 Aug 2023 12:03:59 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Shiih-Yi Chen <shihyic@...dia.com>, linux-kernel@...r.kernel.org,
        Mark Gross <markgross@...nel.org>,
        Vadim Pasternak <vadimp@...dia.com>,
        platform-driver-x86@...r.kernel.org
Cc:     davthompson@...dia.com, limings@...dia.com
Subject: Re: [PATCH v1] [v1] platform/mellanox: Fix mlxbf-tmfifo not handling
 all virtio CONSOLE notifictions

Hi,

On 8/14/23 19:53, Shiih-Yi Chen wrote:
> From: shihyic <shihyic@...dia.com>
> 
> rshim console does not show all entries of dmesg.
> 
> Fixed by setting MLXBF_TM_TX_LWM_IRQ for every CONSOLE notification. 
>  
> 
> Signed-off-by: shihyic <shihyic@...dia.com>
> Review-by: limings@...dia.com
> 
> ---
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/mellanox/mlxbf-tmfifo.c b/drivers/platform/mellanox/mlxbf-tmfifo.c
> index a79318e90a13..4561b7d42412 100644
> --- a/drivers/platform/mellanox/mlxbf-tmfifo.c
> +++ b/drivers/platform/mellanox/mlxbf-tmfifo.c
> @@ -887,6 +887,8 @@ static bool mlxbf_tmfifo_virtio_notify(struct virtqueue *vq)
>  			tm_vdev = fifo->vdev[VIRTIO_ID_CONSOLE];
>  			mlxbf_tmfifo_console_output(tm_vdev, vring);
>  			spin_unlock_irqrestore(&fifo->spin_lock[0], flags);
> +			test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
> +					 &fifo->pend_events);

You are not doing anything with the test result of test_and_set_bit() here,
so I think you can just use a (cheaper) set_bit() call here ?

Regards,

Hans



>  		} else if (test_and_set_bit(MLXBF_TM_TX_LWM_IRQ,
>  					    &fifo->pend_events)) {
>  			return true;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ