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: <94b4ef23-282d-44e4-d21e-60c8a33c342c@enpas.org>
Date:   Mon, 12 Aug 2019 16:26:26 +0200
From:   Max Staudt <max@...as.org>
To:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc:     axboe@...nel.dk, linux-ide@...r.kernel.org,
        linux-m68k@...r.kernel.org, linux-kernel@...r.kernel.org,
        glaubitz@...sik.fu-berlin.de, schmitzmic@...il.com,
        geert@...ux-m68k.org
Subject: Re: [PATCH v4] ata/pata_buddha: Probe via modalias instead of
 initcall

On 08/12/2019 02:15 PM, Bartlomiej Zolnierkiewicz wrote:
>> What's a good way to do that, given that we now have module_exit()> defined and an exit function is void?
> 
> What about something like this:
> 
> static bool xsurf_present;
> ...
> static int __init pata_buddha_late_init(void)
> ...
> 		if (pata_buddha_probe(z, &xsurf_ent) == 0 &&
> 		    xsurf_present == false)
> 			xsurf_present = true;
> ...
> static void __exit pata_buddha_exit(void)
> ...
> 	if (xsurf_present)
> 		return -EBUSY;
> ...
> 
> ?

Okay, so we're talking about the same idea. Great!

Unfortunately, pata_buddha_exit() is void, and thus can't fail. According to Documentation/kernel-hacking/hacking.rst this is by design.

Any other ideas? We could also continue to disallow unloading completely until MFD support comes along.


Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ