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: <Y+6dFYd/0tSKriaj@smile.fi.intel.com>
Date:   Thu, 16 Feb 2023 23:16:05 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     "Limonciello, Mario" <mario.limonciello@....com>
Cc:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Jan Dąbroś <jsd@...ihalf.com>,
        Grzegorz Bernacki <gjb@...ihalf.com>,
        Thomas Rijo-john <Rijo-john.Thomas@....com>,
        Lendacky Thomas <Thomas.Lendacky@....com>,
        herbert@...dor.apana.org.au,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        linux-i2c@...r.kernel.org, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] i2c: designware: Use PCI PSP driver for communication

On Thu, Feb 16, 2023 at 03:01:35PM -0600, Limonciello, Mario wrote:
> On 2/16/2023 14:59, Andy Shevchenko wrote:
> > On Thu, Feb 16, 2023 at 02:55:07PM -0600, Limonciello, Mario wrote:
> > > On 2/16/2023 08:56, Andy Shevchenko wrote:
> > > > On Thu, Feb 16, 2023 at 07:29:53AM -0600, Mario Limonciello wrote:
> > > > > On 2/16/23 07:27, Jarkko Nikula wrote:
> > > > > > On 2/10/23 00:38, Mario Limonciello wrote:

...

> > > > > > >       config I2C_DESIGNWARE_AMDPSP
> > > > > > >         bool "AMD PSP I2C semaphore support"
> > > > > > > -    depends on X86_MSR
> > > > > > >         depends on ACPI
> > > > > > >         depends on I2C_DESIGNWARE_PLATFORM
> > > > > > > +    depends on CRYPTO_DEV_SP_PSP && !(I2C_DESIGNWARE_PLATFORM=y &&
> > > > > > > CRYPTO_DEV_CCP_DD=m)
> > > > > > >         help
> > > > > > 
> > > > > > Would this look better if split? I.e.
> > > > > > 
> > > > > >       depends on CRYPTO_DEV_SP_PSP
> > > > > >       depends on !(I2C_DESIGNWARE_PLATFORM=y && CRYPTO_DEV_CCP_DD=m)
> > > > > Yes, thanks I'll change that for next version.
> > > > 
> > > > I'm wondering if this is homegrown implementation of 'imply' keyword?
> > > 
> > > Like this?
> > > 
> > > config I2C_DESIGNWARE_AMDPSP
> > >     depends on CRYPTO_DEV_SP_PSP
> > >     depends on CRYPTO_DEV_CCP_DD
> > > 
> > > config CRYPTO_DEV_CCP_DD
> > >     imply I2C_DESIGNWARE_PLATFORM
> > 
> > Looks okay, but I'm not familiar with this code. The documentation about
> > 'imply' can be found here:
> > 
> > https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes
> 
> Yeah I found that, but this was my first time using imply, so I was hoping
> someone who has used it could validate I interpreted it correctly.
> 
> Following the example CRYPTO_DEV_CCP_DD would be FOO and
> I2C_DESIGNWARE_PLATFORM would be BAZ so I thought so.

'imply' == weak 'select', it means that the target option may or may not be
selected. I.o.w. "optional" dependency.

Does CRYPTO_DEV_CCP_DD use I2C DesignWare code?

If I understand correctly the "depends on !(I2C_DESIGNWARE_PLATFORM=y &&
CRYPTO_DEV_CCP_DD=m)" you want to have IS_REACHABLE() in your code and actually
"imply CRYPTO_DEV_CCP_DD" in the I2C_DESIGNWARE_AMDPSP.


-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ