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: <20180116185736.GA149565@google.com>
Date:   Tue, 16 Jan 2018 10:57:37 -0800
From:   Brian Norris <briannorris@...omium.org>
To:     Archit Taneja <architt@...eaurora.org>
Cc:     Andrzej Hajda <a.hajda@...sung.com>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        David Airlie <airlied@...ux.ie>,
        Yannick Fertre <yannick.fertre@...com>,
        Philippe Cornu <philippe.cornu@...com>,
        Vincent Abriou <vincent.abriou@...com>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Sean Paul <seanpaul@...omium.org>,
        Nickey Yang <nickey.yang@...k-chips.com>, hl@...k-chips.com,
        linux-rockchip@...ts.infradead.org, mka@...omium.org,
        hoegsberg@...il.com, zyw@...k-chips.com, xbl@...k-chips.com
Subject: Re: [PATCH v2 2/2] drm/bridge/synopsys: dsi: handle endianness
 correctly in dw_mipi_dsi_write()

On Tue, Jan 16, 2018 at 12:22:52PM +0530, Archit Taneja wrote:
> On 01/10/2018 08:03 PM, Andrzej Hajda wrote:
> >On 09.01.2018 21:32, Brian Norris wrote:
> >>@@ -386,9 +386,9 @@ static int dw_mipi_dsi_write(struct dw_mipi_dsi *dsi,
> >>  		}
> >>  	}
> >>-	remainder = 0;
> >>-	memcpy(&remainder, packet->header, sizeof(packet->header));
> >>-	return dw_mipi_dsi_gen_pkt_hdr_write(dsi, remainder);
> >>+	word = 0;
> >>+	memcpy(&word, packet->header, sizeof(packet->header));
> >>+	return dw_mipi_dsi_gen_pkt_hdr_write(dsi, le32_to_cpu(word));
> >
> >You could create and use appropriate helper, lets say:
> >
> >u32 le_to_cpup(const u8 *p, int count)
> >{
> >     __le32 r = 0;
> >
> >     memcpy(&r, p, count);
> >     return le32_to_cpu(r);
> >}

I suppose that could be a small improvement, for future consideration,
if this gets too out of hand.

> >With or without this change:
> >Reviewed-by: Andrzej Hajda <a.hajda@...sung.com>

Thanks!

> Queued to drm-misc-next as is.

Thanks!

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ