[PATCH 0/4] integrity - Kernel

This is a discussion on [PATCH 0/4] integrity - Kernel ; This patchset addresses a couple of concerns raised on the mailing list: - Christoph Hellwig's questioned what is protecting the TPM internal kernel interface from the driver being removed, when it is not builtin. The TPM device should be builtin ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: [PATCH 0/4] integrity

  1. [PATCH 0/4] integrity

    This patchset addresses a couple of concerns raised on the
    mailing list:

    - Christoph Hellwig's questioned what is protecting the TPM
    internal kernel interface from the driver being removed,
    when it is not builtin. The TPM device should be builtin
    in order to start collecting measurements at the earliest
    possible time. When the TPM is not builtin, the internal
    TPM kernel interface now protects itself from the driver
    being removed by incrementing the module reference count.

    The integrity-TPM-internal-kernel-interface.patch prereqs:
    TPM-update-char-dev-BKL-pushdown.patch
    TPM-num_opens-to-is_open-variable-change.patch
    TPM-rcu-locking.patch
    TPM-addition-of-pnp-remove.patch
    TPM-Fixed-tpm_release-timing.patch

    - Discussion on the mailing list questioned the use of special
    magic values in userspace, concluding these values are already
    exported to userspace via statfs and their correct/incorrect
    usage is left up to the userspace application.

    - Concern was raised on the lkml mailing list, about adding i_integrity
    to the inode structure. This patch adds a comment clarifying that
    i_integrity is only included in the inode if INTEGRITY is configured.

    Mimi Zohar (4):
    integrity: TPM internel kernel interface
    integrity: special fs magic
    integrity: Linux Integrity Module(LIM)
    integrity: IMA as an integrity service provider
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. [PATCH 2/4] integrity: special fs magic

    Discussion on the mailing list questioned the use of these
    magic values in userspace, concluding these values are already
    exported to userspace via statfs and their correct/incorrect
    usage is left up to the userspace application.

    - Move special fs magic number definitions to magic.h
    - Add magic.h include

    Signed-off-by: Mimi Zohar
    Reviewed-by: James Morris
    ---
    diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
    index 08e28c9..3dbe216 100644
    --- a/fs/debugfs/inode.c
    +++ b/fs/debugfs/inode.c
    @@ -26,8 +26,7 @@
    #include
    #include
    #include
    -
    -#define DEBUGFS_MAGIC 0x64626720
    +#include

    static struct vfsmount *debugfs_mount;
    static int debugfs_mount_count;
    diff --git a/include/linux/magic.h b/include/linux/magic.h
    index 1fa0c2c..f7f3fdd 100644
    --- a/include/linux/magic.h
    +++ b/include/linux/magic.h
    @@ -6,6 +6,10 @@
    #define AFS_SUPER_MAGIC 0x5346414F
    #define AUTOFS_SUPER_MAGIC 0x0187
    #define CODA_SUPER_MAGIC 0x73757245
    +#define DEBUGFS_MAGIC 0x64626720
    +#define SYSFS_MAGIC 0x62656572
    +#define SECURITYFS_MAGIC 0x73636673
    +#define TMPFS_MAGIC 0x01021994
    #define EFS_SUPER_MAGIC 0x414A53
    #define EXT2_SUPER_MAGIC 0xEF53
    #define EXT3_SUPER_MAGIC 0xEF53
    diff --git a/mm/shmem.c b/mm/shmem.c
    index c1e5a3b..c4e63c4 100644
    --- a/mm/shmem.c
    +++ b/mm/shmem.c
    @@ -50,14 +50,12 @@
    #include
    #include
    #include
    +#include

    #include
    #include
    #include

    -/* This magic number is used in glibc for posix shared memory */
    -#define TMPFS_MAGIC 0x01021994
    -
    #define ENTRIES_PER_PAGE (PAGE_CACHE_SIZE/sizeof(unsigned long))
    #define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE)
    #define BLOCKS_PER_PAGE (PAGE_CACHE_SIZE/512)
    diff --git a/security/inode.c b/security/inode.c
    index acc6cf0..b66df8e 100644
    --- a/security/inode.c
    +++ b/security/inode.c
    @@ -20,8 +20,7 @@
    #include
    #include
    #include
    -
    -#define SECURITYFS_MAGIC 0x73636673
    +#include

    static struct vfsmount *mount;
    static int mount_count;
    --
    1.5.5.1

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  3. Re: [PATCH 1/4] integrity: TPM internel kernel interface

    On Tue, 7 Oct 2008, Mimi Zohar wrote:

    > Based on discussions on the lkml mailing list, the TPM should be
    > built in, but when it is not builtin, the internal TPM kernel
    > interface did not protect itself from the removal of the TPM
    > driver, while being used.


    If the TPM driver should be built in, why is there an option to make it
    modular?

    - James
    --
    James Morris

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: [PATCH 0/4] integrity

    On Tue, 7 Oct 2008, Mimi Zohar wrote:

    > The integrity-TPM-internal-kernel-interface.patch prereqs:
    > TPM-update-char-dev-BKL-pushdown.patch
    > TPM-num_opens-to-is_open-variable-change.patch
    > TPM-rcu-locking.patch
    > TPM-addition-of-pnp-remove.patch
    > TPM-Fixed-tpm_release-timing.patch


    Where are these patches?

    i.e. are they in a tree? If so, which one? If not, they need to be
    posted in this series.



    - James
    --
    James Morris

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. Re: [PATCH 2/4] integrity: special fs magic

    On Tue, Oct 07, 2008 at 02:00:12PM -0400, Mimi Zohar wrote:
    > Discussion on the mailing list questioned the use of these
    > magic values in userspace, concluding these values are already
    > exported to userspace via statfs and their correct/incorrect
    > usage is left up to the userspace application.
    >
    > - Move special fs magic number definitions to magic.h
    > - Add magic.h include


    This should be patch 1, and we can put in in ASAP even if the rest needs
    some more work.

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. Re: [PATCH 1/4] integrity: TPM internel kernel interface

    On Wed, 2008-10-08 at 16:00 +1100, James Morris wrote:
    > On Tue, 7 Oct 2008, Mimi Zohar wrote:
    >
    > > Based on discussions on the lkml mailing list, the TPM should be
    > > built in, but when it is not builtin, the internal TPM kernel
    > > interface did not protect itself from the removal of the TPM
    > > driver, while being used.

    >
    > If the TPM driver should be built in, why is there an option to make it
    > modular?
    >
    > - James


    Hi James,

    It's recommended that the TPM driver should be built-in when using IMA to make sure
    it's measuring the system as closely as possible to the start of the boot process,
    but it's not necessarily true when using it to store keys, for example.

    Rajiv


    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: [PATCH 0/4] integrity

    On Wed, 2008-10-08 at 15:56 +1100, James Morris wrote:
    > On Tue, 7 Oct 2008, Mimi Zohar wrote:
    >
    > > The integrity-TPM-internal-kernel-interface.patch prereqs:
    > > TPM-update-char-dev-BKL-pushdown.patch
    > > TPM-num_opens-to-is_open-variable-change.patch
    > > TPM-rcu-locking.patch
    > > TPM-addition-of-pnp-remove.patch
    > > TPM-Fixed-tpm_release-timing.patch

    >
    > Where are these patches?
    >
    > i.e. are they in a tree? If so, which one? If not, they need to be
    > posted in this series.
    >
    >
    >
    > - James


    The TPM patches have not, as yet, been picked up.

    These TPM patches are base TPM changes, not really related to the
    integrity patches and certainly not dependent them. However the reverse
    is not true. The integrity-tpm-internal-kernel-interface patch is
    dependent on, at least, the TPM-rcu-locking patch.

    Mimi

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. Re: [PATCH 2/4] integrity: special fs magic

    On Wed, 2008-10-08 at 09:00 -0400, Christoph Hellwig wrote:
    > On Tue, Oct 07, 2008 at 02:00:12PM -0400, Mimi Zohar wrote:
    > > Discussion on the mailing list questioned the use of these
    > > magic values in userspace, concluding these values are already
    > > exported to userspace via statfs and their correct/incorrect
    > > usage is left up to the userspace application.
    > >
    > > - Move special fs magic number definitions to magic.h
    > > - Add magic.h include

    >
    > This should be patch 1, and we can put in in ASAP even if the rest needs
    > some more work.
    >


    The ordering of the first and second patches is interchangeable without
    requiring any patch changes.

    Mimi

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. Re: [PATCH 0/4] integrity

    On Wed, 8 Oct 2008, Mimi Zohar wrote:

    > On Wed, 2008-10-08 at 15:56 +1100, James Morris wrote:
    > > On Tue, 7 Oct 2008, Mimi Zohar wrote:
    > >
    > > > The integrity-TPM-internal-kernel-interface.patch prereqs:
    > > > TPM-update-char-dev-BKL-pushdown.patch
    > > > TPM-num_opens-to-is_open-variable-change.patch
    > > > TPM-rcu-locking.patch
    > > > TPM-addition-of-pnp-remove.patch
    > > > TPM-Fixed-tpm_release-timing.patch

    > >
    > > Where are these patches?
    > >
    > > i.e. are they in a tree? If so, which one? If not, they need to be
    > > posted in this series.
    > >
    > >
    > >
    > > - James

    >
    > The TPM patches have not, as yet, been picked up.
    >
    > These TPM patches are base TPM changes, not really related to the
    > integrity patches and certainly not dependent them. However the reverse
    > is not true. The integrity-tpm-internal-kernel-interface patch is
    > dependent on, at least, the TPM-rcu-locking patch.


    Please repost the TPM patches, then.

    --
    James Morris

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: [PATCH 0/4] integrity

    On Thu, 2008-10-09 at 09:06 +1100, James Morris wrote:
    > On Wed, 8 Oct 2008, Mimi Zohar wrote:
    >
    > > On Wed, 2008-10-08 at 15:56 +1100, James Morris wrote:
    > > > On Tue, 7 Oct 2008, Mimi Zohar wrote:
    > > >
    > > > > The integrity-TPM-internal-kernel-interface.patch prereqs:
    > > > > TPM-update-char-dev-BKL-pushdown.patch
    > > > > TPM-num_opens-to-is_open-variable-change.patch
    > > > > TPM-rcu-locking.patch
    > > > > TPM-addition-of-pnp-remove.patch
    > > > > TPM-Fixed-tpm_release-timing.patch
    > > >
    > > > Where are these patches?
    > > >
    > > > i.e. are they in a tree? If so, which one? If not, they need to be
    > > > posted in this series.
    > > >
    > > >
    > > >
    > > > - James

    > >
    > > The TPM patches have not, as yet, been picked up.
    > >
    > > These TPM patches are base TPM changes, not really related to the
    > > integrity patches and certainly not dependent them. However the reverse
    > > is not true. The integrity-tpm-internal-kernel-interface patch is
    > > dependent on, at least, the TPM-rcu-locking patch.

    >
    > Please repost the TPM patches, then.


    The TPM patches were just added to the -mm tree (10/8 18:45 EDT),
    available from http://userweb.kernel.org/~akpm/mmotm/.

    Mimi

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  11. Re: [PATCH 0/4] integrity

    On Fri, 10 Oct 2008, Mimi Zohar wrote:

    > > > These TPM patches are base TPM changes, not really related to the
    > > > integrity patches and certainly not dependent them. However the reverse
    > > > is not true. The integrity-tpm-internal-kernel-interface patch is
    > > > dependent on, at least, the TPM-rcu-locking patch.

    > >
    > > Please repost the TPM patches, then.

    >
    > The TPM patches were just added to the -mm tree (10/8 18:45 EDT),
    > available from http://userweb.kernel.org/~akpm/mmotm/.


    I've added the prereq patches to
    git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

    Please test it, and base your next version of the integrity patches on
    that branch. Generally, if your patches depend on some other patches, you
    need to coordinate to ensure the prerequisite patches are either in the
    tree you're aiming for, or post them as part of the patchset.

    Note that there are some interesting sparse warnings for the TPM code
    (not arising from the above):

    drivers/char/tpm/tpm.c:493:10: error: bad constant expression
    drivers/char/tpm/tpm.c:500:32: error: cannot size expression
    drivers/char/tpm/tpm.c:507:10: error: bad constant expression
    drivers/char/tpm/tpm.c:515:32: error: cannot size expression
    drivers/char/tpm/tpm.c:547:32: error: cannot size expression
    CHECK drivers/char/tpm/tpm_atmel.c
    CHECK drivers/char/tpm/tpm_infineon.c
    drivers/char/tpm/tpm_bios.c:412:7: warning: incorrect type in assignment (different address spaces)
    drivers/char/tpm/tpm_bios.c:412:7: expected struct acpi_table_header *virt
    drivers/char/tpm/tpm_bios.c:412:7: got void [noderef] *
    drivers/char/tpm/tpm_bios.c:416:23: warning: incorrect type in argument 1 (different address spaces)
    drivers/char/tpm/tpm_bios.c:416:23: expected void [noderef] *logical_address
    drivers/char/tpm/tpm_bios.c:416:23: got struct acpi_table_header *virt


    --
    James Morris

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread