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:   Thu, 14 Dec 2017 08:22:55 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     John Stultz <john.stultz@...aro.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Laura Abbott <labbott@...hat.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Archit Taneja <architt@...eaurora.org>,
        Daniel Vetter <daniel@...ll.ch>,
        Dmitry Shmidt <dimitrysh@...gle.com>,
        Todd Kjos <tkjos@...gle.com>,
        Amit Pundir <amit.pundir@...aro.org>
Subject: Re: [PATCH v2] staging: ion: Fix ion_cma_heap allocations

On Wed, Dec 13, 2017 at 01:26:04PM -0800, John Stultz wrote:
> In trying to add support for drm_hwcomposer to HiKey,
> I've needed to utilize the ION CMA heap, and I've noticed
> problems with allocations on newer kernels failing.
> 
> It seems back with 204f672255c2 ("ion: Use CMA APIs directly"),
> the ion_cma_heap code was modified to use the CMA API, but
> kept the arguments as buffer lengths rather then number of pages.
> 
> This results in errors as we don't have enough pages in CMA to
> satisfy the exaggerated requests.
> 
> This patch converts the ion_cma_heap CMA API usage to properly
> request pages.
> 
> It also fixes a minor issue in the allocation where in the error
> path, the cma_release is called with the buffer->size value which
> hasn't yet been set.
> 
> Cc: Laura Abbott <labbott@...hat.com>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: Benjamin Gaignard <benjamin.gaignard@...aro.org>
> Cc: Archit Taneja <architt@...eaurora.org>
> Cc: Greg KH <gregkh@...uxfoundation.org>
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: Dmitry Shmidt <dimitrysh@...gle.com>
> Cc: Todd Kjos <tkjos@...gle.com>
> Cc: Amit Pundir <amit.pundir@...aro.org>
> Fixes: 204f672255c2 ("staging: android: ion: Use CMA APIs directly")
> Acked-by: Laura Abbott <labbott@...hat.com>
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> ---
> v2: Fix build errors when CONFIG_CMA_ALIGNMENT isn't defined

Wait, why would CONFIG_CMA_ALIGNMENT not be defined if we are using the
cma code?  Is that a Kconfig issue somehow?

thanks,

greg k-h

Powered by blists - more mailing lists