]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
greybus: manifest: Warn if descriptor size > expected size
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 29 Apr 2015 05:32:08 +0000 (11:02 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 29 Apr 2015 13:55:21 +0000 (15:55 +0200)
commit55b930cd17a7cd66a1fb2a587660a344ea5a9ee2
tree522f8a745f2b568c20d20d37113ad9d0a5b021c6
parentfa2fbf16f6aaaabee9394edc57dc803b59de6699
greybus: manifest: Warn if descriptor size > expected size

A descriptor passed to AP can be bigger than what AP expects, if
manifest's minor version is higher with same major number as the AP. As
it can have some extra data in descriptor.

But, if AP and manifest versions are identical, or if the AP's minor
version is greater than the manifest version, we should at least warn
(if not fail).

Doing this would require some changes to record the manifest version
somewhere reachable by identify_descriptor().

For now, just warn if descriptor is bigger than expected.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/manifest.c