From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Subject: Re: [igt-dev] [PATCH igt] tools: Clear unused fields in register spec
Date: Fri, 02 Feb 2018 15:06:39 +0200 [thread overview]
Message-ID: <87zi4rv8v4.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180202101025.15954-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> If we fail to clear the other fields inside the register spec, that may
> be left with garbage instructing us to access the register via an
> invalid path.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104895
> Fixes: 7f0be0e7d9be ("tools/intel_reg: Add reading and writing registers through engine")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
> CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
I mailed a separate patch which does handle the builting spec,
which is more precise the bug#104895. But this is needed also
as it is for the same problem with file based reg specs.
We need both.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> tools/intel_reg_spec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
> index 5594d7077..58c8f7e4c 100644
> --- a/tools/intel_reg_spec.c
> +++ b/tools/intel_reg_spec.c
> @@ -267,7 +267,7 @@ static ssize_t parse_file(struct reg **regs, size_t *nregs,
> }
>
> while (getline(&line, &linesize, file) != -1) {
> - struct reg reg;
> + struct reg reg = {};
>
> lineno++;
>
> --
> 2.15.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-02-02 13:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 10:10 [igt-dev] [PATCH igt] tools: Clear unused fields in register spec Chris Wilson
2018-02-02 10:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-02-02 11:16 ` [igt-dev] [PATCH igt] " Jani Nikula
2018-02-02 11:22 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2018-02-02 13:06 ` Mika Kuoppala [this message]
2018-02-02 13:15 ` [igt-dev] [PATCH igt v2] " Chris Wilson
2018-02-02 13:21 ` Mika Kuoppala
2018-02-02 13:57 ` [igt-dev] ✓ Fi.CI.BAT: success for tools: Clear unused fields in register spec (rev2) Patchwork
2018-02-02 15:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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=87zi4rv8v4.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=joonas.lahtinen@linux.intel.com \
/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 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.