mbox series

[v8,0/4] use more system keyrings to verify arm64 and s390 kexec kernel image signature

Message ID 20220512070123.29486-1-coxu@redhat.com (mailing list archive)
Headers show
Series use more system keyrings to verify arm64 and s390 kexec kernel image signature | expand

Message

Coiby Xu May 12, 2022, 7:01 a.m. UTC
Currently, a problem faced by arm64 is if a kernel image is signed by a
MOK key, loading it via the kexec_file_load() system call would be
rejected with the error "Lockdown: kexec: kexec of unsigned images is
restricted; see man kernel_lockdown.7". This happens because arm64 uses
only the primary keyring i.e. the .builtin_trusted_keys keyring that
contains only kernel built-in keys to verify the kexec kernel image. MOK
keys are loaded into the .platform keyring or/and .machine keyring. The
.machine keyring is linked to the secondary keyring i.e.
.secondary_trusted_keys keyring when the end-user chooses to trust MOK
keys. The platform keyring is exclusively used for kexec kernel image
verification and .secondary_trusted_keys together with
.builtin_trusted_keys are the system trusted keyrings. So obviously
there is no reason to not use .secondary_trusted_keys or .platform
keyring for kernel image signature verification. 

Similarly, s390 only uses platform keyring for kernel image signature
verification and built-in keys and secondary keyring are not used.

This patch set allows arm64 and s390 to use more system keyrings
including the .secondary_trusted_keys and .platform keyring to verify
kexec kernel image signature as x86 does.

The 3rd arm64 patch depends on the first two patches. The 4th s390 patch
can be applied independently.

v8:
 - drop "Cc: stable@vger.kernel.org" for the first two prerequisite
   patches [Baoquan]

v7:
 - drop the Fixes tag for the 2nd patch and add patch prerequisites
   [Baoquan]
 - improve cover letter

v6:
 - integrate the first three patches of "[PATCH 0/4] Unifrom keyring
   support across architectures and functions" from Michal [1]
 - improve commit message [Baoquan, Michal]
 - directly assign kexec_kernel_verify_pe_sig to
   kexec_file_ops->verify_sig [Michal]

v5:
 - improve commit message [Baoquan]

v4:
 - fix commit reference format issue and other checkpatch.pl warnings [Baoquan]

v3:
 - s/arch_kexec_kernel_verify_pe_sig/kexec_kernel_verify_pe_sig [Eric]
 - clean up arch_kexec_kernel_verify_sig [Eric]

v2:
 - only x86_64 and arm64 need to enable PE file signature check [Dave]

[1] https://lore.kernel.org/lkml/cover.1644953683.git.msuchanek@suse.de/

Coiby Xu (3):
  kexec: clean up arch_kexec_kernel_verify_sig
  kexec, KEYS: make the code in bzImage64_verify_sig generic
  arm64: kexec_file: use more system keyrings to verify kernel image
    signature

Michal Suchanek (1):
  kexec, KEYS, s390: Make use of built-in and secondary keyring for
    signature verification

 arch/arm64/kernel/kexec_image.c       | 11 +-----
 arch/s390/kernel/machine_kexec_file.c | 18 +++++++---
 arch/x86/kernel/kexec-bzimage64.c     | 20 +----------
 include/linux/kexec.h                 |  7 ++--
 kernel/kexec_file.c                   | 51 ++++++++++++++++-----------
 5 files changed, 50 insertions(+), 57 deletions(-)

Comments

Mimi Zohar May 20, 2022, 5:04 p.m. UTC | #1
Hi Coiby,

On Thu, 2022-05-12 at 15:01 +0800, Coiby Xu wrote:

The cover letter should start out with an overall problem description
and then continue with the specifics.  In this case each of the arch's
use different keyrings to validate the kexec kernel image signature.  I
would continue with saying the MOK keys were originally loaded onto the
.platform keyring with the other EFI keys, but recently with the new
.machine keyring that changed.

The purpose of this patch set is a generic solution for the different
archs.


> Currently, a problem faced by arm64 is if a kernel image is signed by a
> MOK key, loading it via the kexec_file_load() system call would be
> rejected with the error "Lockdown: kexec: kexec of unsigned images is
> restricted; see man kernel_lockdown.7". This happens because arm64 uses
> only the primary keyring i.e. the .builtin_trusted_keys keyring that
> contains only kernel built-in keys to verify the kexec kernel image. MOK
> keys are loaded into the .platform keyring or/and .machine keyring. The
> .machine keyring is linked to the secondary keyring i.e.
> .secondary_trusted_keys keyring when the end-user chooses to trust MOK
> keys. The platform keyring is exclusively used for kexec kernel image
> verification and .secondary_trusted_keys together with
> .builtin_trusted_keys are the system trusted keyrings. So obviously
> there is no reason to not use .secondary_trusted_keys or .platform
> keyring for kernel image signature verification. 

Both the ".platform" and ".machine" keyring are linked to the
".secondary_trusted_keys" keyring.   The root of trust for these
keyrings are very different.  Instead of saying "So obviously there is
no reason to not use .secondary_trusted_keys" it would be more
beneficial to describe the root of trusts, allowing others to draw
their own conclusions for their usecase.

thanks,

Mimi

> 
> Similarly, s390 only uses platform keyring for kernel image signature
> verification and built-in keys and secondary keyring are not used.
> 
> This patch set allows arm64 and s390 to use more system keyrings
> including the .secondary_trusted_keys and .platform keyring to verify
> kexec kernel image signature as x86 does.
> 
> The 3rd arm64 patch depends on the first two patches. The 4th s390 patch
> can be applied independently.

> v8:
>  - drop "Cc: stable@vger.kernel.org" for the first two prerequisite
>    patches [Baoquan]
> 
> v7:
>  - drop the Fixes tag for the 2nd patch and add patch prerequisites
>    [Baoquan]
>  - improve cover letter
> 
> v6:
>  - integrate the first three patches of "[PATCH 0/4] Unifrom keyring
>    support across architectures and functions" from Michal [1]
>  - improve commit message [Baoquan, Michal]
>  - directly assign kexec_kernel_verify_pe_sig to
>    kexec_file_ops->verify_sig [Michal]
> 
> v5:
>  - improve commit message [Baoquan]
> 
> v4:
>  - fix commit reference format issue and other checkpatch.pl warnings [Baoquan]
> 
> v3:
>  - s/arch_kexec_kernel_verify_pe_sig/kexec_kernel_verify_pe_sig [Eric]
>  - clean up arch_kexec_kernel_verify_sig [Eric]
> 
> v2:
>  - only x86_64 and arm64 need to enable PE file signature check [Dave]
> 
> [1] https://lore.kernel.org/lkml/cover.1644953683.git.msuchanek@suse.de/
> 
> Coiby Xu (3):
>   kexec: clean up arch_kexec_kernel_verify_sig
>   kexec, KEYS: make the code in bzImage64_verify_sig generic
>   arm64: kexec_file: use more system keyrings to verify kernel image
>     signature
> 
> Michal Suchanek (1):
>   kexec, KEYS, s390: Make use of built-in and secondary keyring for
>     signature verification
> 
>  arch/arm64/kernel/kexec_image.c       | 11 +-----
>  arch/s390/kernel/machine_kexec_file.c | 18 +++++++---
>  arch/x86/kernel/kexec-bzimage64.c     | 20 +----------
>  include/linux/kexec.h                 |  7 ++--
>  kernel/kexec_file.c                   | 51 ++++++++++++++++-----------
>  5 files changed, 50 insertions(+), 57 deletions(-)
>
Coiby Xu May 25, 2022, 9:59 a.m. UTC | #2
Hi Mimi,

On Fri, May 20, 2022 at 01:04:47PM -0400, Mimi Zohar wrote:
>Hi Coiby,
>
>On Thu, 2022-05-12 at 15:01 +0800, Coiby Xu wrote:
>
>The cover letter should start out with an overall problem description
>and then continue with the specifics.  In this case each of the arch's
>use different keyrings to validate the kexec kernel image signature.  I

Thanks for the suggestion! I will start with an overall problem
description in next version. For me, the bigger problem is arm kexec
can't make use of .secondary_trusted_keys or .platform to verify kernel
image signature. The by-product of the solution is it also helps
address the problem of inconsistent usage of keyrings by kexec between
different arches.

>would continue with saying the MOK keys were originally loaded onto the
>.platform keyring with the other EFI keys, but recently with the new
>.machine keyring that changed.

It seems I lack some background knowledge that makes me fail to
appreciate what change the new .machine keyring brings to kexec. As far
as I can understand, the new .machine keyring doesn't seem to change
much about kexec kernel image signature verification. kexec should be
able to use MOK keys to verify signature regardless of the keys being
loaded into .platform keyring or into the new .machine keyring. Because
the MOK keys have already be used to verify the 1st booting kernel's
image signature. To me, the significance of the new .machine keyring is
the end-users-enrolled keys can be also used to verify kernel modules
(the end users can also add his key to the .secondary_trusted_keys
keyring but the key needs to vouched by any existing key from the
.builtin_trusted_keys or .secondary_trusted_keys which is nearly
impossible).

>
>The purpose of this patch set is a generic solution for the different
>archs.
>
>
>> Currently, a problem faced by arm64 is if a kernel image is signed by a
>> MOK key, loading it via the kexec_file_load() system call would be
>> rejected with the error "Lockdown: kexec: kexec of unsigned images is
>> restricted; see man kernel_lockdown.7". This happens because arm64 uses
>> only the primary keyring i.e. the .builtin_trusted_keys keyring that
>> contains only kernel built-in keys to verify the kexec kernel image. MOK
>> keys are loaded into the .platform keyring or/and .machine keyring. The
>> .machine keyring is linked to the secondary keyring i.e.
>> .secondary_trusted_keys keyring when the end-user chooses to trust MOK
>> keys. The platform keyring is exclusively used for kexec kernel image
>> verification and .secondary_trusted_keys together with
>> .builtin_trusted_keys are the system trusted keyrings. So obviously
>> there is no reason to not use .secondary_trusted_keys or .platform
>> keyring for kernel image signature verification.
>
>Both the ".platform" and ".machine" keyring are linked to the
>".secondary_trusted_keys" keyring.   

I don't find any code that links the .platform keyring to the
.secondary_trusted_keys keyring and one [1] of your replies to "[PATCH
4/4] module, KEYS: Make use of platform keyring for signature
verification" is as follows,
   "Permission for loading the pre-OS keys onto the 'platform' keyring and
   using them is limited to verifying the kexec kernel image, nothing
   else."

[1] https://lore.kernel.org/linux-arm-kernel/3e39412657a4b0839bcf38544d591959e89877b8.camel@linux.ibm.com/

>The root of trust for these
>keyrings are very different.  Instead of saying "So obviously there is
>no reason to not use .secondary_trusted_keys" it would be more
>beneficial to describe the root of trusts, allowing others to draw
>their own conclusions for their usecase.

Thanks for the suggestion! I'll add the following text in v9, do it
looks good to you?

The root of trusts of the keys in the %.builtin_trusted_keys and
secondary_trusted_keys keyring is a Linux distribution vendor. The
.platform keyring could have both UEFI db keys and MOK keys or only UEFI
db keys. And the .machine keyring only have MOK keys. The root trust of
UEFI db keys is UEFI Platform Key which is shipped by an UEFI firmware
vendor. The root trust of MOK keys is a Linux distribution vendor (shim
has built-in MOK key) and the end user could also be another root of
trust if he/she enrolls his own key.

The %.builtin_trusted_keys keyring consists of the trustable keys built
into the kernel when a kernel is built by a developer.

The .secondary_trusted_keys keyring introduced by commit d3bfe84129f6
("certs: Add a secondary system keyring that can be added to
dynamically") consists of the trustable keys that an end-user can add
dynamically after booting the kernel. When this kernel enables the
.machine keyring and an end user chooses to trust Machine Owner Keys
(MOK) provided by shim, MOK keys will be added to the .machine
keyring and the .machine keyring is be linked to the
secondary_trusted_keys so keys contained in the .machine keyring will
automatically be searched when searching secondary_trusted_keys.

The .platform keyring introduced by commit 9dc92c45177a ("integrity:
Define a trusted platform keyring") consist of UEFI db and
MOK keys. If an end user chooses to Machine Owner Keys and the kernel
has the .machine keyring enabled, the .platform keyring only consists of
UEFI db keys since the MOK keys are added to the .machine keyring
instead.

>
>thanks,
>
>Mimi
>
>>
>> Similarly, s390 only uses platform keyring for kernel image signature
>> verification and built-in keys and secondary keyring are not used.
>>
>> This patch set allows arm64 and s390 to use more system keyrings
>> including the .secondary_trusted_keys and .platform keyring to verify
>> kexec kernel image signature as x86 does.
>>
>> The 3rd arm64 patch depends on the first two patches. The 4th s390 patch
>> can be applied independently.
>
>> v8:
>>  - drop "Cc: stable@vger.kernel.org" for the first two prerequisite
>>    patches [Baoquan]
>>
>> v7:
>>  - drop the Fixes tag for the 2nd patch and add patch prerequisites
>>    [Baoquan]
>>  - improve cover letter
>>
>> v6:
>>  - integrate the first three patches of "[PATCH 0/4] Unifrom keyring
>>    support across architectures and functions" from Michal [1]
>>  - improve commit message [Baoquan, Michal]
>>  - directly assign kexec_kernel_verify_pe_sig to
>>    kexec_file_ops->verify_sig [Michal]
>>
>> v5:
>>  - improve commit message [Baoquan]
>>
>> v4:
>>  - fix commit reference format issue and other checkpatch.pl warnings [Baoquan]
>>
>> v3:
>>  - s/arch_kexec_kernel_verify_pe_sig/kexec_kernel_verify_pe_sig [Eric]
>>  - clean up arch_kexec_kernel_verify_sig [Eric]
>>
>> v2:
>>  - only x86_64 and arm64 need to enable PE file signature check [Dave]
>>
>> [1] https://lore.kernel.org/lkml/cover.1644953683.git.msuchanek@suse.de/
>>
>> Coiby Xu (3):
>>   kexec: clean up arch_kexec_kernel_verify_sig
>>   kexec, KEYS: make the code in bzImage64_verify_sig generic
>>   arm64: kexec_file: use more system keyrings to verify kernel image
>>     signature
>>
>> Michal Suchanek (1):
>>   kexec, KEYS, s390: Make use of built-in and secondary keyring for
>>     signature verification
>>
>>  arch/arm64/kernel/kexec_image.c       | 11 +-----
>>  arch/s390/kernel/machine_kexec_file.c | 18 +++++++---
>>  arch/x86/kernel/kexec-bzimage64.c     | 20 +----------
>>  include/linux/kexec.h                 |  7 ++--
>>  kernel/kexec_file.c                   | 51 ++++++++++++++++-----------
>>  5 files changed, 50 insertions(+), 57 deletions(-)
>>
>
>
Mimi Zohar May 25, 2022, 1:30 p.m. UTC | #3
On Wed, 2022-05-25 at 17:59 +0800, Coiby Xu wrote:
> Hi Mimi,
> 
> On Fri, May 20, 2022 at 01:04:47PM -0400, Mimi Zohar wrote:
> >Hi Coiby,
> >
> >On Thu, 2022-05-12 at 15:01 +0800, Coiby Xu wrote:
> >
> >The cover letter should start out with an overall problem description
> >and then continue with the specifics.  In this case each of the arch's
> >use different keyrings to validate the kexec kernel image signature.  I
> 
> Thanks for the suggestion! I will start with an overall problem
> description in next version. For me, the bigger problem is arm kexec
> can't make use of .secondary_trusted_keys or .platform to verify kernel
> image signature. The by-product of the solution is it also helps
> address the problem of inconsistent usage of keyrings by kexec between
> different arches.
> 
> >would continue with saying the MOK keys were originally loaded onto the
> >.platform keyring with the other EFI keys, but recently with the new
> >.machine keyring that changed.
> 
> It seems I lack some background knowledge that makes me fail to
> appreciate what change the new .machine keyring brings to kexec. As far
> as I can understand, the new .machine keyring doesn't seem to change
> much about kexec kernel image signature verification. kexec should be
> able to use MOK keys to verify signature regardless of the keys being
> loaded into .platform keyring or into the new .machine keyring. Because
> the MOK keys have already be used to verify the 1st booting kernel's
> image signature. To me, the significance of the new .machine keyring is
> the end-users-enrolled keys can be also used to verify kernel modules
> (the end users can also add his key to the .secondary_trusted_keys
> keyring but the key needs to vouched by any existing key from the
> .builtin_trusted_keys or .secondary_trusted_keys which is nearly
> impossible).

"the significance of the new .machine keyring is the end-users-enrolled 
keys can be also used to verify kernel modules" correct.   So any key
stored in MOK and loaded onto the .machine keyring, could also then be
used to verify the kexec'ed kernel image signature as well.

> 
> >
> >The purpose of this patch set is a generic solution for the different
> >archs.
> >
> >
> >> Currently, a problem faced by arm64 is if a kernel image is signed by a
> >> MOK key, loading it via the kexec_file_load() system call would be
> >> rejected with the error "Lockdown: kexec: kexec of unsigned images is
> >> restricted; see man kernel_lockdown.7". This happens because arm64 uses
> >> only the primary keyring i.e. the .builtin_trusted_keys keyring that
> >> contains only kernel built-in keys to verify the kexec kernel image. MOK
> >> keys are loaded into the .platform keyring or/and .machine keyring. The
> >> .machine keyring is linked to the secondary keyring i.e.
> >> .secondary_trusted_keys keyring when the end-user chooses to trust MOK
> >> keys. The platform keyring is exclusively used for kexec kernel image
> >> verification and .secondary_trusted_keys together with
> >> .builtin_trusted_keys are the system trusted keyrings. So obviously
> >> there is no reason to not use .secondary_trusted_keys or .platform
> >> keyring for kernel image signature verification.
> >
> >Both the ".platform" and ".machine" keyring are linked to the
> >".secondary_trusted_keys" keyring.
> 
> I don't find any code that links the .platform keyring to the
> .secondary_trusted_keys keyring and one [1] of your replies to "[PATCH
> 4/4] module, KEYS: Make use of platform keyring for signature
> verification" is as follows,
>    "Permission for loading the pre-OS keys onto the 'platform' keyring and
>    using them is limited to verifying the kexec kernel image, nothing
>    else."

Right, that should have been, "Both the .builtin_trusted_keys and
.machine keyrings are linked ..."

> 
> [1] https://lore.kernel.org/linux-arm-kernel/3e39412657a4b0839bcf38544d591959e89877b8.camel@linux.ibm.com/
> 
> >The root of trust for these
> >keyrings are very different.  Instead of saying "So obviously there is
> >no reason to not use .secondary_trusted_keys" it would be more
> >beneficial to describe the root of trusts, allowing others to draw
> >their own conclusions for their usecase.

Linking the .machine keyring to the .secondary keyring impacts the
root(s) of trust.

> 
> Thanks for the suggestion! I'll add the following text in v9, do it
> looks good to you?
> 
> The root of trusts of the keys in the %.builtin_trusted_keys and
> secondary_trusted_keys keyring is a Linux distribution vendor. 

The root of trust for each keyring should be described separately.

.builtin_trusted_keys:

For example,

Keys may be built into the kernel during build or inserted into memory
reserved for keys post build.  In both of these cases, trust is based
on verification of the kernel image signature.  On a physical system in
a secure boot environment, this trust is rooted in HW.

.machine:

< explanation >

.secondary_trusted_keys:

For example,

Certificates signed by keys on the .builtin_trusted_keys, .machine, or
existing keys on the .secondary_trusted_keys keryings may be loaded
onto the .secondary_trusted_keys keyring.  This establishes a signature
chain of trust based on keys loaded on either the .builtin_trusted_keys
or .machine keyrings, if configured and enabled.

.platform

< explanation >


thanks,

Mimi


> The
> .platform keyring could have both UEFI db keys and MOK keys or only UEFI
> db keys. And the .machine keyring only have MOK keys. The root trust of
> UEFI db keys is UEFI Platform Key which is shipped by an UEFI firmware
> vendor. The root trust of MOK keys is a Linux distribution vendor (shim
> has built-in MOK key) and the end user could also be another root of
> trust if he/she enrolls his own key.
> 
> The %.builtin_trusted_keys keyring consists of the trustable keys built
> into the kernel when a kernel is built by a developer.
> 
> The .secondary_trusted_keys keyring introduced by commit d3bfe84129f6
> ("certs: Add a secondary system keyring that can be added to
> dynamically") consists of the trustable keys that an end-user can add
> dynamically after booting the kernel. When this kernel enables the
> .machine keyring and an end user chooses to trust Machine Owner Keys
> (MOK) provided by shim, MOK keys will be added to the .machine
> keyring and the .machine keyring is be linked to the
> secondary_trusted_keys so keys contained in the .machine keyring will
> automatically be searched when searching secondary_trusted_keys.
> 
> The .platform keyring introduced by commit 9dc92c45177a ("integrity:
> Define a trusted platform keyring") consist of UEFI db and
> MOK keys. If an end user chooses to Machine Owner Keys and the kernel
> has the .machine keyring enabled, the .platform keyring only consists of
> UEFI db keys since the MOK keys are added to the .machine keyring
> instead.
Coiby Xu May 27, 2022, 1:43 p.m. UTC | #4
Hi Mini,

It seems I need to only change cover letter and commit message i.e.
there is no concern about the code. So it's better to provide a
new cover letter here to collect new feedback from you thus we
can avoid unnecessary rounds of patch set.

Currently when loading a kernel image via the kexec_file_load() system
call, x86 can make use of three keyrings i.e. the .builtin_trusted_keys,
.secondary_trusted_keys and .platform keyrings to verify signature.
However, arm64 and s390 can only use the .builtin_trusted_keys and
.platform keyring respectively. For example, one resulting problem is
kexec'ing a kernel image  would be rejected with the error "Lockdown:
kexec: kexec of unsigned images is restricted; see man
kernel_lockdown.7".

This patch set enables arm64 and s390 to make use of the same keyrings
as x86 to very the signature kexec'ed kernel image.

The recently introduced .machine keyring impacts the roots of trust by
linking the .machine keyring to the .secondary keyring. The roots of
trust of different keyring are described as follows,

.builtin_trusted_keys:

Keys may be built into the kernel during build or inserted into memory
reserved for keys post build. The root of trust is the kernel build i.e.
a Linux distribution vendor. On a physical system in a secure boot
environment, this trust is rooted in hardware.

.machine:

If the end-users choose to trust the keys provided by first-stage UEFI
bootloader shim i.e. Machine Owner Keys (MOK keys), the keys will be
added to this keyring and this keyring is linked to the
.secondary_trusted_keys keyring as same as the .builtin_trusted_keys
keyring. Shim has built-in keys from a Linux distribution or the
end-users-enrolled keys. So the root of trust of this keyring is either
a Linux distribution vendor or the end-users.

.secondary_trusted_keys:

Certificates signed by keys on the .builtin_trusted_keys, .machine, or
existing keys on the .secondary_trusted_keys keryings may be loaded
onto the .secondary_trusted_keys keyring. This establishes a signature
chain of trust based on keys loaded on either the .builtin_trusted_keys
or .machine keyrings, if configured and enabled.

.platform:

The .platform keyring consist of UEFI db and MOK keys which are used by
shim to verify the first boot kernel's image signature. If end-users
choose to trust MOK keys and the kernel has the .machine keyring
enabled, the .platform keyring only consists of UEFI db keys since the
MOK keys are added to the .machine keyring instead. Because the
end-users could also enroll there own MOK keys, the root of trust could
be hardware or the end-users.


On Wed, May 25, 2022 at 09:30:40AM -0400, Mimi Zohar wrote:
>On Wed, 2022-05-25 at 17:59 +0800, Coiby Xu wrote:
>> Hi Mimi,
>>
[...]
>> It seems I lack some background knowledge that makes me fail to
>> appreciate what change the new .machine keyring brings to kexec. As far
>> as I can understand, the new .machine keyring doesn't seem to change
>> much about kexec kernel image signature verification. kexec should be
>> able to use MOK keys to verify signature regardless of the keys being
>> loaded into .platform keyring or into the new .machine keyring. Because
>> the MOK keys have already be used to verify the 1st booting kernel's
>> image signature. To me, the significance of the new .machine keyring is
>> the end-users-enrolled keys can be also used to verify kernel modules
>> (the end users can also add his key to the .secondary_trusted_keys
>> keyring but the key needs to vouched by any existing key from the
>> .builtin_trusted_keys or .secondary_trusted_keys which is nearly
>> impossible).
>
>"the significance of the new .machine keyring is the end-users-enrolled
>keys can be also used to verify kernel modules" correct.   So any key
>stored in MOK and loaded onto the .machine keyring, could also then be
>used to verify the kexec'ed kernel image signature as well.

Thanks for explanation!

>
[...]
>> >
>> >Both the ".platform" and ".machine" keyring are linked to the
>> >".secondary_trusted_keys" keyring.
>>
>> I don't find any code that links the .platform keyring to the
>> .secondary_trusted_keys keyring and one [1] of your replies to "[PATCH
>> 4/4] module, KEYS: Make use of platform keyring for signature
>> verification" is as follows,
>>    "Permission for loading the pre-OS keys onto the 'platform' keyring and
>>    using them is limited to verifying the kexec kernel image, nothing
>>    else."
>
>Right, that should have been, "Both the .builtin_trusted_keys and
>.machine keyrings are linked ..."

Thanks for the confirmation! I should have realized it's a typo.

>
>>
>> [1] https://lore.kernel.org/linux-arm-kernel/3e39412657a4b0839bcf38544d591959e89877b8.camel@linux.ibm.com/
>>
>> >The root of trust for these
>> >keyrings are very different.  Instead of saying "So obviously there is
>> >no reason to not use .secondary_trusted_keys" it would be more
>> >beneficial to describe the root of trusts, allowing others to draw
>> >their own conclusions for their usecase.
>
>Linking the .machine keyring to the .secondary keyring impacts the
>root(s) of trust.

Thanks for the clarification!

>
>>
>> Thanks for the suggestion! I'll add the following text in v9, do it
>> looks good to you?
>>
>> The root of trusts of the keys in the %.builtin_trusted_keys and
>> secondary_trusted_keys keyring is a Linux distribution vendor.
>
>The root of trust for each keyring should be described separately.
>
>.builtin_trusted_keys:
>
>For example,
>
>Keys may be built into the kernel during build or inserted into memory
>reserved for keys post build.  In both of these cases, trust is based
>on verification of the kernel image signature.  

Correct me if I'm wrong, without secure boot, there is no verification
of the kernel image signature so the root of trust should be trust on
the kernel builder.


> On a physical system in
>a secure boot environment, this trust is rooted in HW.
>
>.machine:
>
>< explanation >
>
>.secondary_trusted_keys:
>
>For example,
>
>Certificates signed by keys on the .builtin_trusted_keys, .machine, or
>existing keys on the .secondary_trusted_keys keryings may be loaded
>onto the .secondary_trusted_keys keyring.  This establishes a signature
>chain of trust based on keys loaded on either the .builtin_trusted_keys
>or .machine keyrings, if configured and enabled.
>
>.platform
>
>< explanation >
>
>
>thanks,
>
>Mimi

Thanks for providing the examples!
Mimi Zohar May 27, 2022, 4:45 p.m. UTC | #5
On Fri, 2022-05-27 at 21:43 +0800, Coiby Xu wrote:
> Hi Mini,

Hi Coiby,

> new cover letter here to collect new feedback from you thus we
> can avoid unnecessary rounds of patch set.

Agreed.   Much better.  Just a couple of nits.

> Currently when loading a kernel image via the kexec_file_load() system
> call, x86 can make use of three keyrings i.e. the .builtin_trusted_keys,
> .secondary_trusted_keys and .platform keyrings to verify signature.

Either "a signature" or "signatures".

> However, arm64 and s390 can only use the .builtin_trusted_keys and
> .platform keyring respectively. For example, one resulting problem is
> kexec'ing a kernel image  would be rejected with the error "Lockdown:
> kexec: kexec of unsigned images is restricted; see man
> kernel_lockdown.7".
> 
> This patch set enables arm64 and s390 to make use of the same keyrings
> as x86 to very the signature kexec'ed kernel image.

  Fix "very".  Perhaps "verify the kexec'ed kernel image signature".
> 
> The recently introduced .machine keyring impacts the roots of trust by
> linking the .machine keyring to the .secondary keyring. The roots of
> trust of different keyring are described as follows,
> 
"of ... keyring" -> "for the ... keyrings"

> .builtin_trusted_keys:
> 
> Keys may be built into the kernel during build or inserted into memory
> reserved for keys post build. The root of trust is the kernel build i.e.
> a Linux distribution vendor. On a physical system in a secure boot
> environment, this trust is rooted in hardware.

Please look at my response to your question below.

> 
> .machine:
> 
> If the end-users choose to trust the keys provided by first-stage UEFI
> bootloader shim i.e. Machine Owner Keys (MOK keys), the keys will be
> added to this keyring and this keyring is linked to the

 Grammatically "and this"  needs to be fixed.

> .secondary_trusted_keys keyring as same as the .builtin_trusted_keys
> keyring. Shim has built-in keys from a Linux distribution or the
> end-users-enrolled keys. So the root of trust of this keyring is either
> a Linux distribution vendor or the end-users.
> 
> .secondary_trusted_keys:
> 
> Certificates signed by keys on the .builtin_trusted_keys, .machine, or
> existing keys on the .secondary_trusted_keys keryings may be loaded
> onto the .secondary_trusted_keys keyring. This establishes a signature
> chain of trust based on keys loaded on either the .builtin_trusted_keys
> or .machine keyrings, if configured and enabled.
> 
> .platform:
> 
> The .platform keyring consist of UEFI db and MOK keys which are used by
> shim to verify the first boot kernel's image signature. If end-users
> choose to trust MOK keys and the kernel has the .machine keyring
> enabled, the .platform keyring only consists of UEFI db keys since the
> MOK keys are added to the .machine keyring instead. Because the
> end-users could also enroll there own MOK keys, the root of trust could

"there" -> "their"

> be hardware or the end-users.

It's always "hardware".  "or" -> "and"?

<snip>

> >>
> >> The root of trusts of the keys in the %.builtin_trusted_keys and
> >> secondary_trusted_keys keyring is a Linux distribution vendor.
> >
> >The root of trust for each keyring should be described separately.
> >
> >.builtin_trusted_keys:
> >
> >For example,
> >
> >Keys may be built into the kernel during build or inserted into memory
> >reserved for keys post build.  In both of these cases, trust is based
> >on verification of the kernel image signature.  
> 
> Correct me if I'm wrong, without secure boot, there is no verification
> of the kernel image signature so the root of trust should be trust on
> the kernel builder.

No, basing the signature verification on secure boot could not have
been upstreamed.  IMA is based on policy, regardeless of the secure
boot mode.  A builtin policy may be specified on the boot command line,
but should be replaced with a more constrained custom policy [1]. 
Unlike the builtin policy rules, the architecture specific rules are
persistent[2].   The architecture specific rules are normally tied to
the secure boot modes.  On OpenPOWER, the architecture specific
"measure" rules are dependent on the trusted boot mode.

The current IMA policy rules can be viewed by cat'ing
<securityfs>/ima/policy.

[1] The builtin policies are not LSM aware.  The policy rules need to
be constrained to avoid integrity violations.

[2] arch specific policy rules:
security/integrity/ima/ima_efi.c, arch/powerpc/kernel/ima_arch.c

thanks,

Mimi
Mimi Zohar June 9, 2022, 3:35 p.m. UTC | #6
Hi Coiby,

On Fri, 2022-05-27 at 21:43 +0800, Coiby Xu wrote:
> It seems I need to only change cover letter and commit message i.e.
> there is no concern about the code. So it's better to provide a
> new cover letter here to collect new feedback from you thus we
> can avoid unnecessary rounds of patch set.

One other thing before re-posting, the existing Subject line is a bit
snarky.  Perhaps you could come with a more appropriate title?

thanks,

Mimi
Coiby Xu June 16, 2022, 1:15 a.m. UTC | #7
Hi Mimi,

Thanks for carefully reviewing the covert letter and patches and
suggesting various improvements! And sorry for the late reply as I need
some time to learn more about secure boot, lockdown and IMA to better
make sense of what you mean. 

On Fri, May 27, 2022 at 12:45:54PM -0400, Mimi Zohar wrote:
>
>> new cover letter here to collect new feedback from you thus we
>> can avoid unnecessary rounds of patch set.
>
>Agreed.   Much better.  Just a couple of nits.

>
>> Currently when loading a kernel image via the kexec_file_load() system
>> call, x86 can make use of three keyrings i.e. the .builtin_trusted_keys,
>> .secondary_trusted_keys and .platform keyrings to verify signature.
>
>Either "a signature" or "signatures".
>
>> However, arm64 and s390 can only use the .builtin_trusted_keys and
>> .platform keyring respectively. For example, one resulting problem is
>> kexec'ing a kernel image  would be rejected with the error "Lockdown:
>> kexec: kexec of unsigned images is restricted; see man
>> kernel_lockdown.7".
>>
>> This patch set enables arm64 and s390 to make use of the same keyrings
>> as x86 to very the signature kexec'ed kernel image.
>
>  Fix "very".  Perhaps "verify the kexec'ed kernel image signature".
>>
>> The recently introduced .machine keyring impacts the roots of trust by
>> linking the .machine keyring to the .secondary keyring. The roots of
>> trust of different keyring are described as follows,
>>
>"of ... keyring" -> "for the ... keyrings"

Thanks for catching those typos and improving the wording!

>
>> .builtin_trusted_keys:
>>
>> Keys may be built into the kernel during build or inserted into memory
>> reserved for keys post build. The root of trust is the kernel build i.e.
>> a Linux distribution vendor. On a physical system in a secure boot
>> environment, this trust is rooted in hardware.
>
>Please look at my response to your question below.
>
>>
>> .machine:
>>
>> If the end-users choose to trust the keys provided by first-stage UEFI
>> bootloader shim i.e. Machine Owner Keys (MOK keys), the keys will be
>> added to this keyring and this keyring is linked to the
>
> Grammatically "and this"  needs to be fixed.

How about 
"the keys will be added to this keyring which  is linked to the..."?

>
>> .secondary_trusted_keys keyring as same as the .builtin_trusted_keys
>> keyring. Shim has built-in keys from a Linux distribution or the
>> end-users-enrolled keys. So the root of trust of this keyring is either
>> a Linux distribution vendor or the end-users.
>>
>> .secondary_trusted_keys:
>>
>> Certificates signed by keys on the .builtin_trusted_keys, .machine, or
>> existing keys on the .secondary_trusted_keys keryings may be loaded
>> onto the .secondary_trusted_keys keyring. This establishes a signature
>> chain of trust based on keys loaded on either the .builtin_trusted_keys
>> or .machine keyrings, if configured and enabled.
>>
>> .platform:
>>
>> The .platform keyring consist of UEFI db and MOK keys which are used by
>> shim to verify the first boot kernel's image signature. If end-users
>> choose to trust MOK keys and the kernel has the .machine keyring
>> enabled, the .platform keyring only consists of UEFI db keys since the
>> MOK keys are added to the .machine keyring instead. Because the
>> end-users could also enroll there own MOK keys, the root of trust could
>
>"there" -> "their"
>
>> be hardware or the end-users.
>
>It's always "hardware".  "or" -> "and"?

Thanks for catching these issues as well!

>
><snip>
>
>> >>
>> >> The root of trusts of the keys in the %.builtin_trusted_keys and
>> >> secondary_trusted_keys keyring is a Linux distribution vendor.
>> >
>> >The root of trust for each keyring should be described separately.
>> >
>> >.builtin_trusted_keys:
>> >
>> >For example,
>> >
>> >Keys may be built into the kernel during build or inserted into memory
>> >reserved for keys post build.  In both of these cases, trust is based
>> >on verification of the kernel image signature.
>>
>> Correct me if I'm wrong, without secure boot, there is no verification
>> of the kernel image signature so the root of trust should be trust on
>> the kernel builder.
>
>No, basing the signature verification on secure boot could not have
>been upstreamed.  

Thanks for correcting me! I was a bit confused by secure boot and
lockdown and also forgot enabling lockdown automatically when secure
boot is enabled is a downstream feature. Btw, when testing the 4th s390
patch, I found s390 skip signature validation when secure boot is not
enabled, is this a mistake?

// arch/s390/kernel/machine_kexec_file.c
#ifdef CONFIG_KEXEC_SIG
int s390_verify_sig(const char *kernel, unsigned long kernel_len)
{
	/* Skip signature verification when not secure IPLed. */
	if (!ipl_secure_flag)
		return 0;

> IMA is based on policy, regardeless of the secure
>boot mode.  A builtin policy may be specified on the boot command line,
>but should be replaced with a more constrained custom policy [1].
>Unlike the builtin policy rules, the architecture specific rules are
>persistent[2].   The architecture specific rules are normally tied to
>the secure boot modes.  On OpenPOWER, the architecture specific
>"measure" rules are dependent on the trusted boot mode.
>
>The current IMA policy rules can be viewed by cat'ing
><securityfs>/ima/policy.

Thanks for explaining IMA to me! There is still the question of what's
the root of trust for .builtin_trusted_keys when there is no real
signature verification. For example, when CONFIG_KEXEC_SIG is enabled,
the default IMA policy is to not appraise kexec image. Since lockdown is
not enabled by default, there is no real verification as
kimage_validate_signature succeeds even when kexec_image_verify_sig
fails. 

>
>[1] The builtin policies are not LSM aware.  The policy rules need to
>be constrained to avoid integrity violations.
>
>[2] arch specific policy rules:
>security/integrity/ima/ima_efi.c, arch/powerpc/kernel/ima_arch.c
>
>thanks,
>
>Mimi
>
Coiby Xu June 16, 2022, 1:21 a.m. UTC | #8
Hi Mimi,

On Thu, Jun 09, 2022 at 11:35:13AM -0400, Mimi Zohar wrote:
>Hi Coiby,
>
>On Fri, 2022-05-27 at 21:43 +0800, Coiby Xu wrote:
>> It seems I need to only change cover letter and commit message i.e.
>> there is no concern about the code. So it's better to provide a
>> new cover letter here to collect new feedback from you thus we
>> can avoid unnecessary rounds of patch set.
>
>One other thing before re-posting, the existing Subject line is a bit
>snarky.  Perhaps you could come with a more appropriate title?

How about "Using the same keyrings as x86 to verify kexec'ed kernel image
signature for arm64 and s390" or "Uniform keyrings to verify kexec'ed
kernel image signature across x86, arm64 and s390"?

>
>thanks,
>
>Mimi
>
Coiby Xu June 17, 2022, 3:57 a.m. UTC | #9
On Thu, Jun 16, 2022 at 09:15:06AM +0800, Coiby Xu wrote:
>Hi Mimi,
>
>Thanks for carefully reviewing the covert letter and patches and
>suggesting various improvements! And sorry for the late reply as I need
>some time to learn more about secure boot, lockdown and IMA to better
>make sense of what you mean.
>
>On Fri, May 27, 2022 at 12:45:54PM -0400, Mimi Zohar wrote:
>>
>>>new cover letter here to collect new feedback from you thus we
>>>can avoid unnecessary rounds of patch set.
>>
>>Agreed.   Much better.  Just a couple of nits.
>
>>
>>>Currently when loading a kernel image via the kexec_file_load() system
>>>call, x86 can make use of three keyrings i.e. the .builtin_trusted_keys,
>>>.secondary_trusted_keys and .platform keyrings to verify signature.
>>
>>Either "a signature" or "signatures".
>>
>>>However, arm64 and s390 can only use the .builtin_trusted_keys and
>>>.platform keyring respectively. For example, one resulting problem is
>>>kexec'ing a kernel image  would be rejected with the error "Lockdown:
>>>kexec: kexec of unsigned images is restricted; see man
>>>kernel_lockdown.7".
>>>
>>>This patch set enables arm64 and s390 to make use of the same keyrings
>>>as x86 to very the signature kexec'ed kernel image.
>>
>> Fix "very".  Perhaps "verify the kexec'ed kernel image signature".
>>>
>>>The recently introduced .machine keyring impacts the roots of trust by
>>>linking the .machine keyring to the .secondary keyring. The roots of
>>>trust of different keyring are described as follows,
>>>
>>"of ... keyring" -> "for the ... keyrings"
>
>Thanks for catching those typos and improving the wording!
>
>>
>>>.builtin_trusted_keys:
>>>
>>>Keys may be built into the kernel during build or inserted into memory
>>>reserved for keys post build. The root of trust is the kernel build i.e.
>>>a Linux distribution vendor. On a physical system in a secure boot
>>>environment, this trust is rooted in hardware.
>>
>>Please look at my response to your question below.
>>
>>>
>>>.machine:
>>>
>>>If the end-users choose to trust the keys provided by first-stage UEFI
>>>bootloader shim i.e. Machine Owner Keys (MOK keys), the keys will be
>>>added to this keyring and this keyring is linked to the
>>
>>Grammatically "and this"  needs to be fixed.
>
>How about "the keys will be added to this keyring which  is linked to 
>the..."?
>
>>
>>>.secondary_trusted_keys keyring as same as the .builtin_trusted_keys
>>>keyring. Shim has built-in keys from a Linux distribution or the
>>>end-users-enrolled keys. So the root of trust of this keyring is either
>>>a Linux distribution vendor or the end-users.
>>>
>>>.secondary_trusted_keys:
>>>
>>>Certificates signed by keys on the .builtin_trusted_keys, .machine, or
>>>existing keys on the .secondary_trusted_keys keryings may be loaded
>>>onto the .secondary_trusted_keys keyring. This establishes a signature
>>>chain of trust based on keys loaded on either the .builtin_trusted_keys
>>>or .machine keyrings, if configured and enabled.
>>>
>>>.platform:
>>>
>>>The .platform keyring consist of UEFI db and MOK keys which are used by
>>>shim to verify the first boot kernel's image signature. If end-users
>>>choose to trust MOK keys and the kernel has the .machine keyring
>>>enabled, the .platform keyring only consists of UEFI db keys since the
>>>MOK keys are added to the .machine keyring instead. Because the
>>>end-users could also enroll there own MOK keys, the root of trust could
>>
>>"there" -> "their"
>>
>>>be hardware or the end-users.
>>
>>It's always "hardware".  "or" -> "and"?
>
>Thanks for catching these issues as well!
>
>>
>><snip>
>>
>>>>>
>>>>> The root of trusts of the keys in the %.builtin_trusted_keys and
>>>>> secondary_trusted_keys keyring is a Linux distribution vendor.
>>>>
>>>>The root of trust for each keyring should be described separately.
>>>>
>>>>.builtin_trusted_keys:
>>>>
>>>>For example,
>>>>
>>>>Keys may be built into the kernel during build or inserted into memory
>>>>reserved for keys post build.  In both of these cases, trust is based
>>>>on verification of the kernel image signature.
>>>
>>>Correct me if I'm wrong, without secure boot, there is no verification
>>>of the kernel image signature so the root of trust should be trust on
>>>the kernel builder.
>>
>>No, basing the signature verification on secure boot could not have
>>been upstreamed.
>
>Thanks for correcting me! I was a bit confused by secure boot and
>lockdown and also forgot enabling lockdown automatically when secure
>boot is enabled is a downstream feature. Btw, when testing the 4th s390
>patch, I found s390 skip signature validation when secure boot is not
>enabled, is this a mistake?
>
>// arch/s390/kernel/machine_kexec_file.c
>#ifdef CONFIG_KEXEC_SIG
>int s390_verify_sig(const char *kernel, unsigned long kernel_len)
>{
>	/* Skip signature verification when not secure IPLed. */
>	if (!ipl_secure_flag)
>		return 0;
>
>>IMA is based on policy, regardeless of the secure
>>boot mode.  A builtin policy may be specified on the boot command line,
>>but should be replaced with a more constrained custom policy [1].
>>Unlike the builtin policy rules, the architecture specific rules are
>>persistent[2].   The architecture specific rules are normally tied to
>>the secure boot modes.  On OpenPOWER, the architecture specific
>>"measure" rules are dependent on the trusted boot mode.
>>
>>The current IMA policy rules can be viewed by cat'ing
>><securityfs>/ima/policy.
>
>Thanks for explaining IMA to me! There is still the question of what's
>the root of trust for .builtin_trusted_keys when there is no real
>signature verification. For example, when CONFIG_KEXEC_SIG is enabled,
>the default IMA policy is to not appraise kexec image. Since lockdown is
>not enabled by default, there is no real verification as
>kimage_validate_signature succeeds even when kexec_image_verify_sig
>fails.

I realize my reasoning is incorrect. Actually the signature
verification which establishes the trust on the keys happens in the
bootloader. So IMA appraisal or kimage_validate_signature is irrelevant
to the question of the root of trust of .builtin_trusted_key. For GRUB,
it won't verify the signature by default when secure boot is not enabled.
Thus the question of what's root of trust when there is no signature
verification is still valid.

>
>>
>>[1] The builtin policies are not LSM aware.  The policy rules need to
>>be constrained to avoid integrity violations.
>>
>>[2] arch specific policy rules:
>>security/integrity/ima/ima_efi.c, arch/powerpc/kernel/ima_arch.c
>>
>>thanks,
>>
>>Mimi
>>
>
>-- 
>Best regards,
>Coiby
Mimi Zohar June 17, 2022, 11:58 a.m. UTC | #10
On Fri, 2022-06-17 at 11:57 +0800, Coiby Xu wrote:
> >Thanks for explaining IMA to me! There is still the question of what's
> >the root of trust for .builtin_trusted_keys when there is no real
> >signature verification. For example, when CONFIG_KEXEC_SIG is enabled,
> >the default IMA policy is to not appraise kexec image. Since lockdown is
> >not enabled by default, there is no real verification as
> >kimage_validate_signature succeeds even when kexec_image_verify_sig
> >fails.
> 
> I realize my reasoning is incorrect. Actually the signature
> verification which establishes the trust on the keys happens in the
> bootloader. So IMA appraisal or kimage_validate_signature is irrelevant
> to the question of the root of trust of .builtin_trusted_key. For GRUB,
> it won't verify the signature by default when secure boot is not enabled.
> Thus the question of what's root of trust when there is no signature
> verification is still valid.

We're saying the same thing, just differently.  Your wording describes
secure boot, how it is established, and who/what is responsible for it.
I don't think those details are needed.  I originally said,

.builtin_trusted_keys:

For example,

Keys may be built into the kernel during build or inserted into memory
reserved for keys post build.  In both of these cases, trust is based
on verification of the kernel image signature.  On a physical system in
a secure boot environment, this trust is rooted in HW.

The last line should have said, "For example, on a physical system in a
...".

thanks,

Mimi
Mimi Zohar June 17, 2022, 12:06 p.m. UTC | #11
On Thu, 2022-06-16 at 09:21 +0800, Coiby Xu wrote:
> Hi Mimi,
> 
> On Thu, Jun 09, 2022 at 11:35:13AM -0400, Mimi Zohar wrote:
> >Hi Coiby,
> >
> >On Fri, 2022-05-27 at 21:43 +0800, Coiby Xu wrote:
> >> It seems I need to only change cover letter and commit message i.e.
> >> there is no concern about the code. So it's better to provide a
> >> new cover letter here to collect new feedback from you thus we
> >> can avoid unnecessary rounds of patch set.
> >
> >One other thing before re-posting, the existing Subject line is a bit
> >snarky.  Perhaps you could come with a more appropriate title?
> 
> How about "Using the same keyrings as x86 to verify kexec'ed kernel image
> signature for arm64 and s390" or "Uniform keyrings to verify kexec'ed
> kernel image signature across x86, arm64 and s390"?

Instead of using "Uniform", I would use the verb form "Unify".

Mimi
Coiby Xu June 20, 2022, 1:14 p.m. UTC | #12
On Fri, Jun 17, 2022 at 07:58:37AM -0400, Mimi Zohar wrote:
>On Fri, 2022-06-17 at 11:57 +0800, Coiby Xu wrote:
>> >Thanks for explaining IMA to me! There is still the question of what's
>> >the root of trust for .builtin_trusted_keys when there is no real
>> >signature verification. For example, when CONFIG_KEXEC_SIG is enabled,
>> >the default IMA policy is to not appraise kexec image. Since lockdown is
>> >not enabled by default, there is no real verification as
>> >kimage_validate_signature succeeds even when kexec_image_verify_sig
>> >fails.
>>
>> I realize my reasoning is incorrect. Actually the signature
>> verification which establishes the trust on the keys happens in the
>> bootloader. So IMA appraisal or kimage_validate_signature is irrelevant
>> to the question of the root of trust of .builtin_trusted_key. For GRUB,
>> it won't verify the signature by default when secure boot is not enabled.
>> Thus the question of what's root of trust when there is no signature
>> verification is still valid.
>
>We're saying the same thing, just differently.  Your wording describes
>secure boot, how it is established, and who/what is responsible for it.
>I don't think those details are needed.  I originally said,

I think I'm addressing a different concern or case. If kexec_file_load is going
to verify a kernel image signature, what keys is it going to trust and why? I
believe explaining the root trust for different keyrings is to answer this
question. When a bootloader verifies a kernel image signature, the trust is
based on verification of the kernel image signature which we both agree. But
what if a bootloader doesn't do the verification? 

>
>.builtin_trusted_keys:
>
>For example,
>
>Keys may be built into the kernel during build or inserted into memory
>reserved for keys post build.  In both of these cases, trust is based
>on verification of the kernel image signature.  On a physical system in
>a secure boot environment, this trust is rooted in HW.
>
>The last line should have said, "For example, on a physical system in a
>...".
>
>thanks,
>
>Mimi
>