mbox series

[v2,0/6] net: fm: Verify Fman microcode

Message ID 20220422173840.2260582-1-sean.anderson@seco.com
Headers show
Series net: fm: Verify Fman microcode | expand

Message

Sean Anderson April 22, 2022, 5:38 p.m. UTC
Surprisingly, Fman microcode does not seem to be verified. This series
aims to rectify this by introducing an optional FIT wrapper. This
wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do not
use this config, so the microcode will remain unverified for them. This
is OK, since we do not want to break existing systems.

This series depends on [1]. There is no logical dependency, but they
modify adjacent #includes, so the past patch will not apply cleanly
unless that series is applied.

[1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/

Changes in v2:
- Document helpers
- Split off Fman microcode verification patches into their own series
- Split helper refactoring into a patch adding the helpers and one patch
  per subsystem.

Sean Anderson (6):
  ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
  image: fit: Add some helpers for getting data
  ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
  cmd: fpga: Convert to use fit_get_data_node
  net: Convert fit verification to use fit_get_data_*
  net: fm: Add support for FIT firmware

 arch/arm/cpu/armv8/sec_firmware.c  | 52 ++--------------------
 boot/image-fit.c                   | 37 ++++++++++++++++
 cmd/fpga.c                         | 24 +++-------
 drivers/net/fm/fm.c                | 18 ++++++++
 drivers/net/fsl-mc/mc.c            | 30 ++-----------
 drivers/net/pfe_eth/pfe_firmware.c | 40 +----------------
 include/image.h                    | 70 ++++++++++++++++++++++++++++++
 7 files changed, 139 insertions(+), 132 deletions(-)

Comments

Sean Anderson Aug. 13, 2022, 6:15 a.m. UTC | #1
On 4/22/22 1:38 PM, Sean Anderson wrote:
> Surprisingly, Fman microcode does not seem to be verified. This series
> aims to rectify this by introducing an optional FIT wrapper. This
> wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do not
> use this config, so the microcode will remain unverified for them. This
> is OK, since we do not want to break existing systems.
> 
> This series depends on [1]. There is no logical dependency, but they
> modify adjacent #includes, so the past patch will not apply cleanly
> unless that series is applied.
> 
> [1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/
> 
> Changes in v2:
> - Document helpers
> - Split off Fman microcode verification patches into their own series
> - Split helper refactoring into a patch adding the helpers and one patch
>    per subsystem.
> 
> Sean Anderson (6):
>    ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
>    image: fit: Add some helpers for getting data
>    ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
>    cmd: fpga: Convert to use fit_get_data_node
>    net: Convert fit verification to use fit_get_data_*
>    net: fm: Add support for FIT firmware
> 
>   arch/arm/cpu/armv8/sec_firmware.c  | 52 ++--------------------
>   boot/image-fit.c                   | 37 ++++++++++++++++
>   cmd/fpga.c                         | 24 +++-------
>   drivers/net/fm/fm.c                | 18 ++++++++
>   drivers/net/fsl-mc/mc.c            | 30 ++-----------
>   drivers/net/pfe_eth/pfe_firmware.c | 40 +----------------
>   include/image.h                    | 70 ++++++++++++++++++++++++++++++
>   7 files changed, 139 insertions(+), 132 deletions(-)
> 

ping
Peng Fan (OSS) Sept. 6, 2022, 5:22 a.m. UTC | #2
On 4/23/2022 1:38 AM, Sean Anderson wrote:
> Surprisingly, Fman microcode does not seem to be verified. This series
> aims to rectify this by introducing an optional FIT wrapper. This
> wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do not
> use this config, so the microcode will remain unverified for them. This
> is OK, since we do not want to break existing systems.
> 
> This series depends on [1]. There is no logical dependency, but they
> modify adjacent #includes, so the past patch will not apply cleanly
> unless that series is applied.
> 
> [1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/
> 
> Changes in v2:
> - Document helpers
> - Split off Fman microcode verification patches into their own series
> - Split helper refactoring into a patch adding the helpers and one patch
>    per subsystem.
> 
> Sean Anderson (6):
>    ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
>    image: fit: Add some helpers for getting data
>    ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
>    cmd: fpga: Convert to use fit_get_data_node
>    net: Convert fit verification to use fit_get_data_*
>    net: fm: Add support for FIT firmware

Patch 6 failed to apply, could you please rebase?

Thanks,
Peng.

> 
>   arch/arm/cpu/armv8/sec_firmware.c  | 52 ++--------------------
>   boot/image-fit.c                   | 37 ++++++++++++++++
>   cmd/fpga.c                         | 24 +++-------
>   drivers/net/fm/fm.c                | 18 ++++++++
>   drivers/net/fsl-mc/mc.c            | 30 ++-----------
>   drivers/net/pfe_eth/pfe_firmware.c | 40 +----------------
>   include/image.h                    | 70 ++++++++++++++++++++++++++++++
>   7 files changed, 139 insertions(+), 132 deletions(-)
>
Sean Anderson Sept. 6, 2022, 3:27 p.m. UTC | #3
On 9/6/22 1:22 AM, Peng Fan wrote:
> 
> 
> On 4/23/2022 1:38 AM, Sean Anderson wrote:
>> Surprisingly, Fman microcode does not seem to be verified. This series
>> aims to rectify this by introducing an optional FIT wrapper. This
>> wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do not
>> use this config, so the microcode will remain unverified for them. This
>> is OK, since we do not want to break existing systems.
>>
>> This series depends on [1]. There is no logical dependency, but they
>> modify adjacent #includes, so the past patch will not apply cleanly
>> unless that series is applied.
>>
>> [1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/
>>
>> Changes in v2:
>> - Document helpers
>> - Split off Fman microcode verification patches into their own series
>> - Split helper refactoring into a patch adding the helpers and one patch
>>    per subsystem.
>>
>> Sean Anderson (6):
>>    ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
>>    image: fit: Add some helpers for getting data
>>    ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
>>    cmd: fpga: Convert to use fit_get_data_node
>>    net: Convert fit verification to use fit_get_data_*
>>    net: fm: Add support for FIT firmware
> 
> Patch 6 failed to apply, could you please rebase?

Please try [1].

--Sean

[1] https://lore.kernel.org/u-boot/20220816151607.1569660-1-sean.anderson@seco.com/#t
Peng Fan (OSS) Sept. 7, 2022, 4:31 a.m. UTC | #4
Hi Sean,

On 9/6/2022 11:27 PM, Sean Anderson wrote:
> 
> 
> On 9/6/22 1:22 AM, Peng Fan wrote:
>>
>>
>> On 4/23/2022 1:38 AM, Sean Anderson wrote:
>>> Surprisingly, Fman microcode does not seem to be verified. This series
>>> aims to rectify this by introducing an optional FIT wrapper. This
>>> wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do not
>>> use this config, so the microcode will remain unverified for them. This
>>> is OK, since we do not want to break existing systems.
>>>
>>> This series depends on [1]. There is no logical dependency, but they
>>> modify adjacent #includes, so the past patch will not apply cleanly
>>> unless that series is applied.
>>>
>>> [1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/
>>>
>>> Changes in v2:
>>> - Document helpers
>>> - Split off Fman microcode verification patches into their own series
>>> - Split helper refactoring into a patch adding the helpers and one patch
>>>     per subsystem.
>>>
>>> Sean Anderson (6):
>>>     ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
>>>     image: fit: Add some helpers for getting data
>>>     ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
>>>     cmd: fpga: Convert to use fit_get_data_node
>>>     net: Convert fit verification to use fit_get_data_*
>>>     net: fm: Add support for FIT firmware
>>
>> Patch 6 failed to apply, could you please rebase?
> 
> Please try [1].
> 
> --Sean
> 
> [1] https://lore.kernel.org/u-boot/20220816151607.1569660-1-sean.anderson@seco.com/#t

➜  u-boot git:(fsl-qoriq-master) ✗ pwclient git-am 1666898 1666901 
1666900 1666903 1666902 1666904
Applying patch #1666898 using 'git am'
Description: [RESEND,v2,1/6] ARMv8/sec_firmware: Remove 
SEC_FIRMWARE_FIT_CNF_NAME
Applying: ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
Applying patch #1666901 using 'git am'
Description: [RESEND,v2,2/6] image: fit: Add some helpers for getting data
Applying: image: fit: Add some helpers for getting data
Applying patch #1666900 using 'git am'
Description: [RESEND,v2,3/6] ARMv8/sec_firmware: Convert to use 
fit_get_data_conf_prop
Applying: ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
Applying patch #1666903 using 'git am'
Description: [RESEND,v2,4/6] cmd: fpga: Convert to use fit_get_data_node
Applying: cmd: fpga: Convert to use fit_get_data_node
Applying patch #1666902 using 'git am'
Description: [RESEND,v2,5/6] net: Convert fit verification to use 
fit_get_data_*
Applying: net: Convert fit verification to use fit_get_data_*
Applying patch #1666904 using 'git am'
Description: [RESEND,v2,6/6] net: fm: Add support for FIT firmware
Applying: net: fm: Add support for FIT firmware
error: patch failed: drivers/net/fm/fm.c:6
error: drivers/net/fm/fm.c: patch does not apply
Patch failed at 0001 net: fm: Add support for FIT firmware
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
'git am' failed with exit status 128

Thanks,
Peng.
Peng Fan (OSS) Sept. 7, 2022, 5:02 a.m. UTC | #5
On 9/7/2022 12:31 PM, Peng Fan wrote:
> 
> Hi Sean,
> 
> On 9/6/2022 11:27 PM, Sean Anderson wrote:
>>
>>
>> On 9/6/22 1:22 AM, Peng Fan wrote:
>>>
>>>
>>> On 4/23/2022 1:38 AM, Sean Anderson wrote:
>>>> Surprisingly, Fman microcode does not seem to be verified. This series
>>>> aims to rectify this by introducing an optional FIT wrapper. This
>>>> wrapper is made mandatory if FIT_SIGNATURE is enabled. NXP boards do 
>>>> not
>>>> use this config, so the microcode will remain unverified for them. This
>>>> is OK, since we do not want to break existing systems.
>>>>
>>>> This series depends on [1]. There is no logical dependency, but they
>>>> modify adjacent #includes, so the past patch will not apply cleanly
>>>> unless that series is applied.
>>>>
>>>> [1] 
>>>> https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/
>>>>
>>>> Changes in v2:
>>>> - Document helpers
>>>> - Split off Fman microcode verification patches into their own series
>>>> - Split helper refactoring into a patch adding the helpers and one 
>>>> patch
>>>>     per subsystem.
>>>>
>>>> Sean Anderson (6):
>>>>     ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
>>>>     image: fit: Add some helpers for getting data
>>>>     ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
>>>>     cmd: fpga: Convert to use fit_get_data_node
>>>>     net: Convert fit verification to use fit_get_data_*
>>>>     net: fm: Add support for FIT firmware
>>>
>>> Patch 6 failed to apply, could you please rebase?
>>
>> Please try [1].
>>
>> --Sean
>>
>> [1] 
>> https://lore.kernel.org/u-boot/20220816151607.1569660-1-sean.anderson@seco.com/#t
> 
> ➜  u-boot git:(fsl-qoriq-master) ✗ pwclient git-am 1666898 1666901 
> 1666900 1666903 1666902 1666904
> Applying patch #1666898 using 'git am'
> Description: [RESEND,v2,1/6] ARMv8/sec_firmware: Remove 
> SEC_FIRMWARE_FIT_CNF_NAME
> Applying: ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME
> Applying patch #1666901 using 'git am'
> Description: [RESEND,v2,2/6] image: fit: Add some helpers for getting data
> Applying: image: fit: Add some helpers for getting data
> Applying patch #1666900 using 'git am'
> Description: [RESEND,v2,3/6] ARMv8/sec_firmware: Convert to use 
> fit_get_data_conf_prop
> Applying: ARMv8/sec_firmware: Convert to use fit_get_data_conf_prop
> Applying patch #1666903 using 'git am'
> Description: [RESEND,v2,4/6] cmd: fpga: Convert to use fit_get_data_node
> Applying: cmd: fpga: Convert to use fit_get_data_node
> Applying patch #1666902 using 'git am'
> Description: [RESEND,v2,5/6] net: Convert fit verification to use 
> fit_get_data_*
> Applying: net: Convert fit verification to use fit_get_data_*
> Applying patch #1666904 using 'git am'
> Description: [RESEND,v2,6/6] net: fm: Add support for FIT firmware
> Applying: net: fm: Add support for FIT firmware
> error: patch failed: drivers/net/fm/fm.c:6
> error: drivers/net/fm/fm.c: patch does not apply
> Patch failed at 0001 net: fm: Add support for FIT firmware
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> 'git am' failed with exit status 128

I fixed the conflict and applied this patchset to
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq.git: master

If anything wrong, please raise.

Thanks,
Peng.

> 
> Thanks,
> Peng.