* [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method
[not found] ` <7478e964-6553-9d1e-3d8f-83b044a9a562@codeaurora.org>
@ 2017-08-25 16:21 ` Jarkko Sakkinen
2017-08-25 16:53 ` Jason Gunthorpe
0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Sakkinen @ 2017-08-25 16:21 UTC (permalink / raw)
To: linux-security-module
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
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method
2017-08-25 16:21 ` [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method Jarkko Sakkinen
@ 2017-08-25 16:53 ` Jason Gunthorpe
2017-08-25 17:28 ` Jiandi An
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2017-08-25 16:53 UTC (permalink / raw)
To: linux-security-module
On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote:
> 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.
Yes please
Jason
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method
2017-08-25 16:53 ` Jason Gunthorpe
@ 2017-08-25 17:28 ` Jiandi An
2017-08-25 17:35 ` Jarkko Sakkinen
0 siblings, 1 reply; 4+ messages in thread
From: Jiandi An @ 2017-08-25 17:28 UTC (permalink / raw)
To: linux-security-module
On 08/25/2017 11:53 AM, Jason Gunthorpe wrote:
> On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote:
>> 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.
>
> Yes please
>
> Jason
>
Okay, I'll work on moving sm to priv and getting rid of flags from
priv. Will submit a new patch with appropriate patch name and not
a v2 of this patch since the scope of changes have changed.
Thanks for your comments and feedback.
--
Jiandi An
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a
Linux Foundation Collaborative Project.
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method
2017-08-25 17:28 ` Jiandi An
@ 2017-08-25 17:35 ` Jarkko Sakkinen
0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Sakkinen @ 2017-08-25 17:35 UTC (permalink / raw)
To: linux-security-module
On Fri, Aug 25, 2017 at 12:28:21PM -0500, Jiandi An wrote:
>
>
> On 08/25/2017 11:53 AM, Jason Gunthorpe wrote:
> > On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote:
> > > 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.
> >
> > Yes please
> >
> > Jason
> >
> Okay, I'll work on moving sm to priv and getting rid of flags from
> priv. Will submit a new patch with appropriate patch name and not
> a v2 of this patch since the scope of changes have changed.
>
> Thanks for your comments and feedback.
Great
/Jarkko
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-25 17:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1503029736-591-1-git-send-email-anjiandi@codeaurora.org>
[not found] ` <20170822173956.zpqe4scdnv7plrhj@linux.intel.com>
[not found] ` <d88e255c-f8c9-b6fc-64bd-8cf56153fcce@codeaurora.org>
[not found] ` <20170824122630.75sxjmkj5f7p7tv5@linux.intel.com>
[not found] ` <7478e964-6553-9d1e-3d8f-83b044a9a562@codeaurora.org>
2017-08-25 16:21 ` [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method Jarkko Sakkinen
2017-08-25 16:53 ` Jason Gunthorpe
2017-08-25 17:28 ` Jiandi An
2017-08-25 17:35 ` Jarkko Sakkinen
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).