aboutsummaryrefslogtreecommitdiff
path: root/src/lj_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_arch.h')
-rw-r--r--src/lj_arch.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lj_arch.h b/src/lj_arch.h
index 626f6c13..f148b3f7 100644
--- a/src/lj_arch.h
+++ b/src/lj_arch.h
@@ -637,14 +637,31 @@ extern void *LJ_WIN_LOADLIBA(const char *path);
637 637
638/* Don't make any changes here. Instead build with: 638/* Don't make any changes here. Instead build with:
639** make "XCFLAGS=-DLUAJIT_SECURITY_flag=value" 639** make "XCFLAGS=-DLUAJIT_SECURITY_flag=value"
640**
641** Important note to distro maintainers: DO NOT change the defaults for a
642** regular distro build -- neither upwards, nor downwards!
643** These build-time configurable security flags are intended for embedders
644** who may have specific needs wrt. security vs. performance.
640*/ 645*/
641 646
642/* Security defaults. */ 647/* Security defaults. */
643#ifndef LUAJIT_SECURITY_PRNG 648#ifndef LUAJIT_SECURITY_PRNG
649/* PRNG init: 0 = fixed/insecure, 1 = secure from OS. */
644#define LUAJIT_SECURITY_PRNG 1 650#define LUAJIT_SECURITY_PRNG 1
645#endif 651#endif
646 652
653#ifndef LUAJIT_SECURITY_STRHASH
654/* String hash: 0 = sparse only, 1 = sparse + dense. */
655#define LUAJIT_SECURITY_STRHASH 1
656#endif
657
658#ifndef LUAJIT_SECURITY_STRID
659/* String IDs: 0 = linear, 1 = reseed < 255, 2 = reseed < 15, 3 = random. */
660#define LUAJIT_SECURITY_STRID 1
661#endif
662
647#ifndef LUAJIT_SECURITY_MCODE 663#ifndef LUAJIT_SECURITY_MCODE
664/* Machine code page protection: 0 = insecure RWX, 1 = secure RW^X. */
648#define LUAJIT_SECURITY_MCODE 1 665#define LUAJIT_SECURITY_MCODE 1
649#endif 666#endif
650 667