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, 1 May 2018 11:35:07 -0600
From:   Lina Iyer <ilina@...eaurora.org>
To:     Doug Anderson <dianders@...omium.org>
Cc:     Matthias Kaehlcke <mka@...omium.org>,
        Andy Gross <andy.gross@...aro.org>,
        David Brown <david.brown@...aro.org>,
        linux-arm-msm@...r.kernel.org,
        "open list:ARM/QUALCOMM SUPPORT" <linux-soc@...r.kernel.org>,
        Rajendra Nayak <rnayak@...eaurora.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Evan Green <evgreen@...omium.org>
Subject: Re: [PATCH v6 05/10] drivers: qcom: rpmh-rsc: write sleep/wake
 requests to TCS

On Tue, May 01 2018 at 10:42 -0600, Doug Anderson wrote:
>Hi,
>
>On Tue, May 1, 2018 at 9:10 AM, Lina Iyer <ilina@...eaurora.org> wrote:
>> Yes, this is incorrect in its current form. This is what it should be -
>>
>> static int find_match(const struct tcs_group *tcs, const struct tcs_cmd
>> *cmd,
>>                      int len)
>> {
>>        int i, j;
>>
>>        /* Check for already cached commands */
>>        for_each_set_bit(i, tcs->slots, MAX_TCS_SLOTS) {
>>                if (tcs->cmd_cache[i] != cmd[0].addr)
>>                        continue;
>>                for (j = 0; j < len; j++) {
>>                        WARN(tcs->cmd_cache[i + j] != cmd[j].addr,
>>                             "Message does not match previous sequence.\n");
>>                        return -EINVAL;
>>                }
>
>If len > 0, won't the above always return -EINVAL?
>
>
>>                if (j == len - 1)
>>                        return i;
>
>Care to explain how you could get here and the test "if (j == len -
>1)" could be false?  ;-P
>
True. Will fix it in the next spin correctly.

--Lina



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ