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] [day] [month] [year] [list]
Date:   Wed, 30 Oct 2019 15:10:02 +0200
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     Lokesh Vutla <lokeshvutla@...com>,
        Peter Ujfalusi <peter.ujfalusi@...com>, <vkoul@...nel.org>,
        <robh+dt@...nel.org>, <nm@...com>, <ssantosh@...nel.org>
CC:     <dan.j.williams@...el.com>, <dmaengine@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <t-kristo@...com>, <tony@...mide.com>, <j-keerthy@...com>
Subject: Re: [PATCH v3 02/14] soc: ti: k3: add navss ringacc driver



On 29/10/2019 10:52, Lokesh Vutla wrote:
> Hi Grygorii,
> 
> [...snip..]
> 
>> +
>> +static int k3_ringacc_ring_access_io(struct k3_ring *ring, void *elem,
>> +				     enum k3_ringacc_access_mode access_mode)
>> +{
>> +	void __iomem *ptr;
>> +
>> +	switch (access_mode) {
>> +	case K3_RINGACC_ACCESS_MODE_PUSH_HEAD:
>> +	case K3_RINGACC_ACCESS_MODE_POP_HEAD:
>> +		ptr = (void __iomem *)&ring->fifos->head_data;
>> +		break;
>> +	case K3_RINGACC_ACCESS_MODE_PUSH_TAIL:
>> +	case K3_RINGACC_ACCESS_MODE_POP_TAIL:
>> +		ptr = (void __iomem *)&ring->fifos->tail_data;
>> +		break;
>> +	default:
>> +		return -EINVAL;
>> +	}
>> +
>> +	ptr += k3_ringacc_ring_get_fifo_pos(ring);
>> +
>> +	switch (access_mode) {
>> +	case K3_RINGACC_ACCESS_MODE_POP_HEAD:
>> +	case K3_RINGACC_ACCESS_MODE_POP_TAIL:
>> +		dev_dbg(ring->parent->dev,
>> +			"memcpy_fromio(x): --> ptr(%p), mode:%d\n", ptr,
>> +			access_mode);
>> +		memcpy_fromio(elem, ptr, (4 << ring->elm_size));
> 
> Does this work for any elem_size < 64 or any element size not aligned with 64?

Max value of elem_size is 6 as per TRM.

> 
> IIUC, in message mode, ring element should be inserted in a single burst write
> and there is no doorbell facility. If the above conditions are not met, we are
> supposed to use proxy.
> 
> In this driver, I don't see any restrictions on the ring element size for
> message mode and directly written to io. Am I missing something?
> 

You are right and corresponding check can be added at k3_ringacc_ring_cfg() for the case
K3_RINGACC_RING_MODE_MESSAGE and no proxy

[..]

-- 
Best regards,
grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ