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:   Tue, 6 Mar 2018 09:56:19 -0700
From:   Lina Iyer <ilina@...eaurora.org>
To:     Stephen Boyd <sboyd@...nel.org>
Cc:     andy.gross@...aro.org, david.brown@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-soc@...r.kernel.org,
        rnayak@...eaurora.org, bjorn.andersson@...aro.org,
        linux-kernel@...r.kernel.org,
        Mahesh Sivasubramanian <msivasub@...eaurora.org>
Subject: Re: [PATCH v4 1/2] drivers: qcom: add command DB driver

On Tue, Mar 06 2018 at 09:21 -0700, Lina Iyer wrote:
>On Mon, Mar 05 2018 at 11:42 -0700, Stephen Boyd wrote:
>>Quoting Lina Iyer (2018-02-26 09:58:01)
>>>+size_t cmd_db_read_aux_data_len(const char *id)
>>>+{
>>>+       int ret;
>>>+       struct entry_header ent;
>>>+       struct rsc_hdr rsc_hdr;
>>>+
>>>+       ret = cmd_db_get_header_by_rsc_id(id, &ent, &rsc_hdr);
>>
>>A bunch of code is calling this function. Why not change the user
>>interface to use an opaque 'resource' cookie that we can 'get' or 'find'
>>and then use that cookie in the rest of the API to pull out the data
>>that's desired?
>>
>Fair point. Let me find out. I suspect this was done to keep the API
>similar to other non-Linux interfaces. I am not sure why they all didn't
>use a handle instead of char *.
>
I was reminded that the APIs are generally used once for each resource
and are used for multiple resources and usually only at init. The handle
method doesn't buy much in benefits.

-- Lina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ