[Skiboot] [PATCH v2 1/2] Add infrastructure for pointer validation.

Stewart Smith stewart at linux.vnet.ibm.com
Thu Aug 18 15:57:07 AEST 2016


Balbir Singh <bsingharora at gmail.com> writes:
> From: Balbir Singh <bsingharora at gmail.com>
>
> If the kernel called an OPAL API with vmalloc'd address
> or any other address range in real mode, we would hit
> a problem with aliasing. Since the top 4 bits are ignored
> in real mode, pointers from 0xc.. and 0xd.. (and other ranges)
> could collide and lead to hard to solve bugs. This patch
> adds the infrastructure for pointer validation and a simple
> test case for testing the API
>
> Signed-off-by: Balbir Singh <bsingharora at gmail.com>
> ---
>
> Changelog v2:
> 	- No functional changes
> 	- Update copyright to 2016
> 	- Add reference to the power ISA section 5.7
>
>  core/test/Makefile.check |  1 +
>  core/test/run-api-test.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++++
>  include/opal-api.h       | 25 ++++++++++++++++++++++++
>  3 files changed, 77 insertions(+)
>  create mode 100644 core/test/run-api-test.c

I moved the check to opal-internal.h rather than opal-api.h and merged
the series (along with my adjustment of top_of_ram patch) to master as
of 5c4bfc63a0e6ae9d3bb6f6e1bfaa9443c847998a.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list