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: <CAA2Cew7p7iu=J_4pFjWCHFZuGva0tkdmmdy2QmBdK_fXVxm07g@mail.gmail.com>
Date:   Wed, 15 Mar 2023 12:07:09 +0100
From:   Grzegorz Bernacki <gjb@...ihalf.com>
To:     Mario Limonciello <mario.limonciello@....com>
Cc:     Jan Dąbroś <jsd@...ihalf.com>,
        Rijo-john.Thomas@....com, Thomas.Lendacky@....com,
        herbert@...dor.apana.org.au, John Allen <john.allen@....com>,
        Felix.Held@....com, "David S. Miller" <davem@...emloft.net>,
        linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 7/8] crypto: ccp: Add support for ringing a platform doorbell

Hi Mario,
[...]
> +int psp_ring_platform_doorbell(int msg)
> +{
> +       struct psp_device *psp = psp_get_master_device();
> +       struct psp_platform_access_device *pa_dev;
> +       u32 __iomem *button, *cmd;
> +       int ret, val;
> +
> +       if (!psp || !psp->platform_access_data)
> +               return -ENODEV;
> +
> +       pa_dev = psp->platform_access_data;
> +       button = psp->io_regs + pa_dev->vdata->doorbell_button_reg;
> +       cmd = psp->io_regs + pa_dev->vdata->doorbell_cmd_reg;
> +
> +       mutex_lock(&pa_dev->doorbell_mutex);
> +
> +       if (check_doorbell(button)) {
> +               dev_dbg(psp->dev, "doorbell is not ready\n");

Can you change dev_dbg()  to dev_err() when there is an error in all
cases in that function?
[...]

> +
> +       val = FIELD_GET(PSP_CMDRESP_STS, ioread32(cmd));
> +       if (val) {
> +               ret = -EIO;
> +               goto unlock;
> +       }

Are you sure that PSP_CMDRESP_STS should be zero? My tests failed due
to the fact the val is 1 and moreover I don't see that check in the
original Jan's patch.
Can you also add here dev_err()?

thanks,
grzegorz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ