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]
Date:   Wed, 15 Jun 2022 09:07:57 +0800
From:   "yekai(A)" <yekai13@...wei.com>
To:     Zhangfei Gao <zhangfei.gao@...aro.org>,
        <gregkh@...uxfoundation.org>, <herbert@...dor.apana.org.au>
CC:     <linux-crypto@...r.kernel.org>,
        <linux-accelerators@...ts.ozlabs.org>,
        <linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
        <wangzhou1@...ilicon.com>
Subject: Re: [PATCH 1/3] uacce: supports device isolation feature



On 2022/6/14 22:14, Zhangfei Gao wrote:
>
>
> On 2022/6/14 下午8:29, Kai Ye wrote:
>> UACCE add the hardware error isolation API. Users can configure
>> the error frequency threshold by this vfs node. This API interface
>> certainly supports the configuration of user protocol strategy. Then
>> parse it inside the device driver. UACCE only reports the device
>> isolate state. When the error frequency is exceeded, the device
>> will be isolated. The isolation strategy should be defined in each
>> driver module.
>>
>> Signed-off-by: Kai Ye <yekai13@...wei.com>
>> Reviewed-by: Zhou Wang <wangzhou1@...ilicon.com>
>> ---
>>   drivers/misc/uacce/uacce.c | 51 ++++++++++++++++++++++++++++++++++++++
>>   include/linux/uacce.h      | 15 ++++++++++-
>>   2 files changed, 65 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
>> index b6219c6bfb48..4d9d9aeb145a 100644
>> --- a/drivers/misc/uacce/uacce.c
>> +++ b/drivers/misc/uacce/uacce.c
>> @@ -12,6 +12,20 @@ static dev_t uacce_devt;
>>   static DEFINE_MUTEX(uacce_mutex);
>>   static DEFINE_XARRAY_ALLOC(uacce_xa);
>>   +static int cdev_get(struct device *dev, void *data)
>> +{
>> +    struct uacce_device *uacce;
>> +    struct device **t_dev = data;
>> +
>> +    uacce = container_of(dev, struct uacce_device, dev);
>> +    if (uacce->parent == *t_dev) {
>> +        *t_dev = dev;
>> +        return 1;
>> +    }
>> +
>> +    return 0;
>> +}
>> +
>>   static int uacce_start_queue(struct uacce_queue *q)
>>   {
>>       int ret = 0;
>> @@ -346,12 +360,47 @@ static ssize_t region_dus_size_show(struct
>> device *dev,
>>                  uacce->qf_pg_num[UACCE_QFRT_DUS] << PAGE_SHIFT);
>>   }
>>   +static ssize_t isolate_show(struct device *dev,
>> +                struct device_attribute *attr, char *buf)
>> +{
>> +    struct uacce_device *uacce = to_uacce_device(dev);
>> +
>> +    return sysfs_emit(buf, "%d\n",
>> uacce->ops->get_isolate_state(uacce));
> Are these two isolate ops  required or optional?
> Do we need consider NULL pointer?
>
> Thanks
> .
>

Yes, need to consider NULL pointer.

Thanks
kai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ