Package Details: linux-sgx-driver-dkms-git 2.14.r2.b6f5b4a-1

Git Clone URL: https://aur.archlinux.org/linux-sgx-driver-dkms-git.git (read-only, click to copy)
Package Base: linux-sgx-driver-dkms-git
Description: Intel® SGX Linux module - dkms
Upstream URL: https://01.org/intel-softwareguard-extensions
Keywords: dkms intel isgx sgx
Licenses: GPL2
Submitter: robertfoster
Maintainer: robertfoster
Last Packager: robertfoster
Votes: 2
Popularity: 0.000000
First Submitted: 2017-08-07 12:47 (UTC)
Last Updated: 2024-03-23 11:47 (UTC)

Dependencies (4)

Required by (0)

Sources (3)

Latest Comments

Cryen commented on 2025-03-02 00:06 (UTC)

Encountered a warning similar to what emphire reported on.

Error! Bad return status for module build on kernel: 6.13.5-zen1-1-zen (x86_64)
Consult /var/lib/dkms/linux-sgx-driver/2.14.r5.bd80d04/build/make.log for more information.
==> WARNING: `dkms install --no-depmod linux-sgx-driver/2.14.r5.bd80d04 -k 6.13.5-zen1-1-zen' exited 10

The mentioned log:

DKMS (dkms-3.1.5) make.log for linux-sgx-driver/2.14.r5.bd80d04 for kernel 6.13.5-zen1-1-zen (x86_64)
Sun Mar  2 12:34:39 AM CET 2025
Cleaning build area
# command: make clean
rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .*o.cmd *.mod

# exit code: 0
# elapsed time: 00:00:00
Building module(s)
# command: KDIR=/usr/lib/modules/6.13.5-zen1-1-zen/build make
make -C /lib/modules/6.13.5-zen1-1-zen/build M=/var/lib/dkms/linux-sgx-driver/2.14.r5.bd80d04/build modules
make[1]: Entering directory '/usr/lib/modules/6.13.5-zen1-1-zen/build'
make[2]: Entering directory '/var/lib/dkms/linux-sgx-driver/2.14.r5.bd80d04/build'
  CC [M]  sgx_main.o
sgx_main.c: In function ‘sgx_get_unmapped_area’:
sgx_main.c:143:27: error: ‘struct mm_struct’ has no member named ‘get_unmapped_area’
  143 |         addr = current->mm->get_unmapped_area(file, addr, 2 * len, pgoff,
      |                           ^~
sgx_main.c: At top level:
sgx_main.c:381:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Wincompatible-pointer-types]
  381 |         .remove = sgx_drv_remove,
      |                   ^~~~~~~~~~~~~~
sgx_main.c:381:19: note: (near initialization for ‘sgx_drv.remove’)
sgx_main.c:390:5: warning: no previous prototype for ‘init_sgx_module’ [-Wmissing-prototypes]
  390 | int init_sgx_module(void)
      |     ^~~~~~~~~~~~~~~
sgx_main.c:399:6: warning: no previous prototype for ‘cleanup_sgx_module’ [-Wmissing-prototypes]
  399 | void cleanup_sgx_module(void)
      |      ^~~~~~~~~~~~~~~~~~
make[4]: *** [/usr/lib/modules/6.13.5-zen1-1-zen/build/scripts/Makefile.build:196: sgx_main.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.5-zen1-1-zen/build/Makefile:1982: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.5-zen1-1-zen/build/Makefile:251: __sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/linux-sgx-driver/2.14.r5.bd80d04/build'
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.13.5-zen1-1-zen/build'
make: *** [Makefile:16: default] Error 2

# exit code: 2
# elapsed time: 00:00:03

cshjsc commented on 2023-07-10 16:42 (UTC) (edited on 2023-07-10 16:42 (UTC) by cshjsc)

Doesn't work for kernel version 6.* I get the error error: assignment of read-only member ‘vm_flags’ 112 | vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO

I fixed it by doing this vm_flags_set(vma, (VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO | VM_DONTCOPY));

on the file sgx_main.c

emphire commented on 2020-12-31 08:00 (UTC)

Here is an updated PKGBUILD with a patch to fix the dkms issue. https://gist.github.com/jonjonw/a73bec49fca124b51f6d09f4245ed3e6

emphire commented on 2020-12-06 22:07 (UTC) (edited on 2020-12-06 23:03 (UTC) by emphire)

I think the dkms.conf file needs tweaking. I get the following when upgrading my kernel:

==> dkms install --no-depmod -m linux-sgx-driver -v 2.11.r4.g4505f07 -k 5.9.12-arch1-1 Error! Bad return status for module build on kernel: 5.9.12-arch1-1 (x86_64) Consult /var/lib/dkms/linux-sgx-driver/2.11.r4.g4505f07/build/make.log for more information. ==> Warning, `dkms install --no-depmod -m linux-sgx-driver -v 2.11.r4.g4505f07 -k 5.9.12-arch1-1' returned 10

% cat /var/lib/dkms/linux-sgx-driver/2.11.r4.g4505f07/build/make.log DKMS make.log for linux-sgx-driver-2.11.r4.g4505f07 for kernel 5.9.12-arch1-1 (x86_64) Sun Dec 6 01:59:39 PM PST 2020 make -C /lib/modules/5.9.11-zen2-1-zen/build M=/var/lib/dkms/linux-sgx-driver/2.11.r4.g4505f07/build modules make[1]: /lib/modules/5.9.11-zen2-1-zen/build: No such file or directory. Stop. make: [Makefile:16: default] Error 2

None of my other dkms modules fail.

Perhaps it would help to restructure the package to the dkms package guidelines: https://wiki.archlinux.org/index.php/DKMS_package_guidelines

m3thodic commented on 2019-06-13 18:25 (UTC) (edited on 2019-06-13 18:26 (UTC) by m3thodic)

Here's the latest PKGBUILD that works for me:

https://gist.github.com/tonylambiris/0163d89ab6d0c27a6bc4a2aa98552d1d

m3thodic commented on 2019-05-10 23:53 (UTC)

The latest commit isn't able to be built due to an issue with the pkgver() function:

==> Starting pkgver()...
==> ERROR: pkgver is not allowed to contain colons, forward slashes, hyphens or whitespace.
==> ERROR: pkgver() generated an invalid version: 2.5-2-g10a2f21
zsh: exit 12    makepkg -sfC

This fixes the issue:

pkgver() {
    cd $srcdir/$pkg
    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

Thanks!

robertfoster commented on 2018-01-25 17:18 (UTC)

@abozanich added, when official repo merge your edits, I'll remove the sed ;)

abozanich commented on 2018-01-25 04:24 (UTC)

I made a patch for 4.14+ kernels here: https://gist.github.com/boz/bdaf3f978ad9c06424a933b61e980ae1

The "-O0" make flag causes problems for some reason. I've made a PR for the upstream package here: https://github.com/intel/linux-sgx-driver/pull/52