diff for duplicates of <1520107919.3105.9.camel@HansenPartnership.com> diff --git a/a/1.txt b/N1/1.txt index d23e52d..84a2d33 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -6,20 +6,20 @@ On Wed, 2018-02-28 at 21:58 +0200, Jarkko Sakkinen wrote: > gets into a state where the partial self-test doesn't return > TPM_RC_SUCCESS (meaning all tests have run to completion), but > instead returns TPM_RC_TESTING (meaning some tests are still running -> in the background). There are various theories that resending the +> in the background). There are various theories that resending the > self-test command actually causes the tests to restart and thus > triggers more TPM_RC_TESTING returns until the timeout is exceeded. > > There are several issues here: firstly being we shouldn't slow down > the boot sequence waiting for the self test to complete once the TPM -> backgrounds them. It will actually make available all functions that +> backgrounds them. It will actually make available all functions that > have passed and if it gets a failure return TPM_RC_FAILURE to every -> subsequent command. So the fix is to kick off self tests once and if +> subsequent command. So the fix is to kick off self tests once and if > they return TPM_RC_TESTING log that as a backgrounded self test I still think removing all logging traces is a mistake for something that can consume a significant amount of time in the boot sequence. - It's going to cause lost of people doing boot timings to waste lots of + It's going to cause lost of people doing boot timings to waste lots of effort. However, removing the log messages makes the above statement a lie, so @@ -28,16 +28,16 @@ one of the two needs fixing. [...] > @@ -852,27 +837,24 @@ static const struct tpm_input_header > tpm2_selftest_header = { -> */ -> static int tpm2_do_selftest(struct tpm_chip *chip) -> { +> */ +> static int tpm2_do_selftest(struct tpm_chip *chip) +> { > + struct tpm_buf buf; > + int full; -> int rc; +> int rc; > - unsigned int delay_msec = 10; > - long duration; > - struct tpm2_cmd cmd; -> +> > - duration = jiffies_to_msecs( > - tpm2_calc_ordinal_duration(chip, > TPM2_CC_SELF_TEST)); @@ -48,19 +48,19 @@ one of the two needs fixing. > - > - rc = tpm_transmit_cmd(chip, NULL, &cmd, > TPM2_SELF_TEST_IN_SIZE, -> - 0, 0, "continue selftest"); +> - 0, 0, "continue selftest"); > + for (full = 0; full < 2; full++) { > + rc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS, > TPM2_CC_SELF_TEST); > + if (rc) > + return rc; -> +> > - if (rc != TPM2_RC_TESTING || delay_msec >= duration) > - break; > + tpm_buf_append_u8(&buf, full); > + rc = tpm_transmit_cmd(chip, NULL, buf.data, > PAGE_SIZE, 0, 0, -> + "attempting the self test\n"); +> + "attempting the self test\n"); There shouldn't be a \n in the string: the failure message already appends one. diff --git a/a/content_digest b/N1/content_digest index f696397..c8da3b4 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\020180228195819.22231-2-jarkko.sakkinen@linux.intel.com\0" "From\0James Bottomley <James.Bottomley@hansenpartnership.com>\0" "Subject\0Re: [PATCH 1/5] tpm: Trigger only missing TPM 2.0 self tests\0" - "Date\0Sat, 03 Mar 2018 20:11:59 +0000\0" + "Date\0Sat, 03 Mar 2018 12:11:59 -0800\0" "To\0Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>" " linux-integrity@vger.kernel.org\0" "Cc\0linux-security-module@vger.kernel.org" @@ -25,20 +25,20 @@ "> gets into a state where the partial self-test doesn't return\n" "> TPM_RC_SUCCESS (meaning all tests have run to completion), but\n" "> instead returns TPM_RC_TESTING (meaning some tests are still running\n" - "> in the background).\302\240\302\240There are various theories that resending the\n" + "> in the background). There are various theories that resending the\n" "> self-test command actually causes the tests to restart and thus\n" "> triggers more TPM_RC_TESTING returns until the timeout is exceeded.\n" "> \n" "> There are several issues here: firstly being we shouldn't slow down\n" "> the boot sequence waiting for the self test to complete once the TPM\n" - "> backgrounds them.\302\240\302\240It will actually make available all functions that\n" + "> backgrounds them. It will actually make available all functions that\n" "> have passed and if it gets a failure return TPM_RC_FAILURE to every\n" - "> subsequent command.\302\240\302\240So the fix is to kick off self tests once and if\n" + "> subsequent command. So the fix is to kick off self tests once and if\n" "> they return TPM_RC_TESTING log that as a backgrounded self test\n" "\n" "I still think removing all logging traces is a mistake for something\n" "that can consume a significant amount of time in the boot sequence.\n" - "\302\240It's going to cause lost of people doing boot timings to waste lots of\n" + " It's going to cause lost of people doing boot timings to waste lots of\n" "effort.\n" "\n" "However, removing the log messages makes the above statement a lie, so\n" @@ -47,16 +47,16 @@ "[...]\n" "> @@ -852,27 +837,24 @@ static const struct tpm_input_header\n" "> tpm2_selftest_header = {\n" - "> \302\240 */\n" - "> \302\240static int tpm2_do_selftest(struct tpm_chip *chip)\n" - "> \302\240{\n" + "> */\n" + "> static int tpm2_do_selftest(struct tpm_chip *chip)\n" + "> {\n" "> +\tstruct tpm_buf buf;\n" "> +\tint full;\n" - "> \302\240\tint rc;\n" + "> \tint rc;\n" "> -\tunsigned int delay_msec = 10;\n" "> -\tlong duration;\n" "> -\tstruct tpm2_cmd cmd;\n" - "> \302\240\n" + "> \n" "> -\tduration = jiffies_to_msecs(\n" "> -\t\ttpm2_calc_ordinal_duration(chip,\n" "> TPM2_CC_SELF_TEST));\n" @@ -67,23 +67,23 @@ "> -\n" "> -\t\trc = tpm_transmit_cmd(chip, NULL, &cmd,\n" "> TPM2_SELF_TEST_IN_SIZE,\n" - "> -\t\t\t\t\302\240\302\240\302\240\302\240\302\240\302\2400, 0, \"continue selftest\");\n" + "> -\t\t\t\t 0, 0, \"continue selftest\");\n" "> +\tfor (full = 0; full < 2; full++) {\n" "> +\t\trc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS,\n" "> TPM2_CC_SELF_TEST);\n" "> +\t\tif (rc)\n" "> +\t\t\treturn rc;\n" - "> \302\240\n" + "> \n" "> -\t\tif (rc != TPM2_RC_TESTING || delay_msec >= duration)\n" "> -\t\t\tbreak;\n" "> +\t\ttpm_buf_append_u8(&buf, full);\n" "> +\t\trc = tpm_transmit_cmd(chip, NULL, buf.data,\n" "> PAGE_SIZE, 0, 0,\n" - "> +\t\t\t\t\302\240\302\240\302\240\302\240\302\240\302\240\"attempting the self test\\n\");\n" + "> +\t\t\t\t \"attempting the self test\\n\");\n" "\n" "There shouldn't be a \\n in the string: the failure message already\n" "appends one.\n" "\n" James -a606e8bfd6a022615c550dd812c6b8967df021dfd0200b087e270836234c0002 +16749d15c9c1c48bcb8c6bc137c1dcc83325e7f2d6a295d3006763c9b8bdc8bf
diff --git a/a/1.txt b/N2/1.txt index d23e52d..6a57fec 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -6,20 +6,20 @@ On Wed, 2018-02-28 at 21:58 +0200, Jarkko Sakkinen wrote: > gets into a state where the partial self-test doesn't return > TPM_RC_SUCCESS (meaning all tests have run to completion), but > instead returns TPM_RC_TESTING (meaning some tests are still running -> in the background). There are various theories that resending the +> in the background).??There are various theories that resending the > self-test command actually causes the tests to restart and thus > triggers more TPM_RC_TESTING returns until the timeout is exceeded. > > There are several issues here: firstly being we shouldn't slow down > the boot sequence waiting for the self test to complete once the TPM -> backgrounds them. It will actually make available all functions that +> backgrounds them.??It will actually make available all functions that > have passed and if it gets a failure return TPM_RC_FAILURE to every -> subsequent command. So the fix is to kick off self tests once and if +> subsequent command.??So the fix is to kick off self tests once and if > they return TPM_RC_TESTING log that as a backgrounded self test I still think removing all logging traces is a mistake for something that can consume a significant amount of time in the boot sequence. - It's going to cause lost of people doing boot timings to waste lots of +?It's going to cause lost of people doing boot timings to waste lots of effort. However, removing the log messages makes the above statement a lie, so @@ -28,16 +28,16 @@ one of the two needs fixing. [...] > @@ -852,27 +837,24 @@ static const struct tpm_input_header > tpm2_selftest_header = { -> */ -> static int tpm2_do_selftest(struct tpm_chip *chip) -> { +> ? */ +> ?static int tpm2_do_selftest(struct tpm_chip *chip) +> ?{ > + struct tpm_buf buf; > + int full; -> int rc; +> ? int rc; > - unsigned int delay_msec = 10; > - long duration; > - struct tpm2_cmd cmd; -> +> ? > - duration = jiffies_to_msecs( > - tpm2_calc_ordinal_duration(chip, > TPM2_CC_SELF_TEST)); @@ -48,21 +48,26 @@ one of the two needs fixing. > - > - rc = tpm_transmit_cmd(chip, NULL, &cmd, > TPM2_SELF_TEST_IN_SIZE, -> - 0, 0, "continue selftest"); +> - ??????0, 0, "continue selftest"); > + for (full = 0; full < 2; full++) { > + rc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS, > TPM2_CC_SELF_TEST); > + if (rc) > + return rc; -> +> ? > - if (rc != TPM2_RC_TESTING || delay_msec >= duration) > - break; > + tpm_buf_append_u8(&buf, full); > + rc = tpm_transmit_cmd(chip, NULL, buf.data, > PAGE_SIZE, 0, 0, -> + "attempting the self test\n"); +> + ??????"attempting the self test\n"); There shouldn't be a \n in the string: the failure message already appends one. James + +-- +To unsubscribe from this list: send the line "unsubscribe linux-security-module" in +the body of a message to majordomo at vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N2/content_digest index f696397..daefa40 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,20 +1,9 @@ "ref\020180228195819.22231-1-jarkko.sakkinen@linux.intel.com\0" "ref\020180228195819.22231-2-jarkko.sakkinen@linux.intel.com\0" - "From\0James Bottomley <James.Bottomley@hansenpartnership.com>\0" - "Subject\0Re: [PATCH 1/5] tpm: Trigger only missing TPM 2.0 self tests\0" - "Date\0Sat, 03 Mar 2018 20:11:59 +0000\0" - "To\0Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>" - " linux-integrity@vger.kernel.org\0" - "Cc\0linux-security-module@vger.kernel.org" - keyrings@vger.kernel.org - Alexander Steffen <Alexander.Steffen@infineon.com> - stable@vger.kernel.org - Jarkko Sakkinen <jarkko.sakkine@linux.intel.com> - Peter Huewe <peterhuewe@gmx.de> - Jason Gunthorpe <jgg@ziepe.ca> - Arnd Bergmann <arnd@arndb.de> - Greg Kroah-Hartman <gregkh@linuxfoundation.org> - " open list <linux-kernel@vger.kernel.org>\0" + "From\0James.Bottomley@hansenpartnership.com (James Bottomley)\0" + "Subject\0[PATCH 1/5] tpm: Trigger only missing TPM 2.0 self tests\0" + "Date\0Sat, 03 Mar 2018 12:11:59 -0800\0" + "To\0linux-security-module@vger.kernel.org\0" "\00:1\0" "b\0" "On Wed, 2018-02-28 at 21:58 +0200, Jarkko Sakkinen wrote:\n" @@ -25,20 +14,20 @@ "> gets into a state where the partial self-test doesn't return\n" "> TPM_RC_SUCCESS (meaning all tests have run to completion), but\n" "> instead returns TPM_RC_TESTING (meaning some tests are still running\n" - "> in the background).\302\240\302\240There are various theories that resending the\n" + "> in the background).??There are various theories that resending the\n" "> self-test command actually causes the tests to restart and thus\n" "> triggers more TPM_RC_TESTING returns until the timeout is exceeded.\n" "> \n" "> There are several issues here: firstly being we shouldn't slow down\n" "> the boot sequence waiting for the self test to complete once the TPM\n" - "> backgrounds them.\302\240\302\240It will actually make available all functions that\n" + "> backgrounds them.??It will actually make available all functions that\n" "> have passed and if it gets a failure return TPM_RC_FAILURE to every\n" - "> subsequent command.\302\240\302\240So the fix is to kick off self tests once and if\n" + "> subsequent command.??So the fix is to kick off self tests once and if\n" "> they return TPM_RC_TESTING log that as a backgrounded self test\n" "\n" "I still think removing all logging traces is a mistake for something\n" "that can consume a significant amount of time in the boot sequence.\n" - "\302\240It's going to cause lost of people doing boot timings to waste lots of\n" + "?It's going to cause lost of people doing boot timings to waste lots of\n" "effort.\n" "\n" "However, removing the log messages makes the above statement a lie, so\n" @@ -47,16 +36,16 @@ "[...]\n" "> @@ -852,27 +837,24 @@ static const struct tpm_input_header\n" "> tpm2_selftest_header = {\n" - "> \302\240 */\n" - "> \302\240static int tpm2_do_selftest(struct tpm_chip *chip)\n" - "> \302\240{\n" + "> ? */\n" + "> ?static int tpm2_do_selftest(struct tpm_chip *chip)\n" + "> ?{\n" "> +\tstruct tpm_buf buf;\n" "> +\tint full;\n" - "> \302\240\tint rc;\n" + "> ?\tint rc;\n" "> -\tunsigned int delay_msec = 10;\n" "> -\tlong duration;\n" "> -\tstruct tpm2_cmd cmd;\n" - "> \302\240\n" + "> ?\n" "> -\tduration = jiffies_to_msecs(\n" "> -\t\ttpm2_calc_ordinal_duration(chip,\n" "> TPM2_CC_SELF_TEST));\n" @@ -67,23 +56,28 @@ "> -\n" "> -\t\trc = tpm_transmit_cmd(chip, NULL, &cmd,\n" "> TPM2_SELF_TEST_IN_SIZE,\n" - "> -\t\t\t\t\302\240\302\240\302\240\302\240\302\240\302\2400, 0, \"continue selftest\");\n" + "> -\t\t\t\t??????0, 0, \"continue selftest\");\n" "> +\tfor (full = 0; full < 2; full++) {\n" "> +\t\trc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS,\n" "> TPM2_CC_SELF_TEST);\n" "> +\t\tif (rc)\n" "> +\t\t\treturn rc;\n" - "> \302\240\n" + "> ?\n" "> -\t\tif (rc != TPM2_RC_TESTING || delay_msec >= duration)\n" "> -\t\t\tbreak;\n" "> +\t\ttpm_buf_append_u8(&buf, full);\n" "> +\t\trc = tpm_transmit_cmd(chip, NULL, buf.data,\n" "> PAGE_SIZE, 0, 0,\n" - "> +\t\t\t\t\302\240\302\240\302\240\302\240\302\240\302\240\"attempting the self test\\n\");\n" + "> +\t\t\t\t??????\"attempting the self test\\n\");\n" "\n" "There shouldn't be a \\n in the string: the failure message already\n" "appends one.\n" "\n" - James + "James\n" + "\n" + "--\n" + "To unsubscribe from this list: send the line \"unsubscribe linux-security-module\" in\n" + "the body of a message to majordomo at vger.kernel.org\n" + More majordomo info at http://vger.kernel.org/majordomo-info.html -a606e8bfd6a022615c550dd812c6b8967df021dfd0200b087e270836234c0002 +2ffe7ff21ba7fa1fa5238e78ffaf21c805e38b449c8549e6b160d51dc9b0a92f
diff --git a/a/content_digest b/N3/content_digest index f696397..5d4994d 100644 --- a/a/content_digest +++ b/N3/content_digest @@ -2,7 +2,7 @@ "ref\020180228195819.22231-2-jarkko.sakkinen@linux.intel.com\0" "From\0James Bottomley <James.Bottomley@hansenpartnership.com>\0" "Subject\0Re: [PATCH 1/5] tpm: Trigger only missing TPM 2.0 self tests\0" - "Date\0Sat, 03 Mar 2018 20:11:59 +0000\0" + "Date\0Sat, 03 Mar 2018 12:11:59 -0800\0" "To\0Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>" " linux-integrity@vger.kernel.org\0" "Cc\0linux-security-module@vger.kernel.org" @@ -86,4 +86,4 @@ "\n" James -a606e8bfd6a022615c550dd812c6b8967df021dfd0200b087e270836234c0002 +71278b993de06b8804ebb56fc9422c07eda3b12a75e30dac6280ef10f6d149af
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.