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: <20180410174629.GD19682@codeaurora.org>
Date:   Tue, 10 Apr 2018 11:46:29 -0600
From:   Lina Iyer <ilina@...eaurora.org>
To:     Stephen Boyd <swboyd@...omium.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, evgreen@...omium.org,
        dianders@...omium.org,
        Mahesh Sivasubramanian <msivasub@...eaurora.org>
Subject: Re: [PATCH v7 [RESEND] 1/2] drivers: qcom: add command DB driver

On Fri, Apr 06 2018 at 17:23 -0600, Stephen Boyd wrote:
>Quoting Lina Iyer (2018-04-06 08:13:55)
>> From: Mahesh Sivasubramanian <msivasub@...eaurora.org>
>>
>> Command DB is a simple database in the shared memory of QCOM SoCs, that
>> provides information regarding shared resources. Some shared resources
>> in the SoC have properties that are probed dynamically at boot by the
>> remote processor. The information pertaining to the SoC and the platform
>> are made available in the shared memory. Drivers can query this
>> information using predefined strings.
>>
>> Signed-off-by: Mahesh Sivasubramanian <msivasub@...eaurora.org>
>> Signed-off-by: Lina Iyer <ilina@...eaurora.org>
>> Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
>> ---
>
>I have this patch on top to fix the endian stuff. Care to test it out
>and see if it still works?
>
>From: Stephen Boyd <swboyd@...omium.org>
>Subject: soc: qcom: cmd-db: Make endian-agnostic
>
>This driver deals with memory that is stored in little-endian format.
>Update the structures with the proper little-endian types and then
>do the proper conversions when reading the fields. Note that we compare
>the ids with a memcmp() because we already pad out the string 'id' field
>to exactly 8 bytes with the strncpy() onto the stack.
>
>Signed-off-by: Stephen Boyd <swboyd@...omium.org>
>
>diff --git a/drivers/soc/qcom/cmd-db.c b/drivers/soc/qcom/cmd-db.c
>index b5172049f608..a56dc9edab82 100644
>--- a/drivers/soc/qcom/cmd-db.c
>+++ b/drivers/soc/qcom/cmd-db.c
>@@ -13,18 +13,10 @@
>
> #define NUM_PRIORITY		2
> #define MAX_SLV_ID		8
>-#define CMD_DB_MAGIC		0x0C0330DBUL
>+static const char CMD_DB_MAGIC[] = { 0xdb, 0x33, 0x03, 0x0c };
This has to be { 0xdb, 0x30, 0x03, 0x0c }

Otherwise it works.

Thanks,
Lina

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ