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: <1552888060.22480.197.camel@intel.com>
Date:   Sun, 17 Mar 2019 22:47:40 -0700
From:   Sudeep Dutt <sudeep.dutt@...el.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc:     Sudeep Dutt <sudeep.dutt@...el.com>, ashutosh.dixit@...el.com,
        linux-kernel@...r.kernel.org
Subject: Re: scif_insert_vma()

On Mon, 2019-03-11 at 08:45 +0200, Jarkko Sakkinen wrote:
> Hi
> 
> Just wondering what will happen if kzalloc() fails in scif_mmap.c. How
> it is recovered? I don't see anything in the VMA callbacks taking care
> of this.

Hi Jarkko,

scif_insert_vma(..) is called from scif_mmap(..) and scif_vma_open(..).
scif_mmap(..) checks for allocation failures but scif_vma_open(..) does
not on purpose.

The vm_operations_struct open(..)/close(..) callbacks do not allow
returning errors. The driver will take a reference to the VMA private
data structure irrespective of whether the allocation during the
open(..) callback succeeds or fails. The close(..) callback cleans up
the data structures from the mmap(..) or open(..) callbacks if any.

Thanks,
Sudeep Dutt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ