[GIT,PULL] tpmdd: a critical bug fix for v6.4-rc1

Message ID 20230427111125.13769-1-jarkko@kernel.org
State New
Headers
Series [GIT,PULL] tpmdd: a critical bug fix for v6.4-rc1 |

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/ tags/tpmdd-v6.4-rc1-fix

Message

Jarkko Sakkinen April 27, 2023, 11:11 a.m. UTC
  The following changes since commit 6e98b09da931a00bf4e0477d0fa52748bf28fcce:

  Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next (2023-04-26 16:07:23 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git/ tags/tpmdd-v6.4-rc1-fix

for you to fetch changes up to e2f14081c68395f0b0f9072bbf5e56450b1cb3f8:

  tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers (2023-04-27 14:01:45 +0300)

----------------------------------------------------------------
This PR fixes a critical bug in my first pull request.

Link: https://lore.kernel.org/all/ZEjqhwHWBnxcaRV5@xpf.sh.intel.com/

----------------------------------------------------------------
Jarkko Sakkinen (1):
      tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers

 drivers/char/tpm/tpm-chip.c     | 22 +++++++++++++++++++---
 drivers/char/tpm/tpm.h          |  2 +-
 drivers/char/tpm/tpm_tis_core.c |  2 +-
 include/linux/tpm.h             | 15 +++++++++------
 4 files changed, 30 insertions(+), 11 deletions(-)
  

Comments

Linus Torvalds April 27, 2023, 3:38 p.m. UTC | #1
On Thu, Apr 27, 2023 at 4:11 AM Jarkko Sakkinen <jarkko@kernel.org> wrote:
>
> This PR fixes a critical bug in my first pull request.

That doesn't work AT ALL.

You have this duplicated line

-       TPM_CHIP_FLAG_FIRMWARE_UPGRADE  = BIT(7),
+       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
+       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
+       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),

in that patch (presumably due to some edit-time fat-fingering), which
causes lots and lots of

  ./include/linux/tpm.h:285:9: error: redeclaration of enumerator
‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’
    285 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./include/linux/tpm.h:284:9: note: previous definition of
‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’ with type ‘int’
    284 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ./include/linux/tpm.h:286:9: error: redeclaration of enumerator
‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’
    286 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

errors.

While I could easily just remove the duplicated lines in my merge,
that would make things non-bisectable, so I unpulled this instead.

             Linus
  
Jarkko Sakkinen April 27, 2023, 4:30 p.m. UTC | #2
On Thu Apr 27, 2023 at 6:38 PM EEST, Linus Torvalds wrote:
> On Thu, Apr 27, 2023 at 4:11 AM Jarkko Sakkinen <jarkko@kernel.org> wrote:
> >
> > This PR fixes a critical bug in my first pull request.
>
> That doesn't work AT ALL.
>
> You have this duplicated line
>
> -       TPM_CHIP_FLAG_FIRMWARE_UPGRADE  = BIT(7),
> +       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
> +       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
> +       TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
>
> in that patch (presumably due to some edit-time fat-fingering), which
> causes lots and lots of
>
>   ./include/linux/tpm.h:285:9: error: redeclaration of enumerator
> ‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’
>     285 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
>         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   ./include/linux/tpm.h:284:9: note: previous definition of
> ‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’ with type ‘int’
>     284 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
>         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   ./include/linux/tpm.h:286:9: error: redeclaration of enumerator
> ‘TPM_CHIP_FLAG_FIRMWARE_UPGRADE’
>     286 |         TPM_CHIP_FLAG_FIRMWARE_UPGRADE          = BIT(7),
>         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> errors.
>
> While I could easily just remove the duplicated lines in my merge,
> that would make things non-bisectable, so I unpulled this instead.
>
>              Linus

My bad, please do not. I'll send a new one, cherry pick gone wrong :-(

BR, Jarkko