tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jiandi An <anjiandi@codeaurora.org>
Cc: peterhuewe@gmx.de, tpmdd@selhorst.net,
	jgunthorpe@obsidianresearch.com,
	tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method
Date: Fri, 25 Aug 2017 19:21:39 +0300	[thread overview]
Message-ID: <20170825162139.s5oasztecntzg223@linux.intel.com> (raw)
In-Reply-To: <7478e964-6553-9d1e-3d8f-83b044a9a562@codeaurora.org>

On Thu, Aug 24, 2017 at 12:20:35PM -0500, Jiandi An wrote:
> I know they don't change the logic.  This was to address comment from Jason.
> He wanted to express the exact condition which crb_go_idle(),
> crb_cmd_ready(), and the check for "Bad ACPI memory layout" in
> crb_map_io() should run, instead of the if not the condition, return.
> Since you want it as is, I'll change it back. It's already excluding
> CRB_FL_CRB_SMC_START in addition to CRB_FL_ACPI_START which is what's
> intended.

I think this very in simple terms. It does not change *anything*.

> Like I said the goal for this patch is to really further exclude
> CRB_FL_CRB_SMC_START from the check for "Bad ACPI memory layout"
> in crb_map_io() in the code below.
> 
> @@ -458,7 +455,7 @@ static int crb_map_io(struct acpi_device *device, struct
> crb_priv *priv,
>   * the control area, as one nice sane region except for some older
>   * stuff that puts the control area outside the ACPI IO region.
>   */
>  -if (!(priv->flags & CRB_FL_ACPI_START)) {
>  +if ((priv->flags & (CRB_FL_ACPI_START | CRB_FL_CRB_SMC_START)) == 0) {
>   		if (buf->control_address == io_res.start +
>   		    sizeof(*priv->regs_h))
>   			priv->regs_h = priv->iobase;
>   		else
>   		    dev_warn(dev, FW_BUG "Bad ACPI memory layout");
>   }
> 
> I'll submit v2 with only this change.  Are you okay which this change?

I'm not OK with those parts that do nothing except shuffle the code.

As I said before it would make much more sense to make code always deal
with sm and remove flags completely. That would help maintaining code
easier as new logic for TZ is introduced.

> Thanks
> - Jiandi

/Jarkko

  reply	other threads:[~2017-08-25 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18  4:15 [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method Jiandi An
2017-08-19 17:05 ` Jarkko Sakkinen
2017-08-21  3:41   ` Jiandi An
2017-08-22 17:36     ` Jarkko Sakkinen
2017-08-22 17:39 ` Jarkko Sakkinen
2017-08-22 21:28   ` Jiandi An
     [not found]     ` <d88e255c-f8c9-b6fc-64bd-8cf56153fcce-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-08-23  2:25       ` Jason Gunthorpe
2017-08-24 12:26     ` Jarkko Sakkinen
2017-08-24 17:20       ` Jiandi An
2017-08-25 16:21         ` Jarkko Sakkinen [this message]
2017-08-25 16:53           ` Jason Gunthorpe
2017-08-25 17:28             ` Jiandi An
2017-08-25 17:35               ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170825162139.s5oasztecntzg223@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=anjiandi@codeaurora.org \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).