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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <578E4C33.2070200@gmail.com>
Date:	Tue, 19 Jul 2016 21:20:11 +0530
From:	arvind Yadav <arvind.yadav.cs@...il.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] ESIA : Dummy eisa_driver_register should return error
 code

SCSI_AHA1740 : This is support for a SCSI host adapter.
If CONFIG_EISA is disable then we should not register eisa driver.
static __init int aha1740_init (void)
{
     return eisa_driver_register (&aha1740_driver);

}

static __exit void aha1740_exit (void)
{
         eisa_driver_unregister (&aha1740_driver);
}

module_init (aha1740_init);
module_exit (aha1740_exit);
----------------------------------------
-Shall we add check by using CONFIG_EISA. We can avoid to register a dummy
driver.

static __init int aha1740_init (void)
{
         int err = 0;
#ifdef CONFIG_EISA
         err = eisa_driver_register (&aha1740_driver);
#endif
         return err;
}

static __exit void aha1740_exit (void)
{
#ifdef CONFIG_EISA
         eisa_driver_unregister (&aha1740_driver);
#endif
}

On Tuesday 19 July 2016 10:01 AM, Christoph Hellwig wrote:
> On Tue, Jul 19, 2016 at 12:15:01AM +0530, Arvind Yadav wrote:
>> The inline eisa_driver_register stub simply allows compilation on
>> systems with CONFIG_EISA disabled. the dummy eisa_driver_register
>> does not register an *_eisa_driver at all. The inline
>> eisa_driver_register should return to indicate lack of support
>> when attempting to register an *_eisa_driver on such a system with
>> CONFIG_EISA disabled.
> Why?  The idea is that you can simply leave the stub in if registering
> say PCI / EISA.  With your change such a driver will fail to load even
> if it could serve PCI device in a !CONFIG_EISA config, which is the
> behavior we want.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ