[arch-commits] Commit in sysdig/repos/community-x86_64 (10 files)

Massimiliano Torromeo mtorromeo at gemini.archlinux.org
Thu Jun 23 18:10:27 UTC 2022


    Date: Thursday, June 23, 2022 @ 18:10:27
  Author: mtorromeo
Revision: 1239282

archrelease: copy trunk to community-x86_64

Added:
  sysdig/repos/community-x86_64/PKGBUILD
    (from rev 1239281, sysdig/trunk/PKGBUILD)
  sysdig/repos/community-x86_64/bashcomp-location.patch
    (from rev 1239281, sysdig/trunk/bashcomp-location.patch)
  sysdig/repos/community-x86_64/falcosecurity-libs-nodownload.patch
    (from rev 1239281, sysdig/trunk/falcosecurity-libs-nodownload.patch)
  sysdig/repos/community-x86_64/linux-5.6.patch
    (from rev 1239281, sysdig/trunk/linux-5.6.patch)
  sysdig/repos/community-x86_64/sme.patch
    (from rev 1239281, sysdig/trunk/sme.patch)
Deleted:
  sysdig/repos/community-x86_64/PKGBUILD
  sysdig/repos/community-x86_64/bashcomp-location.patch
  sysdig/repos/community-x86_64/falcosecurity-libs-nodownload.patch
  sysdig/repos/community-x86_64/linux-5.6.patch
  sysdig/repos/community-x86_64/sme.patch

-------------------------------------+
 PKGBUILD                            |  158 +++++++++++++++++-----------------
 bashcomp-location.patch             |   26 ++---
 falcosecurity-libs-nodownload.patch |   28 +++---
 linux-5.6.patch                     |   70 +++++++--------
 sme.patch                           |  118 ++++++++++++-------------
 5 files changed, 200 insertions(+), 200 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-06-23 18:10:15 UTC (rev 1239281)
+++ PKGBUILD	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -1,79 +0,0 @@
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-# Contribuitor: Alfredo Palhares <masterkorp at masterkorp.net>
-# Contribuitor: Christian Babeux <christian.babeux at 0x80.ca>
-
-pkgbase=sysdig
-pkgname=(sysdig sysdig-dkms)
-pkgver=0.29.2
-pkgrel=4
-
-# from src/sysdig-*/cmake/modules/falcosecurity-libs.cmake
-_falcover=e5c53d648f3c4694385bbe488e7d47eaa36c229a
-
-pkgdesc="Open source system-level exploration and troubleshooting tool"
-arch=('x86_64')
-url="https://www.sysdig.com/"
-license=('GPL2' 'Apache' 'MIT')
-makedepends=('cmake' 'pandoc' 'gtest' 'jsoncpp' 'libjsoncpp.so' 'luajit' 'curl' 'libcurl.so' 'jq' 'libb64' 'intel-tbb' 'grpc' 'libgrpc++_unsecure.so' 'yaml-cpp')
-source=("https://github.com/draios/sysdig/archive/$pkgver/$pkgbase-$pkgver.tar.gz"
-        "falcosecurity-libs-$_falcover.tar.gz::https://github.com/falcosecurity/libs/archive/$_falcover.tar.gz"
-        "bashcomp-location.patch"
-        "falcosecurity-libs-nodownload.patch"
-        "sme.patch")
-sha256sums=('38ea602085f706af5d07630189216fa240064122650a81456cb092579313ae8e'
-            '80903bc57b7f9c5f24298ecf1531cf66ef571681b4bd1e05f6e4db704ffb380b'
-            'aaee8a0ff414a24c5d5a479229324be1667bc5eb70702838f5d617fd986f947b'
-            'b8cedef6766c691a8a92810eb459593d80070f0cf5dfc32cae2a80ec00639429'
-            'eac65420a1f564b2336336b22a2717e5fb5c15928f859995152d00e2e4ed90d5')
-
-prepare() {
-  cd "$srcdir/$pkgbase-$pkgver"
-  patch -p1 -i "$srcdir"/bashcomp-location.patch
-  patch -p1 -i "$srcdir"/falcosecurity-libs-nodownload.patch
-
-  cd "$srcdir/libs-$_falcover"
-  patch -p1 -i "$srcdir"/sme.patch
-}
-
-build() {
-  cd "$srcdir"/$pkgbase-$pkgver
-  rm -rf build
-  mkdir build
-  cd build
-
-  cmake .. \
-        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-        -DCMAKE_BUILD_TYPE=Release \
-        -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS} -Wno-deprecated-declarations" \
-        -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS} -Wno-deprecated-declarations" \
-        -DCMAKE_INSTALL_PREFIX=/usr \
-        -DSYSDIG_VERSION=$pkgver \
-        -DUSE_BUNDLED_DEPS=OFF \
-        -DBUILD_DRIVER=OFF \
-        -DBUILD_LIBSCAP_EXAMPLES=OFF
-  make
-}
-
-package_sysdig() {
-  optdepends=('sysdig-dkms: kernel module for live inspection')
-  depends=('jsoncpp' 'libjsoncpp.so' 'luajit' 'curl' 'libcurl.so' 'jq' 'libb64' 'intel-tbb' 'grpc' 'libgrpc++_unsecure.so' 'yaml-cpp')
-
-  cd "$srcdir"/$pkgbase-$pkgver/build
-  make install DESTDIR="$pkgdir"
-  rm -rf "$pkgdir"/usr/src
-
-  install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
-  install -m644 "$srcdir"/$pkgbase-$pkgver/{NOTICES,COPYING} "$pkgdir"/usr/share/licenses/$pkgname
-}
-
-package_sysdig-dkms() {
-  pkgdesc="DKMS kernel module for sysdig"
-  depends=('sysdig' 'dkms')
-
-  cd "$srcdir"/$pkgbase-$pkgver/build
-  make install DESTDIR="$pkgdir"
-  rm -rf "$pkgdir"/usr/{share,bin}
-
-  install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
-  install -m644 "$srcdir"/$pkgbase-$pkgver/{NOTICES,COPYING} "$pkgdir"/usr/share/licenses/$pkgname
-}

Copied: sysdig/repos/community-x86_64/PKGBUILD (from rev 1239281, sysdig/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -0,0 +1,79 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+# Contribuitor: Alfredo Palhares <masterkorp at masterkorp.net>
+# Contribuitor: Christian Babeux <christian.babeux at 0x80.ca>
+
+pkgbase=sysdig
+pkgname=(sysdig sysdig-dkms)
+pkgver=0.29.2
+pkgrel=5
+
+# from src/sysdig-*/cmake/modules/falcosecurity-libs.cmake
+_falcover=e5c53d648f3c4694385bbe488e7d47eaa36c229a
+
+pkgdesc="Open source system-level exploration and troubleshooting tool"
+arch=('x86_64')
+url="https://www.sysdig.com/"
+license=('GPL2' 'Apache' 'MIT')
+makedepends=('cmake' 'pandoc' 'gtest' 'jsoncpp' 'libjsoncpp.so' 'luajit' 'curl' 'libcurl.so' 'jq' 'libb64' 'intel-tbb' 'grpc' 'libgrpc++_unsecure.so' 'yaml-cpp')
+source=("https://github.com/draios/sysdig/archive/$pkgver/$pkgbase-$pkgver.tar.gz"
+        "falcosecurity-libs-$_falcover.tar.gz::https://github.com/falcosecurity/libs/archive/$_falcover.tar.gz"
+        "bashcomp-location.patch"
+        "falcosecurity-libs-nodownload.patch"
+        "sme.patch")
+sha256sums=('38ea602085f706af5d07630189216fa240064122650a81456cb092579313ae8e'
+            '80903bc57b7f9c5f24298ecf1531cf66ef571681b4bd1e05f6e4db704ffb380b'
+            'aaee8a0ff414a24c5d5a479229324be1667bc5eb70702838f5d617fd986f947b'
+            'b8cedef6766c691a8a92810eb459593d80070f0cf5dfc32cae2a80ec00639429'
+            'eac65420a1f564b2336336b22a2717e5fb5c15928f859995152d00e2e4ed90d5')
+
+prepare() {
+  cd "$srcdir/$pkgbase-$pkgver"
+  patch -p1 -i "$srcdir"/bashcomp-location.patch
+  patch -p1 -i "$srcdir"/falcosecurity-libs-nodownload.patch
+
+  cd "$srcdir/libs-$_falcover"
+  patch -p1 -i "$srcdir"/sme.patch
+}
+
+build() {
+  cd "$srcdir"/$pkgbase-$pkgver
+  rm -rf build
+  mkdir build
+  cd build
+
+  cmake .. \
+        -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
+        -DCMAKE_BUILD_TYPE=Release \
+        -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${CPPFLAGS} -Wno-deprecated-declarations" \
+        -DCMAKE_C_FLAGS="${CFLAGS} ${CPPFLAGS} -Wno-deprecated-declarations" \
+        -DCMAKE_INSTALL_PREFIX=/usr \
+        -DSYSDIG_VERSION=$pkgver \
+        -DUSE_BUNDLED_DEPS=OFF \
+        -DBUILD_DRIVER=OFF \
+        -DBUILD_LIBSCAP_EXAMPLES=OFF
+  make
+}
+
+package_sysdig() {
+  optdepends=('sysdig-dkms: kernel module for live inspection')
+  depends=('jsoncpp' 'libjsoncpp.so' 'luajit' 'curl' 'libcurl.so' 'jq' 'libb64' 'intel-tbb' 'grpc' 'libgrpc++.so' 'yaml-cpp')
+
+  cd "$srcdir"/$pkgbase-$pkgver/build
+  make install DESTDIR="$pkgdir"
+  rm -rf "$pkgdir"/usr/src
+
+  install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
+  install -m644 "$srcdir"/$pkgbase-$pkgver/{NOTICES,COPYING} "$pkgdir"/usr/share/licenses/$pkgname
+}
+
+package_sysdig-dkms() {
+  pkgdesc="DKMS kernel module for sysdig"
+  depends=('sysdig' 'dkms')
+
+  cd "$srcdir"/$pkgbase-$pkgver/build
+  make install DESTDIR="$pkgdir"
+  rm -rf "$pkgdir"/usr/{share,bin}
+
+  install -dm755 "$pkgdir"/usr/share/licenses/$pkgname
+  install -m644 "$srcdir"/$pkgbase-$pkgver/{NOTICES,COPYING} "$pkgdir"/usr/share/licenses/$pkgname
+}

Deleted: bashcomp-location.patch
===================================================================
--- bashcomp-location.patch	2022-06-23 18:10:15 UTC (rev 1239281)
+++ bashcomp-location.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -1,13 +0,0 @@
-diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
-index ded65e9..fd2a59b 100644
---- a/scripts/CMakeLists.txt
-+++ b/scripts/CMakeLists.txt
-@@ -2,7 +2,7 @@ configure_file(debian/postinst.in debian/postinst)
- configure_file(debian/prerm.in debian/prerm)
- 
- install(FILES completions/bash/sysdig
--	DESTINATION "${DIR_ETC}/bash_completion.d")
-+	DESTINATION "share/bash-completion/completions/")
- 
- install(FILES completions/zsh/_sysdig
- 	DESTINATION share/zsh/vendor-completions)

Copied: sysdig/repos/community-x86_64/bashcomp-location.patch (from rev 1239281, sysdig/trunk/bashcomp-location.patch)
===================================================================
--- bashcomp-location.patch	                        (rev 0)
+++ bashcomp-location.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -0,0 +1,13 @@
+diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
+index ded65e9..fd2a59b 100644
+--- a/scripts/CMakeLists.txt
++++ b/scripts/CMakeLists.txt
+@@ -2,7 +2,7 @@ configure_file(debian/postinst.in debian/postinst)
+ configure_file(debian/prerm.in debian/prerm)
+ 
+ install(FILES completions/bash/sysdig
+-	DESTINATION "${DIR_ETC}/bash_completion.d")
++	DESTINATION "share/bash-completion/completions/")
+ 
+ install(FILES completions/zsh/_sysdig
+ 	DESTINATION share/zsh/vendor-completions)

Deleted: falcosecurity-libs-nodownload.patch
===================================================================
--- falcosecurity-libs-nodownload.patch	2022-06-23 18:10:15 UTC (rev 1239281)
+++ falcosecurity-libs-nodownload.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -1,14 +0,0 @@
-diff --git a/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt b/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
-index 712dd8c..98166cd 100644
---- a/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
-+++ b/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
-@@ -25,8 +25,7 @@ message(STATUS "Driver version: ${FALCOSECURITY_LIBS_VERSION}")
- 
- ExternalProject_Add(
-   falcosecurity-libs
--  URL "https://github.com/falcosecurity/libs/archive/${FALCOSECURITY_LIBS_VERSION}.tar.gz"
--  URL_HASH "${FALCOSECURITY_LIBS_CHECKSUM}"
-+  URL "${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs-${FALCOSECURITY_LIBS_VERSION}"
-   CONFIGURE_COMMAND ""
-   BUILD_COMMAND ""
-   INSTALL_COMMAND ""

Copied: sysdig/repos/community-x86_64/falcosecurity-libs-nodownload.patch (from rev 1239281, sysdig/trunk/falcosecurity-libs-nodownload.patch)
===================================================================
--- falcosecurity-libs-nodownload.patch	                        (rev 0)
+++ falcosecurity-libs-nodownload.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -0,0 +1,14 @@
+diff --git a/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt b/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
+index 712dd8c..98166cd 100644
+--- a/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
++++ b/cmake/modules/falcosecurity-libs-repo/CMakeLists.txt
+@@ -25,8 +25,7 @@ message(STATUS "Driver version: ${FALCOSECURITY_LIBS_VERSION}")
+ 
+ ExternalProject_Add(
+   falcosecurity-libs
+-  URL "https://github.com/falcosecurity/libs/archive/${FALCOSECURITY_LIBS_VERSION}.tar.gz"
+-  URL_HASH "${FALCOSECURITY_LIBS_CHECKSUM}"
++  URL "${CMAKE_CURRENT_SOURCE_DIR}/../../../../libs-${FALCOSECURITY_LIBS_VERSION}"
+   CONFIGURE_COMMAND ""
+   BUILD_COMMAND ""
+   INSTALL_COMMAND ""

Deleted: linux-5.6.patch
===================================================================
--- linux-5.6.patch	2022-06-23 18:10:15 UTC (rev 1239281)
+++ linux-5.6.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -1,35 +0,0 @@
-From 55a8525dfffdc18106d981d7a1f70b8bd34d064d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger at applied-asynchrony.com>
-Date: Sat, 4 Apr 2020 17:29:23 +0200
-Subject: [PATCH] Quick fix to compile with kernel 5.6 (#1609)
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Intentionally minimalistic in order to reduce the impact on the codebase
-and (for now) to preserve compile-time compatibility with older kernels.
-
-sysdig-CLA-1.0-signed-off-by: Holger Hoffstätte <holger at applied-asynchrony.com>
----
- driver/ppm.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/driver/ppm.h b/driver/ppm.h
-index acd5fa01f..7efc2c3d6 100644
---- a/driver/ppm.h
-+++ b/driver/ppm.h
-@@ -23,6 +23,14 @@ or GPL2.txt for full copies of the license.
- 
- #include <linux/time.h>
- 
-+#ifndef timespec
-+#define timespec timespec64
-+#define timespec_to_ns timespec64_to_ns
-+#define getnstimeofday ktime_get_real_ts64
-+#define timeval __kernel_old_timeval
-+#define compat_timespec old_timespec32
-+#endif
-+
- /*
-  * Global defines
-  */

Copied: sysdig/repos/community-x86_64/linux-5.6.patch (from rev 1239281, sysdig/trunk/linux-5.6.patch)
===================================================================
--- linux-5.6.patch	                        (rev 0)
+++ linux-5.6.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -0,0 +1,35 @@
+From 55a8525dfffdc18106d981d7a1f70b8bd34d064d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger at applied-asynchrony.com>
+Date: Sat, 4 Apr 2020 17:29:23 +0200
+Subject: [PATCH] Quick fix to compile with kernel 5.6 (#1609)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Intentionally minimalistic in order to reduce the impact on the codebase
+and (for now) to preserve compile-time compatibility with older kernels.
+
+sysdig-CLA-1.0-signed-off-by: Holger Hoffstätte <holger at applied-asynchrony.com>
+---
+ driver/ppm.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/driver/ppm.h b/driver/ppm.h
+index acd5fa01f..7efc2c3d6 100644
+--- a/driver/ppm.h
++++ b/driver/ppm.h
+@@ -23,6 +23,14 @@ or GPL2.txt for full copies of the license.
+ 
+ #include <linux/time.h>
+ 
++#ifndef timespec
++#define timespec timespec64
++#define timespec_to_ns timespec64_to_ns
++#define getnstimeofday ktime_get_real_ts64
++#define timeval __kernel_old_timeval
++#define compat_timespec old_timespec32
++#endif
++
+ /*
+  * Global defines
+  */

Deleted: sme.patch
===================================================================
--- sme.patch	2022-06-23 18:10:15 UTC (rev 1239281)
+++ sme.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -1,59 +0,0 @@
-From 36e945af4feb31c8b875f7d4624592b0c1ff929d Mon Sep 17 00:00:00 2001
-From: Federico Di Pierro <nierro92 at gmail.com>
-Date: Mon, 20 Jun 2022 14:26:39 +0200
-Subject: [PATCH] fix(driver): fixed kmod build on linux kernels >= 5.18.
-
-Signed-off-by: Federico Di Pierro <nierro92 at gmail.com>
----
- driver/main.c | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
-diff --git a/driver/main.c b/driver/main.c
-index 6b5ae461a7..e606cc2f80 100644
---- a/driver/main.c
-+++ b/driver/main.c
-@@ -70,8 +70,9 @@ MODULE_AUTHOR("the Falco authors");
-     #define TRACEPOINT_PROBE(probe, args...) static void probe(void *__data, args)
- #endif
- 
--#ifndef pgprot_encrypted
--#define pgprot_encrypted(x) (x)
-+// Allow build even on arch where PAGE_ENC is not implemented
-+#ifndef _PAGE_ENC
-+#define _PAGE_ENC 0
- #endif
- 
- struct ppm_device {
-@@ -1217,8 +1218,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
- 
- 			pfn = vmalloc_to_pfn(vmalloc_area_ptr);
- 
-+			pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
- 			ret = remap_pfn_range(vma, useraddr, pfn,
--					      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
-+					      PAGE_SIZE, vma->vm_page_prot);
- 			if (ret < 0) {
- 				pr_err("remap_pfn_range failed (1)\n");
- 				goto cleanup_mmap;
-@@ -1255,8 +1257,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
- 			while (mlength > 0) {
- 				pfn = vmalloc_to_pfn(vmalloc_area_ptr);
- 
-+				pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
- 				ret = remap_pfn_range(vma, useraddr, pfn,
--						      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
-+						      PAGE_SIZE, vma->vm_page_prot);
- 				if (ret < 0) {
- 					pr_err("remap_pfn_range failed (1)\n");
- 					goto cleanup_mmap;
-@@ -1277,8 +1280,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
- 			while (mlength > 0) {
- 				pfn = vmalloc_to_pfn(vmalloc_area_ptr);
- 
-+				pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
- 				ret = remap_pfn_range(vma, useraddr, pfn,
--						      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
-+						      PAGE_SIZE, vma->vm_page_prot);
- 				if (ret < 0) {
- 					pr_err("remap_pfn_range failed (1)\n");
- 					goto cleanup_mmap;

Copied: sysdig/repos/community-x86_64/sme.patch (from rev 1239281, sysdig/trunk/sme.patch)
===================================================================
--- sme.patch	                        (rev 0)
+++ sme.patch	2022-06-23 18:10:27 UTC (rev 1239282)
@@ -0,0 +1,59 @@
+From 36e945af4feb31c8b875f7d4624592b0c1ff929d Mon Sep 17 00:00:00 2001
+From: Federico Di Pierro <nierro92 at gmail.com>
+Date: Mon, 20 Jun 2022 14:26:39 +0200
+Subject: [PATCH] fix(driver): fixed kmod build on linux kernels >= 5.18.
+
+Signed-off-by: Federico Di Pierro <nierro92 at gmail.com>
+---
+ driver/main.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/driver/main.c b/driver/main.c
+index 6b5ae461a7..e606cc2f80 100644
+--- a/driver/main.c
++++ b/driver/main.c
+@@ -70,8 +70,9 @@ MODULE_AUTHOR("the Falco authors");
+     #define TRACEPOINT_PROBE(probe, args...) static void probe(void *__data, args)
+ #endif
+ 
+-#ifndef pgprot_encrypted
+-#define pgprot_encrypted(x) (x)
++// Allow build even on arch where PAGE_ENC is not implemented
++#ifndef _PAGE_ENC
++#define _PAGE_ENC 0
+ #endif
+ 
+ struct ppm_device {
+@@ -1217,8 +1218,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
+ 
+ 			pfn = vmalloc_to_pfn(vmalloc_area_ptr);
+ 
++			pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
+ 			ret = remap_pfn_range(vma, useraddr, pfn,
+-					      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
++					      PAGE_SIZE, vma->vm_page_prot);
+ 			if (ret < 0) {
+ 				pr_err("remap_pfn_range failed (1)\n");
+ 				goto cleanup_mmap;
+@@ -1255,8 +1257,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
+ 			while (mlength > 0) {
+ 				pfn = vmalloc_to_pfn(vmalloc_area_ptr);
+ 
++				pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
+ 				ret = remap_pfn_range(vma, useraddr, pfn,
+-						      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
++						      PAGE_SIZE, vma->vm_page_prot);
+ 				if (ret < 0) {
+ 					pr_err("remap_pfn_range failed (1)\n");
+ 					goto cleanup_mmap;
+@@ -1277,8 +1280,9 @@ static int ppm_mmap(struct file *filp, struct vm_area_struct *vma)
+ 			while (mlength > 0) {
+ 				pfn = vmalloc_to_pfn(vmalloc_area_ptr);
+ 
++				pgprot_val(vma->vm_page_prot) = pgprot_val(PAGE_SHARED) | _PAGE_ENC;
+ 				ret = remap_pfn_range(vma, useraddr, pfn,
+-						      PAGE_SIZE, pgprot_encrypted(PAGE_SHARED));
++						      PAGE_SIZE, vma->vm_page_prot);
+ 				if (ret < 0) {
+ 					pr_err("remap_pfn_range failed (1)\n");
+ 					goto cleanup_mmap;



More information about the arch-commits mailing list