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, 27 Mar 2019 13:08:53 -0400 From: Vitaly Mayatskih <v.mayatskih@...il.com> To: Stefan Hajnoczi <stefanha@...hat.com> Cc: Michal Hocko <mhocko@...e.com>, linux-kernel@...r.kernel.org Subject: Re: [PATCH] vhost: zero vhost_vsock memory on allocation On Wed, Mar 27, 2019 at 12:49 PM Stefan Hajnoczi <stefanha@...hat.com> wrote: > Which field was accessed before initialization? > > I ask because the situation is now unclear since code remains that > assumes vsock is *not* zero-initialized: > > vsock->guest_cid = 0; /* no CID assigned yet */ > > atomic_set(&vsock->queued_replies, 0); It was hash. > If we're going to zalloc, let's get rid of explicit zero > initializations. Or let's use kvmalloc() and fix the uninitialized > access. Mixing both is confusing. I would go with zalloc, since it's easier to read and it prevents further situations like this. A zalloc was there originally (not in fallback though).
Powered by blists - more mailing lists