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
| ||
|
Date: Wed, 11 May 2022 17:09:33 -0400 From: Boris Ostrovsky <boris.ostrovsky@...cle.com> To: Oleksandr <olekstysh@...il.com>, Stefano Stabellini <sstabellini@...nel.org> Cc: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, Juergen Gross <jgross@...e.com>, Julien Grall <julien@....org>, Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>, "Michael S. Tsirkin" <mst@...hat.com>, Christoph Hellwig <hch@...radead.org> Subject: Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants On 5/11/22 2:00 PM, Oleksandr wrote: > > On 07.05.22 21:19, Oleksandr Tyshchenko wrote: > > Hello Boris, Stefano > > >> From: Juergen Gross <jgross@...e.com> >> >> For support of virtio via grant mappings in rare cases larger mappings >> using consecutive grants are needed. Support those by adding a bitmap >> of free grants. >> >> As consecutive grants will be needed only in very rare cases (e.g. when >> configuring a virtio device with a multi-page ring), optimize for the >> normal case of non-consecutive allocations. >> >> Signed-off-by: Juergen Gross <jgross@...e.com> >> --- >> Changes RFC -> V1: >> - no changes >> Changes V1 -> V2: >> - no changes > > > May I please ask for the review here? I had a quick look but I am stuck on get_free_seq(), I need to stare at it some more. Unless someone else reviews this, I will try to get to this in the next couple of days. One thing I did notice is > >> @@ -1452,6 +1624,13 @@ int gnttab_init(void) >> } >> } >> + i = gnttab_interface->grefs_per_grant_frame * max_nr_grant_frames; >> + gnttab_free_bitmap = bitmap_zalloc(i, GFP_KERNEL); >> + if (!gnttab_free_bitmap) { >> + ret = -ENOMEM; >> + goto ini_nomem; >> + } This overwrites 'i' and will break error handling at ini_nomem. -boris
Powered by blists - more mailing lists