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]
Date:   Mon, 15 Oct 2018 12:06:12 -0700
From:   Roman Kiryanov <rkir@...gle.com>
To:     gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org, Todd Kjos <tkjos@...gle.com>
Subject: Re: [PATCH v3 06/15] platform: goldfish: pipe: Move memory allocation
 from probe to init

> > probe does not know what memory to allocate. We have several versions
> > of the driver (with different init) and different versions allocate
> > different state.
>
> I only see one driver here.

It will be added in "PATCH v3 15/15". There will be two init functions
allocating
different states.

> Why does probe not know what to allocate?  That is exactly when the
> device is bound to the driver, you have _way_ more information than you
> do at init time.

We have two versions of the driver. Probe asks for the version and
calls the init function for this version.
I don't want probe to know everything about all versions.

> > >, not init time as what
> > > happens if the hardware is not present yet your driver is loaded?
> >
> > init will have to rollback what it allocated.
>
> But those resources it will sit there wasted until unload happens.  And
> unload _never_ happens on a system unless you are a developer working on
> the module.

If probe fails I expect the kernel to release all resources. Is this
not the case?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ