diff options
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 0001-Avoid-duplicate-definitions-of-globals.patch | 353 | ||||
-rw-r--r-- | 0001-Temporary-fix-for-compilation-with-GCC-10.patch | 33 | ||||
-rw-r--r-- | 0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch | 4 | ||||
-rw-r--r-- | 0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch | 4 | ||||
-rw-r--r-- | 0004-LINUX-5.8-use-lru_cache_add.patch | 4 | ||||
-rw-r--r-- | 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch | 4 | ||||
-rw-r--r-- | 0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch | 48 | ||||
-rw-r--r-- | 0007-rx-update_nextCid-overflow-handling-is-broken.patch | 62 | ||||
-rw-r--r-- | 0008-Remove-overflow-check-from-update_nextCid.patch | 49 | ||||
-rw-r--r-- | PKGBUILD | 38 |
11 files changed, 384 insertions, 243 deletions
@@ -1,7 +1,7 @@ pkgbase = openafs-modules-dkms pkgdesc = Kernel module for OpenAFS (dkms) - pkgver = 1.8.6 - pkgrel = 5 + pkgver = 1.8.7 + pkgrel = 1 url = http://www.openafs.org arch = i686 arch = x86_64 @@ -10,31 +10,25 @@ pkgbase = openafs-modules-dkms depends = dkms depends = libelf depends = openafs - provides = openafs-modules=1.8.6 + provides = openafs-modules=1.8.7 conflicts = openafs-features-libafs conflicts = openafs-modules conflicts = openafs<1.6.6-2 options = !emptydirs - source = http://openafs.org/dl/openafs/1.8.6/openafs-1.8.6-src.tar.bz2 + source = http://openafs.org/dl/openafs/1.8.7/openafs-1.8.7-src.tar.bz2 source = dkms.conf - source = 0001-Temporary-fix-for-compilation-with-GCC-10.patch + source = 0001-Avoid-duplicate-definitions-of-globals.patch source = 0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch source = 0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch source = 0004-LINUX-5.8-use-lru_cache_add.patch source = 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch - source = 0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - source = 0007-rx-update_nextCid-overflow-handling-is-broken.patch - source = 0008-Remove-overflow-check-from-update_nextCid.patch - sha256sums = 8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945 + sha256sums = 53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79 sha256sums = 5ea5e184f9b44f5ed45817d2b5a10149d15c8c54f49e0b5b4b773652673cb9b0 - sha256sums = 8f4145f5eaf148b231a06aa6fe4a0271fa3c63506bc4e8e504984bb57326d054 - sha256sums = cd2bb4125b7995f547767abced93a8e0ffd39ceec2aafda6a87abb11c04ef64f - sha256sums = 0f147adc83adfc959eb20794410df9cea339253ad79175bc22b4cdb6e21b8c3d - sha256sums = 4987b2800e18d890c7f17f4f0866812bbf9b9d9a2b5f97a1974d119106306b17 - sha256sums = 50ffd1efbbc6f6977e900cd8623988168d67d821c78def27fae6312d920bc901 - sha256sums = 3154052cc77b32ccafc5be86c1540b5253de2a1de5f3a87bbe6a771946bc45c1 - sha256sums = 714e862d31afbcf49b3a1d711fccb64c269153a73e7bfd0b0483dbae109fd177 - sha256sums = 00db4b504667f9f3182cf35ed48fb0ef8f16b5d6e97df5454efb2b3e5d914111 + sha256sums = 18634d85ca4dec3366533a2767e652dab27202667de1d04f578f40a94d8ec15a + sha256sums = 4b9d269e2b3c214f9240917b9d895b41e09c1afdbef75e30a0db02a240bf9b0e + sha256sums = 9e630d2029c113f482c321007522ce887273250c4125aa6fee1229aa78e8f8c3 + sha256sums = 6deaa098e7e6113c426d9449c5b6252c76dfbe4a67705420215ae501de8e9f0d + sha256sums = 3a0a022a8a4cb1034e60dec9c55727e1be846080f5923a7edcc7e18fe6b57606 pkgname = openafs-modules-dkms diff --git a/0001-Avoid-duplicate-definitions-of-globals.patch b/0001-Avoid-duplicate-definitions-of-globals.patch new file mode 100644 index 000000000000..a2f77c7e0ed3 --- /dev/null +++ b/0001-Avoid-duplicate-definitions-of-globals.patch @@ -0,0 +1,353 @@ +From ac4debb46bc0b95ff2f98d416703bc8df60b8415 Mon Sep 17 00:00:00 2001 +From: Cheyenne Wills <cwills@sinenomine.net> +Date: Fri, 22 May 2020 12:16:48 -0600 +Subject: [PATCH 1/5] Avoid duplicate definitions of globals + +GCC 10 changed a default flag from -fcommon to -fno-common. See +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 for some background. + +The change in gcc 10 results in build link-time errors. For example: + ../../src/xstat/.libs/liboafs_xstat_cm.a(xstat_cm.o):(.bss+0x2050): + multiple definition of `numCollections'; + +Ensure that only one definition for global data objects exist and change +references to use "extern" as needed. + +To ensure that future changes do not introduce duplicated global +definitions, add the -fno-common flag to XCFLAGS when using the +configure --enable-checking setting. + +[cwills@sinenomine.net: Note for 1.8.x: renamed terminationEvent +to cm_terminationEvent/fs_terminationEvent instead of deleting it.] + +Reviewed-on: https://gerrit.openafs.org/14106 +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +(cherry picked from commit 0e2072ae386d4111bef161eb955964b649c31386) + +Change-Id: I54ca61d372cf763e4a28c0b0829ea361219f6203 +Reviewed-on: https://gerrit.openafs.org/14217 +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Mark Vitale <mvitale@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> +--- + src/bucoord/main.c | 6 ++---- + src/butc/dbentries.c | 2 +- + src/butc/dump.c | 7 +++---- + src/butc/lwps.c | 2 +- + src/butc/tcmain.c | 2 +- + src/cf/osconf.m4 | 2 +- + src/fsprobe/fsprobe.h | 1 - + src/uss/uss_vol.c | 2 +- + src/viced/host.c | 2 ++ + src/viced/host.h | 2 +- + src/vol/fssync-server.c | 3 --- + src/vol/volume.c | 3 --- + src/xstat/xstat_cm.c | 7 +++---- + src/xstat/xstat_cm.h | 3 +-- + src/xstat/xstat_cm_test.c | 4 ++-- + src/xstat/xstat_fs.c | 7 +++---- + src/xstat/xstat_fs.h | 3 +-- + src/xstat/xstat_fs_test.c | 4 ++-- + 18 files changed, 25 insertions(+), 37 deletions(-) + +diff --git a/src/bucoord/main.c b/src/bucoord/main.c +index d2a5f368b..a453cc9dd 100644 +--- a/src/bucoord/main.c ++++ b/src/bucoord/main.c +@@ -47,9 +47,9 @@ char tcell[64]; + /* + * Global configuration information for the Backup Coordinator. + */ +-struct bc_config *bc_globalConfig; /*Ptr to global BC configuration info */ ++extern struct bc_config *bc_globalConfig; /*Ptr to global BC configuration info */ + +-struct ubik_client *cstruct; /* Ptr to Ubik client structure */ ++extern struct ubik_client *cstruct; /* Ptr to Ubik client structure */ + time_t tokenExpires; /* The token's expiration time */ + + static const char *DefaultConfDir; /*Default backup config directory */ +@@ -162,8 +162,6 @@ bc_InitTextConfig(void) + udbClientTextP ctPtr; + int i; + +- extern struct bc_config *bc_globalConfig; +- + mkdir(DefaultConfDir, 777); /* temporary */ + + /* initialize the client text structures */ +diff --git a/src/butc/dbentries.c b/src/butc/dbentries.c +index 37b35d307..29ddcbd01 100644 +--- a/src/butc/dbentries.c ++++ b/src/butc/dbentries.c +@@ -31,7 +31,7 @@ + #include "error_macros.h" + + dlqlinkT savedEntries; +-dlqlinkT entries_to_flush; ++static dlqlinkT entries_to_flush; + + int dbWatcherinprogress; + +diff --git a/src/butc/dump.c b/src/butc/dump.c +index 1f4eb9b8f..f8fc943a6 100644 +--- a/src/butc/dump.c ++++ b/src/butc/dump.c +@@ -42,8 +42,7 @@ extern int isafile; + extern int forcemultiple; + + extern struct ubik_client *cstruct; +-dlqlinkT savedEntries; +-dlqlinkT entries_to_flush; ++extern dlqlinkT savedEntries; + + extern afs_int32 groupId; + extern afs_int32 BufferSize; +@@ -61,8 +60,8 @@ extern char *xbsalGName; + extern char *globalButcLog; + #endif /*xbsa */ + +-afs_int32 dataSize; /* Size of data to read on each rx_Read() call */ +-afs_int32 tapeblocks; /* Number of 16K tape datablocks in buffer (!CONF_XBSA) */ ++extern afs_int32 dataSize; /* Size of data to read on each rx_Read() call */ ++extern afs_int32 tapeblocks; /* Number of 16K tape datablocks in buffer (!CONF_XBSA) */ + + /* TBD + * +diff --git a/src/butc/lwps.c b/src/butc/lwps.c +index d262991d8..aff5e9e07 100644 +--- a/src/butc/lwps.c ++++ b/src/butc/lwps.c +@@ -51,7 +51,7 @@ extern int forcemultiple; + #endif + + /* XBSA Global Parameters */ +-afs_int32 xbsaType; ++extern afs_int32 xbsaType; + #ifdef xbsa + struct butx_transactionInfo butxInfo; + #endif +diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c +index e8a20938e..a0298addb 100644 +--- a/src/butc/tcmain.c ++++ b/src/butc/tcmain.c +@@ -66,7 +66,7 @@ + #define TL_PREFIX "TL" + #define CFG_PREFIX "CFG" + +-struct ubik_client *cstruct; ++extern struct ubik_client *cstruct; + FILE *logIO, *ErrorlogIO, *centralLogIO, *lastLogIO; + char lFile[AFSDIR_PATH_MAX]; + char logFile[AFSDIR_PATH_MAX + 256]; +diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 +index 5f0d73fc2..e36152bd4 100644 +--- a/src/cf/osconf.m4 ++++ b/src/cf/osconf.m4 +@@ -672,7 +672,7 @@ if test "x$GCC" = "xyes"; then + XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith" + fi + if test "x$enable_checking" != "xno"; then +- XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith" ++ XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith -fno-common" + if test "x$enable_checking" != "xall"; then + CFLAGS_NOERROR="-Wno-error" + CFLAGS_NOUNUSED="-Wno-unused" +diff --git a/src/fsprobe/fsprobe.h b/src/fsprobe/fsprobe.h +index 94083bfe9..3060371ae 100644 +--- a/src/fsprobe/fsprobe.h ++++ b/src/fsprobe/fsprobe.h +@@ -103,7 +103,6 @@ struct fsprobe_ProbeResults { + + extern int fsprobe_numServers; /*# servers connected */ + extern struct fsprobe_ConnectionInfo *fsprobe_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct fsprobe_ProbeResults fsprobe_Results; /*Latest probe results */ + + extern int fsprobe_Init(int, struct sockaddr_in *, int, int (*)(void), int ); +diff --git a/src/uss/uss_vol.c b/src/uss/uss_vol.c +index c9c13941d..b31a42a06 100644 +--- a/src/uss/uss_vol.c ++++ b/src/uss/uss_vol.c +@@ -61,7 +61,7 @@ extern int line; + * will work and we can avoid nasty little core dumps. + */ + struct ubik_client *uconn_vldbP; /*Ubik connection struct */ +-struct ubik_client *cstruct; /*Required name for above */ ++extern struct ubik_client *cstruct; /*Required name for above */ + + /* + * ------------------------ Private globals ----------------------- +diff --git a/src/viced/host.c b/src/viced/host.c +index 36f9e88c0..e7657caac 100644 +--- a/src/viced/host.c ++++ b/src/viced/host.c +@@ -67,6 +67,8 @@ int hostCount = 0; /* number of hosts in hostList */ + int rxcon_ident_key; + int rxcon_client_key; + ++struct host *(hosttableptrs[h_MAXHOSTTABLES]); ++ + static struct rx_securityClass *sc = NULL; + static int h_quota_limit; + +diff --git a/src/viced/host.h b/src/viced/host.h +index fead948f6..272dcdbe7 100644 +--- a/src/viced/host.h ++++ b/src/viced/host.h +@@ -254,7 +254,7 @@ extern int h_RestoreState(void); + #define H_ENUMERATE_BAIL(flags) ((flags)|0x80000000) + #define H_ENUMERATE_ISSET_BAIL(flags) ((flags)&0x80000000) + +-struct host *(hosttableptrs[h_MAXHOSTTABLES]); /* Used by h_itoh */ ++extern struct host *(hosttableptrs[h_MAXHOSTTABLES]); /* Used by h_itoh */ + #define h_htoi(host) ((host)->index) /* index isn't zeroed, no need to lock */ + #define h_itoh(hostindex) (hosttableptrs[(hostindex)>>h_HTSHIFT]+((hostindex)&(h_HTSPERBLOCK-1))) + +diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c +index 2d7cd6011..69d902f1b 100644 +--- a/src/vol/fssync-server.c ++++ b/src/vol/fssync-server.c +@@ -79,9 +79,6 @@ + #endif /* USE_UNIX_SOCKETS */ + + #ifdef FSSYNC_BUILD_SERVER +- +-int (*V_BreakVolumeCallbacks) (VolumeId volume); +- + #define MAXHANDLERS 4 /* Up to 4 clients; must be at least 2, so that + * move = dump+restore can run on single server */ + #define MAXOFFLINEVOLUMES 128 /* This needs to be as big as the maximum +diff --git a/src/vol/volume.c b/src/vol/volume.c +index f1ff10a7b..3d9e47ef3 100644 +--- a/src/vol/volume.c ++++ b/src/vol/volume.c +@@ -124,9 +124,6 @@ pthread_cond_t vol_vinit_cond; + int vol_attach_threads = 1; + #endif /* AFS_PTHREAD_ENV */ + +-/* start-time configurable I/O parameters */ +-ih_init_params vol_io_params; +- + #ifdef AFS_DEMAND_ATTACH_FS + pthread_mutex_t vol_salvsync_mutex; + +diff --git a/src/xstat/xstat_cm.c b/src/xstat/xstat_cm.c +index d8600c124..3f5bfc843 100644 +--- a/src/xstat/xstat_cm.c ++++ b/src/xstat/xstat_cm.c +@@ -32,9 +32,8 @@ + int xstat_cm_numServers; /*Num connected servers */ + struct xstat_cm_ConnectionInfo + *xstat_cm_ConnInfo; /*Ptr to connection array */ +-int numCollections; /*Number of data collections */ + struct xstat_cm_ProbeResults xstat_cm_Results; /*Latest probe results */ +-char terminationEvent; /*One-shot termination event */ ++char cm_terminationEvent; /*One-shot termination event */ + + afs_int32 xstat_cmData[AFSCB_MAX_XSTAT_LONGS]; /*Buffer for collected data */ + +@@ -315,8 +314,8 @@ xstat_cm_LWP(void *unused) + */ + if (xstat_cm_debug) + printf("[%s] Signalling main process at %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- oneShotCode = LWP_SignalProcess(&terminationEvent); ++ &cm_terminationEvent); ++ oneShotCode = LWP_SignalProcess(&cm_terminationEvent); + if (oneShotCode) + fprintf(stderr, "[%s] Error %d from LWP_SignalProcess()", rn, + oneShotCode); +diff --git a/src/xstat/xstat_cm.h b/src/xstat/xstat_cm.h +index efbba531c..569011cc2 100644 +--- a/src/xstat/xstat_cm.h ++++ b/src/xstat/xstat_cm.h +@@ -86,10 +86,9 @@ struct xstat_cm_ProbeResults { + extern int xstat_cm_numServers; /*# connected servers */ + extern struct xstat_cm_ConnectionInfo + *xstat_cm_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct xstat_cm_ProbeResults + xstat_cm_Results; /*Latest probe results */ +-extern char terminationEvent; /*One-shot termination event */ ++extern char cm_terminationEvent; /*One-shot termination event */ + + /* + * ------------------------ Exported functions ------------------------ +diff --git a/src/xstat/xstat_cm_test.c b/src/xstat/xstat_cm_test.c +index b284237aa..7c5e56864 100644 +--- a/src/xstat/xstat_cm_test.c ++++ b/src/xstat/xstat_cm_test.c +@@ -881,8 +881,8 @@ RunTheTest(struct cmd_syndesc *a_s, void *arock) + */ + if (debugging_on) + printf("[%s] Calling LWP_WaitProcess() on event %" AFS_PTR_FMT +- "\n", rn, &terminationEvent); +- waitCode = LWP_WaitProcess(&terminationEvent); ++ "\n", rn, &cm_terminationEvent); ++ waitCode = LWP_WaitProcess(&cm_terminationEvent); + if (debugging_on) + printf("[%s] Returned from LWP_WaitProcess()\n", rn); + if (waitCode) { +diff --git a/src/xstat/xstat_fs.c b/src/xstat/xstat_fs.c +index 51dbe3847..dff930472 100644 +--- a/src/xstat/xstat_fs.c ++++ b/src/xstat/xstat_fs.c +@@ -33,9 +33,8 @@ + int xstat_fs_numServers; /*Num connected servers */ + struct xstat_fs_ConnectionInfo + *xstat_fs_ConnInfo; /*Ptr to connection array */ +-int numCollections; /*Number of data collections */ + struct xstat_fs_ProbeResults xstat_fs_Results; /*Latest probe results */ +-char terminationEvent; /*One-shot termination event */ ++char fs_terminationEvent; /*One-shot termination event */ + + afs_int32 xstat_fsData[AFS_MAX_XSTAT_LONGS]; /*Buffer for collected data */ + +@@ -334,8 +333,8 @@ xstat_fs_LWP(void *unused) + */ + if (xstat_fs_debug) + printf("[%s] Signalling main process at %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- oneShotCode = LWP_SignalProcess(&terminationEvent); ++ &fs_terminationEvent); ++ oneShotCode = LWP_SignalProcess(&fs_terminationEvent); + if (oneShotCode) + fprintf(stderr, "[%s] Error %d from LWP_SignalProcess()", rn, + oneShotCode); +diff --git a/src/xstat/xstat_fs.h b/src/xstat/xstat_fs.h +index 6e2b77b85..a800ba679 100644 +--- a/src/xstat/xstat_fs.h ++++ b/src/xstat/xstat_fs.h +@@ -87,10 +87,9 @@ struct xstat_fs_ProbeResults { + extern int xstat_fs_numServers; /*# connected servers */ + extern struct xstat_fs_ConnectionInfo + *xstat_fs_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct xstat_fs_ProbeResults + xstat_fs_Results; /*Latest probe results */ +-extern char terminationEvent; /*One-shot termination event */ ++extern char fs_terminationEvent; /*One-shot termination event */ + + /* + * ------------------------ Exported functions ------------------------ +diff --git a/src/xstat/xstat_fs_test.c b/src/xstat/xstat_fs_test.c +index 853c2121e..d58ecf014 100644 +--- a/src/xstat/xstat_fs_test.c ++++ b/src/xstat/xstat_fs_test.c +@@ -778,8 +778,8 @@ RunTheTest(struct cmd_syndesc *a_s, void *dummy) + */ + if (debugging_on) + printf("[%s] Calling LWP_WaitProcess() on event %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- waitCode = LWP_WaitProcess(&terminationEvent); ++ &fs_terminationEvent); ++ waitCode = LWP_WaitProcess(&fs_terminationEvent); + if (debugging_on) + printf("[%s] Returned from LWP_WaitProcess()\n", rn); + if (waitCode) { +-- +2.30.0 + diff --git a/0001-Temporary-fix-for-compilation-with-GCC-10.patch b/0001-Temporary-fix-for-compilation-with-GCC-10.patch deleted file mode 100644 index 75eb808b4c5b..000000000000 --- a/0001-Temporary-fix-for-compilation-with-GCC-10.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 81c4f50914bd0f696a0a6c356982e97594bd2c77 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de> -Date: Tue, 19 May 2020 16:17:01 +0200 -Subject: [PATCH 1/8] Temporary fix for compilation with GCC 10 - -See: -* https://bugs.gentoo.org/706738 -* https://gerrit.openafs.org/14106 - -Backporting that fix to OpenAFS 1.8 requires some changes in the xstat -code so for now let's just allow duplicate declarations. - -Change-Id: I0bbf317dcf584d5531db714c5e9b986f3fbb6a0b ---- - src/cf/osconf.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 -index 5f0d73fc2..7cf761757 100644 ---- a/src/cf/osconf.m4 -+++ b/src/cf/osconf.m4 -@@ -681,6 +681,8 @@ if test "x$GCC" = "xyes"; then - else - CFLAGS_NOSTRICT= - fi -+ else -+ XCFLAGS="${XCFLAGS} -fcommon" - fi - else - case $AFS_SYSNAME in --- -2.30.0 - diff --git a/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch b/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch index 5f904255727b..c4f60ce4c9ac 100644 --- a/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch +++ b/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch @@ -1,7 +1,7 @@ -From 858ce410250bae8c5043b8277aa3941dd528d577 Mon Sep 17 00:00:00 2001 +From 509169ed302741e2499fbb116ed08408c08d3999 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Fri, 3 Jul 2020 10:33:51 -0600 -Subject: [PATCH 2/8] LINUX 5.8: Replace kernel_setsockopt with new funcs +Subject: [PATCH 2/5] LINUX 5.8: Replace kernel_setsockopt with new funcs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch b/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch index 2ab84fc81061..8b8a9f342bf4 100644 --- a/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch +++ b/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch @@ -1,7 +1,7 @@ -From c8d51224d54275ac34f9bb4d817842e73e777b14 Mon Sep 17 00:00:00 2001 +From 2daa3a8f5771539203d9eb8c4e23b01ed7c65a16 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Fri, 3 Jul 2020 10:34:42 -0600 -Subject: [PATCH 3/8] LINUX 5.8: do not set name field in backing_dev_info +Subject: [PATCH 3/5] LINUX 5.8: do not set name field in backing_dev_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0004-LINUX-5.8-use-lru_cache_add.patch b/0004-LINUX-5.8-use-lru_cache_add.patch index 65b0b2c923a5..1388afd8eea3 100644 --- a/0004-LINUX-5.8-use-lru_cache_add.patch +++ b/0004-LINUX-5.8-use-lru_cache_add.patch @@ -1,7 +1,7 @@ -From db3408925dd69a70c14249a97d178d2762329f15 Mon Sep 17 00:00:00 2001 +From d1c503f83a2cf85c6fbf7aab24728a5f0787c54c Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Fri, 3 Jul 2020 10:35:06 -0600 -Subject: [PATCH 4/8] LINUX 5.8: use lru_cache_add +Subject: [PATCH 4/5] LINUX 5.8: use lru_cache_add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch b/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch index 1a04cc6166aa..0f2a5b8e3abe 100644 --- a/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch +++ b/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch @@ -1,7 +1,7 @@ -From e7f32efde6b4cf8c4a69768826c9fa2509bb98a2 Mon Sep 17 00:00:00 2001 +From c3b7278663c0e88daa611e7c1cc250e63639a496 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Fri, 21 Aug 2020 10:37:51 -0600 -Subject: [PATCH 5/8] LINUX 5.9: Remove HAVE_UNLOCKED_IOCTL/COMPAT_IOCTL +Subject: [PATCH 5/5] LINUX 5.9: Remove HAVE_UNLOCKED_IOCTL/COMPAT_IOCTL Linux-5.9-rc1 commit 'fs: remove the HAVE_UNLOCKED_IOCTL and HAVE_COMPAT_IOCTL defines' (4e24566a) removed the two referenced macros diff --git a/0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch b/0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch deleted file mode 100644 index 7b689815705e..000000000000 --- a/0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch +++ /dev/null @@ -1,48 +0,0 @@ -From ce893e8479e87dce4252e5a1c7771381689625be Mon Sep 17 00:00:00 2001 -From: Jeffrey Altman <jaltman@auristor.com> -Date: Thu, 14 Jan 2021 09:41:39 -0500 -Subject: [PATCH 6/8] rx: rx_InitHost do not overwrite RAND_bytes rx_nextCid - -39b165cdda941181845022c183fea1c7af7e4356 ("Move epoch and cid -generation into the rx core") introduced the use of RAND_bytes() -to generate the initial 'rx_nextCid' but failed to remove the - - rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT; - -assignment inherited from IBM/Transarc. - -At Thu, 14 Jan 2021 08:25:36 GMT the IBM inherited calculation -overflows the value CID range. This triggers broken overflow -logic in update_nextCid(). - -Reviewed-on: https://gerrit.openafs.org/14491 -Reviewed-by: Andrew Deason <adeason@sinenomine.net> -Tested-by: Andrew Deason <adeason@sinenomine.net> -Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> -Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> -Tested-by: Mark Vitale <mvitale@sinenomine.net> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit a3bc7ff1501d51ceb3b39d9caed62c530a804473) - -Change-Id: If5f7d4ba1cacc6978c83fd512653fbaa0c1559d8 ---- - src/rx/rx.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index 244838d9c..e1e6d8fd6 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -621,9 +621,6 @@ rx_InitHost(u_int host, u_int port) - MUTEX_ENTER(&rx_quota_mutex); - rxi_dataQuota += rx_extraQuota; /* + extra pkts caller asked to rsrv */ - MUTEX_EXIT(&rx_quota_mutex); -- /* *Slightly* random start time for the cid. This is just to help -- * out with the hashing function at the peer */ -- rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT); - rx_connHashTable = (struct rx_connection **)htable; - rx_peerHashTable = (struct rx_peer **)ptable; - --- -2.30.0 - diff --git a/0007-rx-update_nextCid-overflow-handling-is-broken.patch b/0007-rx-update_nextCid-overflow-handling-is-broken.patch deleted file mode 100644 index 1b17517095fb..000000000000 --- a/0007-rx-update_nextCid-overflow-handling-is-broken.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 270097d094d7dd9576f4808cd3d6c937ba8e053c Mon Sep 17 00:00:00 2001 -From: Jeffrey Altman <jaltman@auristor.com> -Date: Thu, 14 Jan 2021 09:57:13 -0500 -Subject: [PATCH 7/8] rx: update_nextCid overflow handling is broken - -The overflow handling in update_nextCid() produces a rx_nextCid -value of 0x80000001 which itself is out of the valid range. When -used to construct the first call of a new connection the connection -id for the call becomes 0x80000002, and all subsequent connections -also trigger the overflow handling and thus also receive connection -id 0x80000002. - -If the same connection id is used for multiple connections from -the same endpoint the accepting rx peer will be very confused. - -When authenticated connections are used, the CHALLENGE/RESPONSE -will fail because of a mismatch in the connection's callNumber -array. - -If an initiator makes only a single connection to a given rx peer, -that connection would succeed, but once multiple connections are -initiated all communication from a broken initiator to any rx peer -will fail. - -The incorrect overflow calculation was introduced by -39b165cdda941181845022c183fea1c7af7e4356 ("Move epoch and cid -generation into the rx core"). - -This change corrects the overflow value to become - - 1 << RX_CIDSHIFT - -Reviewed-on: https://gerrit.openafs.org/14492 -Reviewed-by: Andrew Deason <adeason@sinenomine.net> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -Tested-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit 2c0a3901cbfcb231b7b67eb0899a3133516f33c8) - -Change-Id: I74d70706ddf99022bed639891cb610fba9ef863d ---- - src/rx/rx.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index e1e6d8fd6..5d5953120 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -6651,9 +6651,8 @@ update_nextCid(void) - { - /* Overflow is technically undefined behavior; avoid it. */ - if (rx_nextCid > MAX_AFS_INT32 - (1 << RX_CIDSHIFT)) -- rx_nextCid = -1 * ((MAX_AFS_INT32 / RX_CIDSHIFT) * RX_CIDSHIFT); -- else -- rx_nextCid += 1 << RX_CIDSHIFT; -+ rx_nextCid = 0; -+ rx_nextCid += 1 << RX_CIDSHIFT; - } - - static void --- -2.30.0 - diff --git a/0008-Remove-overflow-check-from-update_nextCid.patch b/0008-Remove-overflow-check-from-update_nextCid.patch deleted file mode 100644 index 4c44e9d153cf..000000000000 --- a/0008-Remove-overflow-check-from-update_nextCid.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 12ac34bc93ca18dbb5f0f57744a70f1a072599b8 Mon Sep 17 00:00:00 2001 -From: Benjamin Kaduk <kaduk@mit.edu> -Date: Thu, 14 Jan 2021 10:20:59 -0800 -Subject: [PATCH 8/8] Remove overflow check from update_nextCid - -The rx_nextCid global has been an unsigned type since -http://gerrit.openafs.org/11106 (which was actually merged before -the refactoring of overflow check to avoid signed integer overflow) -and thus there is no need to avoid signed overflow. The per-connection -cid has been unsigned since the IBM import. - -The natural unsigned behavior on overflow of wrapping is the desired -behvaior here, so just remove the extra logic and always increment. - -Reviewed-on: https://gerrit.openafs.org/14496 -Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -Tested-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit 43ef1f2a5d80aa1c3f5b4831ada8e776ac0c7d13) - -Change-Id: I64fabe5229039f7af040902ed2e6f03dba7bc14d ---- - src/rx/rx.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index 5d5953120..c713fefd8 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -6644,14 +6644,12 @@ rxi_CancelGrowMTUEvent(struct rx_call *call) - } - - /* -- * Increment the counter for the next connection ID, handling overflow. -+ * Increment the counter for the next connection ID. -+ * Wrapping on unsigned integer overflow is the intended behavior. - */ - static void - update_nextCid(void) - { -- /* Overflow is technically undefined behavior; avoid it. */ -- if (rx_nextCid > MAX_AFS_INT32 - (1 << RX_CIDSHIFT)) -- rx_nextCid = 0; - rx_nextCid += 1 << RX_CIDSHIFT; - } - --- -2.30.0 - @@ -6,8 +6,8 @@ pkgname=openafs-modules-dkms _srcname=openafs -pkgver=1.8.6 -pkgrel=5 +pkgver=1.8.7 +pkgrel=1 pkgdesc="Kernel module for OpenAFS (dkms)" arch=('i686' 'x86_64' 'armv7h') url="http://www.openafs.org" @@ -18,30 +18,24 @@ conflicts=('openafs-features-libafs' 'openafs-modules' 'openafs<1.6.6-2') options=(!emptydirs) source=("http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2" "dkms.conf" - 0001-Temporary-fix-for-compilation-with-GCC-10.patch + 0001-Avoid-duplicate-definitions-of-globals.patch 0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch 0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch 0004-LINUX-5.8-use-lru_cache_add.patch - 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch - 0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - 0007-rx-update_nextCid-overflow-handling-is-broken.patch - 0008-Remove-overflow-check-from-update_nextCid.patch) -sha256sums=('8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945' + 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch) +sha256sums=('53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79' '5ea5e184f9b44f5ed45817d2b5a10149d15c8c54f49e0b5b4b773652673cb9b0' - '8f4145f5eaf148b231a06aa6fe4a0271fa3c63506bc4e8e504984bb57326d054' - 'cd2bb4125b7995f547767abced93a8e0ffd39ceec2aafda6a87abb11c04ef64f' - '0f147adc83adfc959eb20794410df9cea339253ad79175bc22b4cdb6e21b8c3d' - '4987b2800e18d890c7f17f4f0866812bbf9b9d9a2b5f97a1974d119106306b17' - '50ffd1efbbc6f6977e900cd8623988168d67d821c78def27fae6312d920bc901' - '3154052cc77b32ccafc5be86c1540b5253de2a1de5f3a87bbe6a771946bc45c1' - '714e862d31afbcf49b3a1d711fccb64c269153a73e7bfd0b0483dbae109fd177' - '00db4b504667f9f3182cf35ed48fb0ef8f16b5d6e97df5454efb2b3e5d914111') + '18634d85ca4dec3366533a2767e652dab27202667de1d04f578f40a94d8ec15a' + '4b9d269e2b3c214f9240917b9d895b41e09c1afdbef75e30a0db02a240bf9b0e' + '9e630d2029c113f482c321007522ce887273250c4125aa6fee1229aa78e8f8c3' + '6deaa098e7e6113c426d9449c5b6252c76dfbe4a67705420215ae501de8e9f0d' + '3a0a022a8a4cb1034e60dec9c55727e1be846080f5923a7edcc7e18fe6b57606') prepare() { cd "${srcdir}/${_srcname}-${pkgver}" - # Fix compilation with GCC 10 (see https://bugs.gentoo.org/706738 and https://gerrit.openafs.org/14106) - patch -p1 < "${srcdir}"/0001-Temporary-fix-for-compilation-with-GCC-10.patch + # Fix compilation with GCC 10 + patch -p1 < "${srcdir}"/0001-Avoid-duplicate-definitions-of-globals.patch # Compatibility with Linux 5.8 patch -p1 < "${srcdir}"/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch @@ -51,14 +45,6 @@ prepare() { # Compatibility with Linux 5.9 patch -p1 < "${srcdir}"/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch - # Fix RX bug triggered after 14.01.2021 08:25:36 UTC - # https://gerrit.openafs.org/#/c/14493/ - # https://gerrit.openafs.org/#/c/14494/ - # https://gerrit.openafs.org/#/c/14497/ - patch -p1 < "${srcdir}"/0006-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - patch -p1 < "${srcdir}"/0007-rx-update_nextCid-overflow-handling-is-broken.patch - patch -p1 < "${srcdir}"/0008-Remove-overflow-check-from-update_nextCid.patch - # Only needed when changes to configure were made ./regen.sh -q } |