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: <CAOuPNLj+m5HAVgs6OWVEuhNFBJv=WbYNdJ1u0SsdHa52ejFrCg@mail.gmail.com>
Date:   Fri, 6 Oct 2017 19:58:44 +0530
From:   Pintu Kumar <pintu.ping@...il.com>
To:     Laura Abbott <labbott@...hat.com>
Cc:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pintu Kumar <pintu_agarwal@...oo.com>
Subject: Re: [PATCHv2 1/1] [tools]: android/ion: userspace test utility for
 ion buffer sharing

>> +
>> +     heap_type = ion_info->heap_type;
>> +     heap_size = ion_info->heap_size;
>> +     flag_type = ion_info->flag_type;
>> +     alloc_data.len = heap_size;
>> +     alloc_data.heap_id_mask = heap_type;
>
> The heap type and heap ID are not the same thing. You need
> to determine the heap id from using the new query ioctl.
>

Hello Laura,
Can you point out some example on how to retrieve heap_id from query ioctl.
Sorry, I am not able to figure out, how can I get a specific heap_id
if I know the heap_type.
Do, I need to query all the heaps? Then how do I map to heap_data for each heap?
Here is what I am doing.

struct ion_heap_query query;
struct ion_heap_data heap_data[5];

        query.cnt = 5;
        /* Query ION heap_id_mask from ION heap */
        ret = ioctl(ionfd, ION_IOC_HEAP_QUERY, &query);
        if (ret < 0) {
                fprintf(stderr, "<%s>: Failed: ION_IOC_HEAP_QUERY: %s\n",
                        __func__, strerror(errno));
                goto err_heap;
        }

After this how to map each heap_data[..]  to query.heaps?
Do you have any examples?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ