From e2e2e9db2e9ffec74542597ffe8fc856ec98155d Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 25 Jan 2019 17:00:08 -0800 Subject: Protect BBL data, not just text h/t @michaeljclark --- bbl/bbl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bbl/bbl.c') diff --git a/bbl/bbl.c b/bbl/bbl.c index c2c1ee6..ce1be95 100644 --- a/bbl/bbl.c +++ b/bbl/bbl.c @@ -66,9 +66,9 @@ static void protect_memory(void) return setup_pmp(); // Prevent S-mode access to our part of memory. - extern char _ftext, _etext, _end; + extern char _ftext, _end; a0 = (uintptr_t)&_ftext >> PMP_SHIFT; - a1 = (uintptr_t)&_etext >> PMP_SHIFT; + a1 = (uintptr_t)&_end >> PMP_SHIFT; cfg = PMP_TOR << 8; // Give S-mode free rein of everything else. a2 = -1; -- cgit v1.1