[master] b04282c Spit out a warning if a persistent silo is reloaded at a different address.

Poul-Henning Kamp phk at FreeBSD.org
Sat Nov 26 00:08:05 CET 2016


commit b04282ca9a11477646731b91c37a9f3bdf9f8f45
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Nov 25 22:49:03 2016 +0000

    Spit out a warning if a persistent silo is reloaded at a different address.

diff --git a/bin/varnishd/storage/mgt_storage_persistent.c b/bin/varnishd/storage/mgt_storage_persistent.c
index f5cd350..001193e 100644
--- a/bin/varnishd/storage/mgt_storage_persistent.c
+++ b/bin/varnishd/storage/mgt_storage_persistent.c
@@ -205,6 +205,9 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
 	if (sc->base == MAP_FAILED)
 		ARGV_ERR("(-spersistent) failed to mmap (%s)\n",
 		    strerror(errno));
+	if (target != NULL && sc->base != target)
+		fprintf(stderr, "WARNING: Persistent silo lost to ASLR %s\n",
+		    sc->filename);
 
 	smp_def_sign(sc, &sc->idn, 0, "SILO");
 	sc->ident = SIGN_DATA(&sc->idn);



More information about the varnish-commit mailing list