LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sudeep Holla <Sudeep.Holla@arm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Mark Rutland <Mark.Rutland@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Subject: Re: [PATCH v2] drivers/base: cacheinfo: validate device node for all the caches
Date: Tue, 10 Mar 2015 09:52:32 +0000	[thread overview]
Message-ID: <54FEBEE0.2030703@arm.com> (raw)
In-Reply-To: <1424709159-13152-1-git-send-email-sudeep.holla@arm.com>

Hi Greg,

On 23/02/15 16:32, Sudeep Holla wrote:
> On architectures that depend on DT for obtaining cache hierarcy, we need
> to validate the device node for all the cache indices, failing to do so
> might result in wrong information being exposed to the userspace.
>
> This is quite possible on initial/incomplete versions of the device
> trees. In such cases, it's better to bail out if all the required device
> nodes are not present.
>
> This patch adds checks for the validation of device node for all the
> caches and doesn't initialise the cacheinfo if there's any error.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>   drivers/base/cacheinfo.c | 13 +++++++++++--
>   1 file changed, 11 insertions(+), 2 deletions(-)
>
> v1->v2:
>   - Updated log information as suggested by Mark
>   - Added Mark's ACK
>
> Hi Greg,
>
> Can you please pick this fix for the next rc ?
>
> Without this there's possibility that erroneous information is exposed
> to userspace on architecture depending on DT especially if DT lacks
> cache hierarchy information.
>

There are many arm64 DT without cache hierarchy which exposes wrong
cacheinfo to the user space. It would be good to get this included
as bug fix for 4.0

Regards,
Sudeep


      reply	other threads:[~2015-03-10  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 14:10 [PATCH] " Sudeep Holla
2015-02-23 15:14 ` Mark Rutland
2015-02-23 15:45   ` Sudeep Holla
2015-02-23 16:32 ` [PATCH v2] " Sudeep Holla
2015-03-10  9:52   ` Sudeep Holla [this message]

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=54FEBEE0.2030703@arm.com \
    --to=sudeep.holla@arm.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=Mark.Rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH v2] drivers/base: cacheinfo: validate device node for all the caches' \
    /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

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).