Messages in this thread | | | Date | Thu, 5 Oct 2017 11:41:22 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH v9 06/29] x86/mpx: Use signed variables to compute effective addresses |
| |
On Tue, Oct 03, 2017 at 08:54:09PM -0700, Ricardo Neri wrote: > Even though memory addresses are unsigned, the operands used to compute the > effective address do have a sign. This is true for ModRM.rm, SIB.base, > SIB.index as well as the displacement bytes. Thus, signed variables shall > be used when computing the effective address from these operands. Once the > signed effective address has been computed, it is casted to an unsigned > long to determine the linear address. > > Variables are renamed to better reflect the type of address being > computed. > > Cc: Borislav Petkov <bp@suse.de> > Cc: Andy Lutomirski <luto@kernel.org> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: Adam Buchbinder <adam.buchbinder@gmail.com> > Cc: Colin Ian King <colin.king@canonical.com> > Cc: Lorenzo Stoakes <lstoakes@gmail.com> > Cc: Qiaowei Ren <qiaowei.ren@intel.com> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Nathan Howard <liverlint@gmail.com> > Cc: Adan Hawthorn <adanhawthorn@gmail.com> > Cc: Joe Perches <joe@perches.com> > Cc: Ravi V. Shankar <ravi.v.shankar@intel.com> > Cc: x86@kernel.org > Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> > --- > arch/x86/mm/mpx.c | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-)
Reviewed-by: Borislav Petkov <bp@suse.de>
-- Regards/Gruss, Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --
| |