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: <ac1f47e6-9d90-ae6b-5596-00a8b3607d96@epam.com>
Date:   Wed, 13 Jun 2018 10:23:18 +0300
From:   Oleksandr Andrushchenko <Oleksandr_Andrushchenko@...m.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Oleksandr Andrushchenko <andr2000@...il.com>,
        xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
        jgross@...e.com, konrad.wilk@...cle.com
Cc:     daniel.vetter@...el.com, dongwon.kim@...el.com,
        matthew.d.roper@...el.com
Subject: Re: [PATCH v3 6/9] xen/gntdev: Make private routines/structures
 accessible

On 06/13/2018 04:38 AM, Boris Ostrovsky wrote:
>
>
> On 06/12/2018 09:41 AM, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
>>
>> This is in preparation for adding support of DMA buffer
>> functionality: make map/unmap related code and structures, used
>> privately by gntdev, ready for dma-buf extension, which will re-use
>> these. Rename corresponding structures as those become non-private
>> to gntdev now.
>>
>> Signed-off-by: Oleksandr Andrushchenko 
>> <oleksandr_andrushchenko@...m.com>
>> ---
>>   drivers/xen/gntdev-common.h |  86 +++++++++++++++++++++++
>>   drivers/xen/gntdev.c        | 132 ++++++++++++------------------------
>>   2 files changed, 128 insertions(+), 90 deletions(-)
>>   create mode 100644 drivers/xen/gntdev-common.h
>>
>> diff --git a/drivers/xen/gntdev-common.h b/drivers/xen/gntdev-common.h
>> new file mode 100644
>> index 000000000000..7a9845a6bee9
>> --- /dev/null
>> +++ b/drivers/xen/gntdev-common.h
>> @@ -0,0 +1,86 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +/*
>> + * Common functionality of grant device.
>> + *
>> + * Copyright (c) 2006-2007, D G Murray.
>> + *           (c) 2009 Gerd Hoffmann <kraxel@...hat.com>
>> + *           (c) 2018 Oleksandr Andrushchenko, EPAM Systems Inc.
>> + */
>> +
>> +#ifndef _GNTDEV_COMMON_H
>> +#define _GNTDEV_COMMON_H
>> +
>> +#include <linux/mm.h>
>> +#include <linux/mman.h>
>> +#include <linux/mmu_notifier.h>
>> +#include <linux/types.h>
>> +
>> +struct gntdev_priv {
>> +    /* maps with visible offsets in the file descriptor */
>> +    struct list_head maps;
>> +    /* maps that are not visible; will be freed on munmap.
>> +     * Only populated if populate_freeable_maps == 1 */
>
>
> Since you are touching this code please fix comment style.
>
I saw that while running checkpatch, but was not sure if I have to touch
those as they seemed to be not related to the change itself.
But I'll make sure all the comments are consistent.
>
>> +    struct list_head freeable_maps;
>> +    /* lock protects maps and freeable_maps */
>> +    struct mutex lock;
>> +    struct mm_struct *mm;
>> +    struct mmu_notifier mn;
>> +
>> +#ifdef CONFIG_XEN_GRANT_DMA_ALLOC
>> +    /* Device for which DMA memory is allocated. */
>> +    struct device *dma_dev;
>> +#endif
>> +};
>
>
> With that fixed,
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
>
Thank you,
Oleksandr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ