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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YVKwsMDU6eNO1X0u@google.com>
Date:   Tue, 28 Sep 2021 14:05:36 +0800
From:   Chen-Yu Tsai <wenst@...omium.org>
To:     Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     Tomasz Figa <tfiga@...omium.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
        Ricardo Ribalda <ribalda@...omium.org>,
        Christoph Hellwig <hch@....de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv6 2/8] videobuf2: inverse buffer cache_hints flags

Hi,

On Thu, Sep 09, 2021 at 08:24:24PM +0900, Sergey Senozhatsky wrote:
> It would be less error prone if the default cache hints value
> (we kzalloc() structs, so it's zeroed out by default) would be
> to "always sync/flush" caches. Inverse and rename cache hints
> flags.
> 
> Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
> ---
>  .../media/common/videobuf2/videobuf2-core.c   | 31 ++++++-------------
>  .../media/common/videobuf2/videobuf2-v4l2.c   | 17 +++-------
>  include/media/videobuf2-core.h                | 12 +++----
>  3 files changed, 21 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index c4ff356da600..9d57df348b5f 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c

[...]

> @@ -415,17 +415,6 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,
>  		vb->index = q->num_buffers + buffer;
>  		vb->type = q->type;
>  		vb->memory = memory;
> -		/*
> -		 * We need to set these flags here so that the videobuf2 core
> -		 * will call ->prepare()/->finish() cache sync/flush on vb2
> -		 * buffers when appropriate. However, we can avoid explicit
> -		 * ->prepare() and ->finish() cache sync for DMABUF buffers,
> -		 * because DMA exporter takes care of it.
> -		 */
> -		if (q->memory != VB2_MEMORY_DMABUF) {
> -			vb->need_cache_sync_on_prepare = 1;
> -			vb->need_cache_sync_on_finish = 1;
> -		}

This hunk seems odd. It's not inverting the logic but just removing
the block wholesale. The end result is different. This seems to be fixed
in a following patch, but the change here doesn't match what the commit
log says.

ChenYu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ