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:   Mon, 7 Sep 2020 10:02:26 -0400
From:   Jonathan Marek <jonathan@...ek.ca>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-arm-msm@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@...aro.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] misc: fastrpc: add ioctl for attaching to sensors pd

On 9/7/20 9:58 AM, Srinivas Kandagatla wrote:
> 
> 
> On 07/09/2020 14:51, Jonathan Marek wrote:
>>>> @@ -1477,7 +1477,10 @@ static long fastrpc_device_ioctl(struct file 
>>>> *file, unsigned int cmd,
>>>>           err = fastrpc_invoke(fl, argp);
>>>>           break;
>>>>       case FASTRPC_IOCTL_INIT_ATTACH:
>>>> -        err = fastrpc_init_attach(fl);
>>>> +        err = fastrpc_init_attach(fl, 0);
>>>> +        break;
>>>> +    case FASTRPC_IOCTL_INIT_ATTACH_SNS:
>>>> +        err = fastrpc_init_attach(fl, 2);
>>>
>>> Shouldn't you have #defines for those magic numbers somewhere?  What
>>> does 0 and 2 mean?
>>>
>>
>> This is based off a downstream driver which also uses magic numbers, 
>> although I can make an educated guess about the meaning.
>>
>> Srini do you have any suggestions for how to name these values?
> 
> These are domain id corresponding to each core.
> you can use SDSP_DOMAIN_ID in here!
> these are already defined in the file as:
> 
> #define ADSP_DOMAIN_ID (0)
> #define MDSP_DOMAIN_ID (1)
> #define SDSP_DOMAIN_ID (2)
> #define CDSP_DOMAIN_ID (3)
> 

I don't think this is right:

FASTRPC_IOCTL_INIT_ATTACH uses pd = 0
FASTRPC_IOCTL_INIT_CREATE uses pd = 1

And these two ioctl are used with all DSP cores. So it wouldn't make 
sense for the pd value to correspond to the domain id.

> 
> --srini

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ