pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/firefox



Module Name:    pkgsrc
Committed By:   nia
Date:           Wed Jul 20 21:22:35 UTC 2022

Modified Files:
        pkgsrc/www/firefox: Makefile distinfo
Added Files:
        pkgsrc/www/firefox/patches: patch-gfx_skia_skia_src_core_SkVM.cpp
            patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c

Log Message:
firefox: Restore PaX MPROTECT support.


To generate a diff of this commit:
cvs rdiff -u -r1.528 -r1.529 pkgsrc/www/firefox/Makefile
cvs rdiff -u -r1.473 -r1.474 pkgsrc/www/firefox/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/www/firefox/patches/patch-gfx_skia_skia_src_core_SkVM.cpp \
    pkgsrc/www/firefox/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/firefox/Makefile
diff -u pkgsrc/www/firefox/Makefile:1.528 pkgsrc/www/firefox/Makefile:1.529
--- pkgsrc/www/firefox/Makefile:1.528   Sun Jul 17 08:08:56 2022
+++ pkgsrc/www/firefox/Makefile Wed Jul 20 21:22:35 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.528 2022/07/17 08:08:56 wiz Exp $
+# $NetBSD: Makefile,v 1.529 2022/07/20 21:22:35 nia Exp $
 
 FIREFOX_VER=           ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=            102.0
@@ -6,7 +6,7 @@ MOZ_BRANCH_MINOR=       .1
 
 DISTNAME=      firefox-${FIREFOX_VER}.source
 PKGNAME=       ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
 EXTRACT_SUFX=  .tar.xz
@@ -69,11 +69,6 @@ LDFLAGS.SunOS+=              -lm
 
 # XXX not sure how to test this! likely unnecessary
 NOT_PAX_MPROTECT_SAFE+=        lib/${PKGBASE}/plugin-container
-# For RLBox WASM sandbox. Sync condition with mozilla-common.mk
-.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
-NOT_PAX_MPROTECT_SAFE+=        lib/${PKGBASE}/firefox
-NOT_PAX_MPROTECT_SAFE+=        lib/${PKGBASE}/firefox-bin
-.endif
 
 # Avoid ld "invalid section index" errors.
 BUILDLINK_TRANSFORM.SunOS+=    rm:-fdata-sections

Index: pkgsrc/www/firefox/distinfo
diff -u pkgsrc/www/firefox/distinfo:1.473 pkgsrc/www/firefox/distinfo:1.474
--- pkgsrc/www/firefox/distinfo:1.473   Sun Jul 17 08:08:56 2022
+++ pkgsrc/www/firefox/distinfo Wed Jul 20 21:22:35 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.473 2022/07/17 08:08:56 wiz Exp $
+$NetBSD: distinfo,v 1.474 2022/07/20 21:22:35 nia Exp $
 
 BLAKE2s (firefox-102.0.1.source.tar.xz) = 43e2f34c0e39d1a3d3d341e55d474a9e5551865ace57f9f0fd1d7eb16676ef64
 SHA512 (firefox-102.0.1.source.tar.xz) = a930d359fb81e473b963a93f6db5110871e9fd57f6d0f352513047d363d930dd4811e8dd786c2f6f3541c3871eb1c0169b718652d9ee076fd13a20f52af30417
@@ -14,6 +14,7 @@ SHA1 (patch-dom_base_nsAttrName.h) = ac7
 SHA1 (patch-gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = e458c9c8dc66edc69c1874734af28a77fc5e3993
 SHA1 (patch-gfx_angle_checkout_src_compiler_translator_InfoSink.h) = b2adce9e65662283a11b6dcff40e95523e940045
 SHA1 (patch-gfx_skia_skia_src_core_SkCpu.cpp) = 36218819254f3681b9c717d652ea78c9f20d49ad
+SHA1 (patch-gfx_skia_skia_src_core_SkVM.cpp) = cdb2c2b0d512c0eb8403abba9b74c218d3a306ea
 SHA1 (patch-gfx_wr_swgl_build.rs) = df6ebfaabb4d27994e59a9d0eaf12c7cf08415fb
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 298642a3527804115b398fb7904a3596962932e3
 SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
@@ -36,6 +37,7 @@ SHA1 (patch-security_nss_lib_freebl_mpi_
 SHA1 (patch-third__party_js_cfworker_build.sh) = 46cdf97b99cf01080f290ae8d9a33b5f869fc3e4
 SHA1 (patch-third__party_libwebrtc_modules_video__capture_linux_device__info__linux.cc) = 2e951d7d91934751608e99628fc144632d8a3b5c
 SHA1 (patch-third__party_libwebrtc_system__wrappers_source_cpu__features__linux.cc) = b90e22b50879f7adcc1da3a993f52c0701b720f8
+SHA1 (patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c) = ba423726a4859f19aa627bb127e5597eac323016
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = bd7b2a0f2407c3ab95515b2f143c41c3ca6fb0c4
 SHA1 (patch-toolkit_modules_subprocess_subprocess__shared__unix.js) = 2303b753066298305ccae80d72765dbc4da5e0dc
 SHA1 (patch-toolkit_moz.configure) = 8de54693dc47b0993f220cc5a04af98925de1fb5

Added files:

Index: pkgsrc/www/firefox/patches/patch-gfx_skia_skia_src_core_SkVM.cpp
diff -u /dev/null pkgsrc/www/firefox/patches/patch-gfx_skia_skia_src_core_SkVM.cpp:1.1
--- /dev/null   Wed Jul 20 21:22:35 2022
+++ pkgsrc/www/firefox/patches/patch-gfx_skia_skia_src_core_SkVM.cpp    Wed Jul 20 21:22:35 2022
@@ -0,0 +1,19 @@
+$NetBSD: patch-gfx_skia_skia_src_core_SkVM.cpp,v 1.1 2022/07/20 21:22:35 nia Exp $
+
+Work with PaX MPROTECT on NetBSD by stating that we will later make this memory
+block executable.
+
+--- gfx/skia/skia/src/core/SkVM.cpp.orig       2022-07-05 12:21:05.000000000 +0000
++++ gfx/skia/skia/src/core/SkVM.cpp
+@@ -2076,7 +2076,11 @@ namespace skvm {
+         // Allocate space that we can remap as executable.
+         const size_t page = sysconf(_SC_PAGESIZE);
+         fJITSize = ((a.size() + page - 1) / page) * page;  // mprotect works at page granularity.
++#ifdef PROT_MPROTECT
++        fJITBuf = mmap(nullptr,fJITSize, PROT_READ|PROT_WRITE|PROT_MPROTECT(PROT_WRITE), MAP_ANONYMOUS|MAP_PRIVATE, -1,0);
++#else
+         fJITBuf = mmap(nullptr,fJITSize, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1,0);
++#endif
+ 
+         // Assemble the program for real.
+         a = Assembler{fJITBuf};
Index: pkgsrc/www/firefox/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c
diff -u /dev/null pkgsrc/www/firefox/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c:1.1
--- /dev/null   Wed Jul 20 21:22:35 2022
+++ pkgsrc/www/firefox/patches/patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c       Wed Jul 20 21:22:35 2022
@@ -0,0 +1,27 @@
+$NetBSD: patch-third__party_wasm2c_wasm2c_wasm-rt-os-unix.c,v 1.1 2022/07/20 21:22:35 nia Exp $
+
+Work with PaX MPROTECT on NetBSD by stating that we will later make this memory
+block executable.
+
+--- third_party/wasm2c/wasm2c/wasm-rt-os-unix.c.orig   2022-07-05 12:21:22.000000000 +0000
++++ third_party/wasm2c/wasm2c/wasm-rt-os-unix.c
+@@ -48,6 +48,12 @@ void* os_mmap(void* hint, size_t size, i
+     /* At most 16 G is allowed */
+     return NULL;
+ 
++#ifdef PROT_MPROTECT
++    map_prot |= PROT_MPROTECT(PROT_READ);
++    map_prot |= PROT_MPROTECT(PROT_WRITE);
++    map_prot |= PROT_MPROTECT(PROT_EXEC);
++#endif
++
+   if (prot & MMAP_PROT_READ)
+     map_prot |= PROT_READ;
+ 
+@@ -279,4 +285,4 @@ void os_print_last_error(const char* msg
+ #else
+   // https://stackoverflow.com/questions/26541150/warning-iso-c-forbids-an-empty-translation-unit
+   typedef int make_iso_compilers_happy;
+-#endif
+\ No newline at end of file
++#endif



Home | Main Index | Thread Index | Old Index