Skip to content

Commit 0e3bec0

Browse files
committed
Merge remote-tracking branch 'original/incoming' into incoming
2 parents d4a5483 + f96a2a2 commit 0e3bec0

File tree

222 files changed

+2005
-1661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+2005
-1661
lines changed

AUTHORS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ Aleksander Balicki <[email protected]>
99
Alex Rønne Petersen <[email protected]>
1010
Alexander Stavonin <[email protected]>
1111
Andreas Gal <[email protected]>
12+
Andrew Paseltiner <[email protected]>
1213
Arkaitz Jimenez <[email protected]>
1314
Armin Ronacher <[email protected]>
1415
Austin Seipp <[email protected]>
16+
1517
1618
Ben Striegel <[email protected]>
1719
Benjamin Herr <[email protected]>
@@ -41,6 +43,7 @@ Evan McClanahan <[email protected]>
4143
Francisco Souza <[email protected]>
4244
Gareth Daniel Smith <[email protected]>
4345
Glenn Willen <[email protected]>
46+
Gonçalo Cabrita <[email protected]>
4447
Graham Fawcett <[email protected]>
4548
Grahame Bowland <[email protected]>
4649
Haitao Li <[email protected]>
@@ -103,4 +106,5 @@ Tomoki Aonuma <[email protected]>
103106
Tycho Sci <[email protected]>
104107
Vincent Belliard <[email protected]>
105108
Wade Mealing <[email protected]>
109+
Yasuhiro Fujii <[email protected]>
106110
Zack Corr <[email protected]>

configure

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ opt manage-submodules 1 "let the build manage the git submodules"
295295
opt mingw-cross 0 "cross-compile for win32 using mingw"
296296
opt clang 0 "prefer clang to gcc for building the runtime"
297297
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
298+
opt pax-flags 0 "apply PaX flags to rustc binaries (required for GRSecurity/PaX-patched kernels)"
298299
valopt prefix "/usr/local" "set installation prefix"
299300
valopt local-rust-root "/usr/local" "set prefix for local rust binary"
300301
valopt llvm-root "" "set LLVM root"
@@ -343,6 +344,11 @@ probe CFG_PDFLATEX pdflatex
343344
probe CFG_XETEX xetex
344345
probe CFG_LUATEX luatex
345346
probe CFG_NODE nodejs node
347+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
348+
then
349+
probe CFG_PAXCTL paxctl /sbin/paxctl
350+
probe CFG_ZCAT zcat
351+
fi
346352

347353
if [ ! -z "$CFG_PANDOC" ]
348354
then
@@ -354,6 +360,51 @@ then
354360
fi
355361
fi
356362

363+
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
364+
then
365+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" -a -z "$CFG_PAXCTL" ]
366+
then
367+
err "enabled PaX markings but no paxctl binary found"
368+
fi
369+
370+
if [ -z "$CFG_DISABLE_PAX_FLAGS" ]
371+
then
372+
# GRSecurity/PaX detection. This can be very flaky.
373+
GRSEC_DETECTED=
374+
375+
# /dev/grsec only exists if CONFIG_GRKERNSEC_NO_RBAC is not set.
376+
# /proc/sys/kernel/grsecurity is not available if ÇONFIG_GRKERNSEC_SYSCTL is not set.
377+
if [ -e /dev/grsec -o -d /proc/sys/kernel/grsecurity ]
378+
then
379+
GRSEC_DETECTED=1
380+
# /proc/config.gz is normally only available to root, and only if CONFIG_IKCONFIG_PROC has been set.
381+
elif [ -r /proc/config.gz -a ! -z "$CFG_ZCAT" ]
382+
then
383+
if "$CFG_ZCAT" /proc/config.gz | grep --quiet "CONFIG_GRKERNSEC=y"
384+
then
385+
GRSEC_DETECTED=1
386+
fi
387+
# Flaky.
388+
elif grep --quiet grsec /proc/version
389+
then
390+
GRSEC_DETECTED=1
391+
fi
392+
393+
if [ ! -z "$GRSEC_DETECTED" ]
394+
then
395+
step_msg "GRSecurity: yes"
396+
if [ ! -z "$CFG_PAXCTL" ]
397+
then
398+
CFG_ENABLE_PAX_FLAGS=1
399+
else
400+
warn "GRSecurity kernel detected but no paxctl binary found: not setting CFG_ENABLE_PAX_FLAGS"
401+
fi
402+
else
403+
step_msg "GRSecurity: no"
404+
fi
405+
fi
406+
fi
407+
357408
if [ ! -z "$CFG_ENABLE_LOCAL_RUST" ]
358409
then
359410
if [ ! -f ${CFG_LOCAL_RUST_ROOT}/bin/rustc ]
@@ -523,15 +574,23 @@ then
523574
msg "git: submodule sync"
524575
"${CFG_GIT}" submodule --quiet sync
525576

577+
msg "git: submodule update"
578+
"${CFG_GIT}" submodule --quiet update --init
579+
need_ok "git failed"
580+
581+
msg "git: submodule foreach sync"
582+
"${CFG_GIT}" submodule --quiet foreach --recursive git submodule sync
583+
need_ok "git failed"
584+
585+
msg "git: submodule foreach update"
586+
"${CFG_GIT}" submodule --quiet update --init --recursive
587+
need_ok "git failed"
588+
526589
# NB: this is just for the sake of getting the submodule SHA1 values
527590
# and status written into the build log.
528591
msg "git: submodule status"
529592
"${CFG_GIT}" submodule status --recursive
530593

531-
msg "git: submodule update"
532-
"${CFG_GIT}" submodule --quiet update --init --recursive
533-
need_ok "git failed"
534-
535594
msg "git: submodule clobber"
536595
"${CFG_GIT}" submodule --quiet foreach --recursive git clean -dxf
537596
need_ok "git failed"
@@ -699,6 +758,12 @@ putvar CFG_C_COMPILER
699758
putvar CFG_LIBDIR
700759
putvar CFG_DISABLE_MANAGE_SUBMODULES
701760

761+
if [ ! -z "$CFG_ENABLE_PAX_FLAGS" ]
762+
then
763+
putvar CFG_ENABLE_PAX_FLAGS
764+
putvar CFG_PAXCTL
765+
fi
766+
702767
if [ ! -z $BAD_PANDOC ]
703768
then
704769
CFG_PANDOC=

doc/prep.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ while ((line = lines[cur++]) != null) {
6060
var html = '<pre class="cm-s-default">', curstr = "", curstyle = null;
6161
function add(str, style) {
6262
if (style != curstyle) {
63-
if (curstyle) html += '<span class="cm-' + curstyle + '">' + curstr
64-
+ "</span>";
65-
else if (curstr) html += curstr;
63+
if (curstyle) html +=
64+
'<span class="cm-' + CodeMirror.htmlEscape(curstyle) + '">' +
65+
CodeMirror.htmlEscape(curstr) + "</span>";
66+
else if (curstr) html += CodeMirror.htmlEscape(curstr);
6667
curstr = str; curstyle = style;
6768
} else curstr += str;
6869
}

0 commit comments

Comments
 (0)