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>] [day] [month] [year] [list]
Date:	Tue, 07 Jun 2016 11:17:13 +0900
From:	Jaewon Kim <jaewon31.kim@...sung.com>
To:	robh+dt@...nel.org, m.szyprowski@...sung.com
Cc:	r64343@...escale.com, grant.likely@...aro.org,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	jaewon31.kim@...il.com
Subject: Re: Re: [RESEND][PATCH] drivers: of: of_reserved_mem: fixup the CMA
 alignment not to affect dma-coherent

>> From: Jaewon <jaewon31.kim@...sung.com>
>>
>> There was an alignment mismatch issue for CMA and it was fixed by
>> commit 1cc8e3458b51 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup").
>> However the way of the commit considers not only dma-contiguous(CMA) but also
>> dma-coherent which has no that requirement.
>>
>> This patch checks more to distinguish dma-contiguous(CMA) from dma-coherent.
>>
>> Signed-off-by: Jaewon Kim <jaewon31.kim@...sung.com>
>> ---
>>  drivers/of/of_reserved_mem.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
>> index ed01c01..45b873e 100644
>> --- a/drivers/of/of_reserved_mem.c
>> +++ b/drivers/of/of_reserved_mem.c
>> @@ -127,7 +127,10 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
>>         }
>>
>>         /* Need adjust the alignment to satisfy the CMA requirement */
>> -       if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool"))
>> +       if (IS_ENABLED(CONFIG_CMA)
>> +           && of_flat_dt_is_compatible(node, "shared-dma-pool")
>> +           && of_get_flat_dt_prop(node, "reusable", NULL)
>> +           && !of_get_flat_dt_prop(node, "no-map", NULL)) {
>
>This won't actually compile as you add a bracket here, but no closing bracket...
>
>I've fixed up and applied.
Thank you very much for your correction.
I might add debug code with the bracket.
Please let me know if any issue in submitting this patch
>
>>                 align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order));
>>
>>         prop = of_get_flat_dt_prop(node, "alloc-ranges", &len);
>> --
>> 1.9.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ