summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2016-03-21 23:54:07 +0100
committerMichael Lass2016-03-21 23:54:07 +0100
commit65d7a20cfa90e4c64b35934e5551355bf60ff122 (patch)
treea89f4c18a37c6557c45ef2973a0fa4bc2c1d0b8e
parent26dae7401a4b95ad1f09de058d5f46d22295e218 (diff)
downloadaur-65d7a20cfa90e4c64b35934e5551355bf60ff122.tar.gz
Update to 1.6.17 and add patches for Linux 4.4
-rw-r--r--.SRCINFO14
-rw-r--r--0001-Linux-4.4-key_payload-has-no-member-value.patch84
-rw-r--r--0002-Linux-4.4-Use-locks_lock_file_wait.patch56
-rw-r--r--0003-Linux-4.4-Do-not-use-splice.patch114
-rw-r--r--PKGBUILD19
5 files changed, 279 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba8e4e95062..69216d387b0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Thu Dec 17 18:36:38 UTC 2015
+# Mon Mar 21 22:35:32 UTC 2016
pkgbase = openafs-modules
pkgdesc = Kernel module for OpenAFS
- pkgver = 1.6.16
+ pkgver = 1.6.17
pkgrel = 1
url = http://www.openafs.org
install = openafs-modules.install
@@ -15,8 +15,14 @@ pkgbase = openafs-modules
conflicts = openafs-features-libafs
conflicts = openafs<1.6.6-2
options = !emptydirs
- source = http://openafs.org/dl/1.6.16/openafs-1.6.16-src.tar.bz2
- sha256sums = 3431702bdcbd1b27833060c50869e618a192495877ebb0a66e4610de0b48eb81
+ source = http://openafs.org/dl/1.6.17/openafs-1.6.17-src.tar.bz2
+ source = 0001-Linux-4.4-key_payload-has-no-member-value.patch
+ source = 0002-Linux-4.4-Use-locks_lock_file_wait.patch
+ source = 0003-Linux-4.4-Do-not-use-splice.patch
+ sha256sums = 96413a2dbffdc9170cc5dde6aa5ad0ae2383c6106994285ed8f186928813a398
+ sha256sums = f498b60b99f75a2cfbe01cc91c5de0585c225231b4850816c8b080edd7402a98
+ sha256sums = ff962b1bcfeedaed0f74570e8d248b4e42a3391654bf49b4bb25e19d80b6c4ac
+ sha256sums = 2c2c14f2f1f88eb43a7160f3112cd63e4ea74884322b76b71308b88b32caafdb
pkgname = openafs-modules
diff --git a/0001-Linux-4.4-key_payload-has-no-member-value.patch b/0001-Linux-4.4-key_payload-has-no-member-value.patch
new file mode 100644
index 00000000000..68f429af739
--- /dev/null
+++ b/0001-Linux-4.4-key_payload-has-no-member-value.patch
@@ -0,0 +1,84 @@
+From 2d524981c32ac8f502fa344aac1a4952c64078f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de>
+Date: Mon, 18 Jan 2016 18:29:00 +0100
+Subject: [PATCH 1/3] Linux 4.4: key_payload has no member 'value'
+
+In Linux 4.4 (146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc) type-specific and
+payload data have been merged. The payload is now accessed directly and has
+no 'value' member anymore.
+
+FIXES 132677
+
+Reviewed-on: https://gerrit.openafs.org/12169
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Tested-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit 5067ee3ae11932a3f1c972c8f88b20afbd9e1d88)
+
+Change-Id: I5a3e89b2676b463935e9a77042cbcd8ab812dc68
+---
+ acinclude.m4 | 1 +
+ src/afs/LINUX/osi_groups.c | 16 +++++++++++++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index b1444a1..a7a7cb6 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -882,6 +882,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
+ AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h])
+ AC_CHECK_LINUX_STRUCT([file_system_type], [mount], [fs.h])
+ AC_CHECK_LINUX_STRUCT([inode_operations], [truncate], [fs.h])
++ AC_CHECK_LINUX_STRUCT([key], [payload.value], [key.h])
+ AC_CHECK_LINUX_STRUCT([key_type], [instantiate_prep], [key-type.h])
+ AC_CHECK_LINUX_STRUCT([key_type], [match_preparse], [key-type.h])
+ AC_CHECK_LINUX_STRUCT([key_type], [preparse], [key-type.h])
+diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c
+index 3b068e5..a83bcb9 100644
+--- a/src/afs/LINUX/osi_groups.c
++++ b/src/afs/LINUX/osi_groups.c
+@@ -489,7 +489,11 @@ static int afs_pag_instantiate(struct key *key, const void *data, size_t datalen
+ if (*userpag != pag)
+ goto error;
+
++#if defined(STRUCT_KEY_HAS_PAYLOAD_VALUE)
+ key->payload.value = (unsigned long) *userpag;
++#else
++ memcpy(&key->payload, userpag, sizeof(afs_uint32));
++#endif
+ key->datalen = sizeof(afs_uint32);
+ code = 0;
+
+@@ -513,9 +517,15 @@ static int afs_pag_match(const struct key *key, const void *description)
+
+ static void afs_pag_destroy(struct key *key)
+ {
+- afs_uint32 pag = key->payload.value;
++ afs_uint32 pag;
+ int locked = ISAFS_GLOCK();
+
++#if defined(STRUCT_KEY_HAS_PAYLOAD_VALUE)
++ pag = key->payload.value;
++#else
++ memcpy(&pag, &key->payload, sizeof(afs_uint32));
++#endif
++
+ if (!locked)
+ AFS_GLOCK();
+
+@@ -609,7 +619,11 @@ osi_get_keyring_pag(afs_ucred_t *cred)
+
+ if (!IS_ERR(key)) {
+ if (key_validate(key) == 0 && uid_eq(key->uid, GLOBAL_ROOT_UID)) { /* also verify in the session keyring? */
++#if defined(STRUCT_KEY_HAS_PAYLOAD_VALUE)
+ keyring_pag = key->payload.value;
++#else
++ memcpy(&keyring_pag, &key->payload, sizeof(afs_int32));
++#endif
+ /* Only set PAG in groups if needed,
+ * and the creds are from the current process */
+ if (afs_linux_cred_is_current(cred) &&
+--
+2.7.4
+
diff --git a/0002-Linux-4.4-Use-locks_lock_file_wait.patch b/0002-Linux-4.4-Use-locks_lock_file_wait.patch
new file mode 100644
index 00000000000..0f0bc4f1efb
--- /dev/null
+++ b/0002-Linux-4.4-Use-locks_lock_file_wait.patch
@@ -0,0 +1,56 @@
+From b7b656c5240eb4b62a5905370759daa4f1b03521 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de>
+Date: Mon, 18 Jan 2016 19:58:00 +0100
+Subject: [PATCH 2/3] Linux 4.4: Use locks_lock_file_wait
+
+The locks API was changed in Linux 4.4, introducing locks_lock_file_wait
+(e55c34a66f87e78fb1fc6b623b78c5ad74b475af) and removing
+flock_lock_file_wait (616fb38fa7a9599293e05ae1fa9acfaf73922434).
+
+locks_lock_file_wait can be used as a drop-in replacement so define
+flock_lock_file_wait as an alias for it.
+
+Reviewed-on: https://gerrit.openafs.org/12170
+Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+(cherry picked from commit 58d82226a555d3781a5cb45e5cc177727628ebd8)
+
+Change-Id: Icceae3906c1a612fb9104b860e519bb7f94d25d3
+---
+ acinclude.m4 | 3 +++
+ src/afs/LINUX/osi_compat.h | 4 ++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index a7a7cb6..afad50b 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -976,6 +976,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
+ AC_CHECK_LINUX_FUNC([kernel_setsockopt],
+ [#include <linux/net.h>],
+ [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
++ AC_CHECK_LINUX_FUNC([locks_lock_file_wait],
++ [#include <linux/fs.h>],
++ [locks_lock_file_wait(NULL, NULL);])
+ AC_CHECK_LINUX_FUNC([page_follow_link],
+ [#include <linux/fs.h>],
+ [page_follow_link(0,0);])
+diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
+index 47450e6..4d484c1 100644
+--- a/src/afs/LINUX/osi_compat.h
++++ b/src/afs/LINUX/osi_compat.h
+@@ -47,6 +47,10 @@ typedef struct path afs_linux_path_t;
+ # endif
+ #endif
+
++#if defined(HAVE_LINUX_LOCKS_LOCK_FILE_WAIT)
++# define flock_lock_file_wait locks_lock_file_wait
++#endif
++
+ #if !defined(HAVE_LINUX_DO_SYNC_READ) && !defined(STRUCT_FILE_OPERATIONS_HAS_READ_ITER)
+ static inline int
+ do_sync_read(struct file *fp, char *buf, size_t count, loff_t *offp) {
+--
+2.7.4
+
diff --git a/0003-Linux-4.4-Do-not-use-splice.patch b/0003-Linux-4.4-Do-not-use-splice.patch
new file mode 100644
index 00000000000..4eef0bcc2a0
--- /dev/null
+++ b/0003-Linux-4.4-Do-not-use-splice.patch
@@ -0,0 +1,114 @@
+From c664b14959c366ff5fb36ce9b7934df61f44828d Mon Sep 17 00:00:00 2001
+From: Stephan Wiesand <stephan.wiesand@desy.de>
+Date: Tue, 8 Mar 2016 14:15:17 +0100
+Subject: [PATCH 3/3] Linux 4.4: Do not use splice()
+
+splice() may return -ERESTARTSYS if there are pending signals, and
+it's not even clear how this should be dealt with. This potential
+problem has been present for a long time, but as of Linux 4.4
+(commit c725bfce7968009756ed2836a8cd7ba4dc163011) seems much more
+likely to happen.
+
+Until resources are available to fix the code to handle such errors,
+avoid the riskier uses of splice().
+
+If there is a default implementation of file_splice_{write,read},
+use that; on somewhat older kernels where it is not available,
+use the generic version instead.
+
+[kaduk@mit.edu: add test for default_file_splice_write]
+
+Reviewed-on: https://gerrit.openafs.org/12217
+Reviewed-by: Chas Williams <3chas3@gmail.com>
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+(cherry picked from commit ae5f411c3b374367ab8ae69488f78f8e0484ce48)
+
+Change-Id: I40dd0d60caece6379a62674defb8d46a2bfadad6
+---
+ acinclude.m4 | 3 +++
+ src/afs/LINUX/osi_fetchstore.c | 6 ++++--
+ src/afs/LINUX/osi_vnodeops.c | 2 +-
+ src/afs/afs_fetchstore.c | 2 +-
+ 4 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index afad50b..09ae278 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -1010,6 +1010,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
+ AC_CHECK_LINUX_FUNC([splice_direct_to_actor],
+ [#include <linux/splice.h>],
+ [splice_direct_to_actor(NULL,NULL,NULL);])
++ AC_CHECK_LINUX_FUNC([default_file_splice_read],
++ [#include <linux/fs.h>],
++ [default_file_splice_read(NULL,NULL,NULL, 0, 0);])
+ AC_CHECK_LINUX_FUNC([svc_addr_in],
+ [#include <linux/sunrpc/svc.h>],
+ [svc_addr_in(NULL);])
+diff --git a/src/afs/LINUX/osi_fetchstore.c b/src/afs/LINUX/osi_fetchstore.c
+index 4089bbb..997c1aa 100644
+--- a/src/afs/LINUX/osi_fetchstore.c
++++ b/src/afs/LINUX/osi_fetchstore.c
+@@ -38,7 +38,7 @@
+ #include "afs/param.h"
+
+ #include <linux/fs.h>
+-#if defined(HAVE_LINUX_SPLICE_DIRECT_TO_ACTOR)
++#if 0 && defined(HAVE_LINUX_SPLICE_DIRECT_TO_ACTOR)
+ # include <linux/splice.h>
+ #else
+ # include <linux/pipe_fs_i.h>
+@@ -47,7 +47,7 @@
+ #include "afs/sysincludes.h"
+ #include "afsincludes.h"
+
+-#if defined(HAVE_LINUX_SPLICE_DIRECT_TO_ACTOR)
++#if 0 && defined(HAVE_LINUX_SPLICE_DIRECT_TO_ACTOR)
+ static int
+ afs_linux_splice_actor(struct pipe_inode_info *pipe,
+ struct pipe_buffer *buf,
+@@ -151,6 +151,7 @@ afs_linux_read_actor(read_descriptor_t *desc, struct page *page,
+ return size;
+ }
+
++#if 0
+ afs_int32
+ afs_linux_storeproc(struct storeOps *ops, void *rock, struct dcache *tdc,
+ int *shouldwake, afs_size_t *bytesXferred)
+@@ -184,5 +185,6 @@ afs_linux_storeproc(struct storeOps *ops, void *rock, struct dcache *tdc,
+
+ return code;
+ }
++#endif
+
+ #endif
+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
+index ae0513c..2a83fc0 100644
+--- a/src/afs/LINUX/osi_vnodeops.c
++++ b/src/afs/LINUX/osi_vnodeops.c
+@@ -834,7 +834,7 @@ struct file_operations afs_file_fops = {
+ #if defined(STRUCT_FILE_OPERATIONS_HAS_SENDFILE)
+ .sendfile = generic_file_sendfile,
+ #endif
+-#if defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE)
++#if defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE) && !defined(HAVE_LINUX_DEFAULT_FILE_SPLICE_READ)
+ # if defined(HAVE_LINUX_ITER_FILE_SPLICE_WRITE)
+ .splice_write = iter_file_splice_write,
+ # else
+diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
+index 38b064c..98544fe 100644
+--- a/src/afs/afs_fetchstore.c
++++ b/src/afs/afs_fetchstore.c
+@@ -329,7 +329,7 @@ struct storeOps rxfs_storeUfsOps = {
+ .padd = rxfs_storePadd,
+ .close = rxfs_storeClose,
+ .destroy = rxfs_storeDestroy,
+-#ifdef AFS_LINUX26_ENV
++#if 0 && defined(AFS_LINUX26_ENV)
+ .storeproc = afs_linux_storeproc
+ #else
+ .storeproc = afs_GenericStoreProc
+--
+2.7.4
+
diff --git a/PKGBUILD b/PKGBUILD
index 7027a45e0dc..db0e4b83a2b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=openafs-modules
_srcname=openafs
-pkgver=1.6.16
+pkgver=1.6.17
pkgrel=1
pkgdesc="Kernel module for OpenAFS"
arch=('i686' 'x86_64' 'armv7h')
@@ -15,9 +15,15 @@ depends=('openafs')
makedepends=('linux-headers')
conflicts=('openafs-features-libafs' 'openafs<1.6.6-2')
options=(!emptydirs)
-source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2)
+source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2
+ 0001-Linux-4.4-key_payload-has-no-member-value.patch
+ 0002-Linux-4.4-Use-locks_lock_file_wait.patch
+ 0003-Linux-4.4-Do-not-use-splice.patch)
install=openafs-modules.install
-sha256sums=('3431702bdcbd1b27833060c50869e618a192495877ebb0a66e4610de0b48eb81')
+sha256sums=('96413a2dbffdc9170cc5dde6aa5ad0ae2383c6106994285ed8f186928813a398'
+ 'f498b60b99f75a2cfbe01cc91c5de0585c225231b4850816c8b080edd7402a98'
+ 'ff962b1bcfeedaed0f74570e8d248b4e42a3391654bf49b4bb25e19d80b6c4ac'
+ '2c2c14f2f1f88eb43a7160f3112cd63e4ea74884322b76b71308b88b32caafdb')
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
@@ -27,8 +33,13 @@ _kernelver=$(cat ${_extramodules}/version)
prepare() {
cd ${srcdir}/${_srcname}-${pkgver}
+ # Patches required to build against Linux 4.4
+ patch -p1 < ${srcdir}/0001-Linux-4.4-key_payload-has-no-member-value.patch
+ patch -p1 < ${srcdir}/0002-Linux-4.4-Use-locks_lock_file_wait.patch
+ patch -p1 < ${srcdir}/0003-Linux-4.4-Do-not-use-splice.patch
+
# Only needed when changes to configure were made
- #./regen.sh -q
+ ./regen.sh -q
}
build() {