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*.
quoted hunk
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
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
On 08/25/2017 11:53 AM, Jason Gunthorpe wrote:
On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote:
quoted
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
On Fri, Aug 25, 2017 at 12:28:21PM -0500, Jiandi An wrote:
On 08/25/2017 11:53 AM, Jason Gunthorpe wrote:
quoted
On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote:
quoted
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