[SLOF] [PATCH 2/9] obp-tftp: Make sure to not overwrite paflof in memory

Thomas Huth thuth at redhat.com
Fri May 18 03:40:49 AEST 2018


The obp-tftp package is currently using an arbitrary large value
as maximal load size. If the downloaded file is big enough, we
can easily erase Paflof in memory this way. Let's make sure that
this can not happen by limiting the size to the amount of memory
below the Paflof binary (which is close to the end of the RAM).

Signed-off-by: Thomas Huth <thuth at redhat.com>
---
 slof/fs/packages/obp-tftp.fs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/slof/fs/packages/obp-tftp.fs b/slof/fs/packages/obp-tftp.fs
index 19c11e1..7be56ed 100644
--- a/slof/fs/packages/obp-tftp.fs
+++ b/slof/fs/packages/obp-tftp.fs
@@ -24,7 +24,7 @@ s" obp-tftp" device-name
     my-parent ihandle>phandle node>path encode-string
     s" bootpath" set-chosen
 
-    60000000                        ( addr maxlen )
+    paflof-start over -         ( addr maxlen )
 
     \ Add OBP-TFTP Bootstring argument, e.g. "10.128.0.1,bootrom.bin,10.128.40.1"
     my-args
-- 
1.8.3.1



More information about the SLOF mailing list