forked from pool/openafs
Accepting request 1170220 from home:hauky:branches:filesystems
- update to openafs-1.8.11 - apply upstream patches for kernel 6.8 * 056a7a8.diff * 05ac614.diff * 073adec.diff * 0d9f6cf.diff * 0e983a9.diff * 112fb94.diff * 1e1bf8e.diff * 2056ce8.diff * 5312d06.diff * 67e48c8.diff * 6b20756.diff * 743d72f.diff * 7cae97b.diff * 81b910a.diff * 87ab04a.diff * 9f052c1.diff * a14a9ad.diff * a87845d.diff * aae8b00.diff * b77b304.diff * d1c89ac.diff * d9f3a2c.diff * db91384.diff * dffd0e1.diff * e0f425a.diff * e157f8f.diff * e428053.diff * ef7b8c5.diff * f5bafb0.diff * fca6fd9.diff OBS-URL: https://build.opensuse.org/request/show/1170220 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=123
This commit is contained in:
parent
ab436effad
commit
cfa65eea8c
46
056a7a8.diff
Normal file
46
056a7a8.diff
Normal file
@ -0,0 +1,46 @@
|
||||
From 056a7a8005a68cf2fb8be80668b139aa87a0de0b Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 09:28:02 -0700
|
||||
Subject: [PATCH] afs: Remove dummy_PSetAcl()
|
||||
|
||||
The function dummy_PSetAcl() is not referenced anywhere within the
|
||||
source tree.
|
||||
|
||||
Remove the function dummy_PSetAcl().
|
||||
|
||||
The commit: 'doxygen-comments-20081010' (4b72f8765c)
|
||||
introduced the function, but dummy_PSetAcl() has never been referenced
|
||||
or defined within a header file.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15618
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 05ca98687d882c72915e91430e29a4f2a36c502c)
|
||||
|
||||
Change-Id: Ie4420a365e07d2d8564530e004df75330e86bea5
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c
|
||||
index 9182a4b..7ddb5ad 100644
|
||||
--- a/src/afs/afs_pioctl.c
|
||||
+++ b/src/afs/afs_pioctl.c
|
||||
@@ -1426,12 +1426,6 @@
|
||||
*
|
||||
* \post Changed ACL, via direct writing to the wire
|
||||
*/
|
||||
-int
|
||||
-dummy_PSetAcl(char *ain, char *aout)
|
||||
-{
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
DECL_PIOCTL(PSetAcl)
|
||||
{
|
||||
afs_int32 code;
|
264
05ac614.diff
Normal file
264
05ac614.diff
Normal file
@ -0,0 +1,264 @@
|
||||
From 05ac6149f2f7998b6110c403d26757151b8e8ffe Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vitale <mvitale@sinenomine.net>
|
||||
Date: Thu, 11 Mar 2021 15:36:54 -0500
|
||||
Subject: [PATCH] afs: remove dead ICL (fstrace) code
|
||||
|
||||
The ICL code (afs/afs_icl.c) which supports fstrace includes a number of
|
||||
functions that have been dead code since the original IBM code import.
|
||||
Some of these seem to have been intended to support fine-grained event
|
||||
tracing, but the implementation was never completed.
|
||||
|
||||
Remove the dead code. No functional change is incurred by this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/14555
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit ba58d9912cff07a6f2af7275017cf70115f1a88d)
|
||||
|
||||
Change-Id: Ic0a6d5dac200e7e130fa8df66005bdaf291cf088
|
||||
Reviewed-on: https://gerrit.openafs.org/15682
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c
|
||||
index 8d09113..42b4a0c 100644
|
||||
--- a/src/afs/afs_icl.c
|
||||
+++ b/src/afs/afs_icl.c
|
||||
@@ -538,18 +538,6 @@
|
||||
#define ICL_APPENDLONG(lp, x) ICL_APPENDINT32((lp), (x))
|
||||
#endif
|
||||
|
||||
-/* routine to tell whether we're dealing with the address or the
|
||||
- * object itself
|
||||
- */
|
||||
-int
|
||||
-afs_icl_UseAddr(int type)
|
||||
-{
|
||||
- if (type == ICL_TYPE_HYPER || type == ICL_TYPE_STRING
|
||||
- || type == ICL_TYPE_FID || type == ICL_TYPE_INT64)
|
||||
- return 1;
|
||||
- else
|
||||
- return 0;
|
||||
-}
|
||||
|
||||
void
|
||||
afs_icl_AppendOne(struct afs_icl_log *logp, int type, long parm)
|
||||
@@ -884,19 +872,6 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-/* return basic parameter information about a log */
|
||||
-int
|
||||
-afs_icl_GetLogParms(struct afs_icl_log *logp, afs_int32 * maxSizep,
|
||||
- afs_int32 * curSizep)
|
||||
-{
|
||||
- ObtainReadLock(&logp->lock);
|
||||
- *maxSizep = logp->logSize;
|
||||
- *curSizep = logp->logElements;
|
||||
- ReleaseReadLock(&logp->lock);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
/* hold and release logs */
|
||||
int
|
||||
afs_icl_LogHold(struct afs_icl_log *logp)
|
||||
@@ -904,14 +879,6 @@
|
||||
ObtainWriteLock(&afs_icl_lock, 187);
|
||||
logp->refCount++;
|
||||
ReleaseWriteLock(&afs_icl_lock);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-/* hold and release logs, called with lock already held */
|
||||
-int
|
||||
-afs_icl_LogHoldNL(struct afs_icl_log *logp)
|
||||
-{
|
||||
- logp->refCount++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1070,32 +1037,6 @@
|
||||
return tp;
|
||||
}
|
||||
|
||||
-int
|
||||
-afs_icl_EnumerateLogs(int (*aproc)
|
||||
- (char *name, char *arock, struct afs_icl_log * tp),
|
||||
- char *arock)
|
||||
-{
|
||||
- struct afs_icl_log *tp;
|
||||
- afs_int32 code;
|
||||
-
|
||||
- code = 0;
|
||||
- ObtainWriteLock(&afs_icl_lock, 195);
|
||||
- for (tp = afs_icl_allLogs; tp; tp = tp->nextp) {
|
||||
- tp->refCount++; /* hold this guy */
|
||||
- ReleaseWriteLock(&afs_icl_lock);
|
||||
- ObtainReadLock(&tp->lock);
|
||||
- code = (*aproc) (tp->name, arock, tp);
|
||||
- ReleaseReadLock(&tp->lock);
|
||||
- ObtainWriteLock(&afs_icl_lock, 196);
|
||||
- if (--tp->refCount == 0)
|
||||
- afs_icl_ZapLog(tp);
|
||||
- if (code)
|
||||
- break;
|
||||
- }
|
||||
- ReleaseWriteLock(&afs_icl_lock);
|
||||
- return code;
|
||||
-}
|
||||
-
|
||||
struct afs_icl_set *afs_icl_allSets = 0;
|
||||
|
||||
int
|
||||
@@ -1198,46 +1139,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* function to change event enabling information for a particular set */
|
||||
-int
|
||||
-afs_icl_SetEnable(struct afs_icl_set *setp, afs_int32 eventID, int setValue)
|
||||
-{
|
||||
- char *tp;
|
||||
-
|
||||
- ObtainWriteLock(&setp->lock, 200);
|
||||
- if (!ICL_EVENTOK(setp, eventID)) {
|
||||
- ReleaseWriteLock(&setp->lock);
|
||||
- return -1;
|
||||
- }
|
||||
- tp = &setp->eventFlags[ICL_EVENTBYTE(eventID)];
|
||||
- if (setValue)
|
||||
- *tp |= ICL_EVENTMASK(eventID);
|
||||
- else
|
||||
- *tp &= ~(ICL_EVENTMASK(eventID));
|
||||
- ReleaseWriteLock(&setp->lock);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-/* return indication of whether a particular event ID is enabled
|
||||
- * for tracing. If *getValuep is set to 0, the event is disabled,
|
||||
- * otherwise it is enabled. All events start out enabled by default.
|
||||
- */
|
||||
-int
|
||||
-afs_icl_GetEnable(struct afs_icl_set *setp, afs_int32 eventID, int *getValuep)
|
||||
-{
|
||||
- ObtainReadLock(&setp->lock);
|
||||
- if (!ICL_EVENTOK(setp, eventID)) {
|
||||
- ReleaseWriteLock(&setp->lock);
|
||||
- return -1;
|
||||
- }
|
||||
- if (setp->eventFlags[ICL_EVENTBYTE(eventID)] & ICL_EVENTMASK(eventID))
|
||||
- *getValuep = 1;
|
||||
- else
|
||||
- *getValuep = 0;
|
||||
- ReleaseReadLock(&setp->lock);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
/* hold and release event sets */
|
||||
int
|
||||
afs_icl_SetHold(struct afs_icl_set *setp)
|
||||
@@ -1337,54 +1238,6 @@
|
||||
}
|
||||
}
|
||||
ReleaseReadLock(&setp->lock);
|
||||
- return code;
|
||||
-}
|
||||
-
|
||||
-int
|
||||
-afs_icl_EnumerateSets(int (*aproc)
|
||||
- (char *name, char *arock, struct afs_icl_log * tp),
|
||||
- char *arock)
|
||||
-{
|
||||
- struct afs_icl_set *tp, *np;
|
||||
- afs_int32 code;
|
||||
-
|
||||
- code = 0;
|
||||
- ObtainWriteLock(&afs_icl_lock, 205);
|
||||
- for (tp = afs_icl_allSets; tp; tp = np) {
|
||||
- tp->refCount++; /* hold this guy */
|
||||
- ReleaseWriteLock(&afs_icl_lock);
|
||||
- code = (*aproc) (tp->name, arock, (struct afs_icl_log *)tp);
|
||||
- ObtainWriteLock(&afs_icl_lock, 206);
|
||||
- np = tp->nextp; /* tp may disappear next, but not np */
|
||||
- if (--tp->refCount == 0 && (tp->states & ICL_SETF_DELETED))
|
||||
- afs_icl_ZapSet(tp);
|
||||
- if (code)
|
||||
- break;
|
||||
- }
|
||||
- ReleaseWriteLock(&afs_icl_lock);
|
||||
- return code;
|
||||
-}
|
||||
-
|
||||
-int
|
||||
-afs_icl_AddLogToSet(struct afs_icl_set *setp, struct afs_icl_log *newlogp)
|
||||
-{
|
||||
- int i;
|
||||
- int code = -1;
|
||||
-
|
||||
- ObtainWriteLock(&setp->lock, 207);
|
||||
- for (i = 0; i < ICL_LOGSPERSET; i++) {
|
||||
- if (!setp->logs[i]) {
|
||||
- setp->logs[i] = newlogp;
|
||||
- code = i;
|
||||
- afs_icl_LogHold(newlogp);
|
||||
- if (!(setp->states & ICL_SETF_FREED)) {
|
||||
- /* bump up the number of sets using the log */
|
||||
- afs_icl_LogUse(newlogp);
|
||||
- }
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- ReleaseWriteLock(&setp->lock);
|
||||
return code;
|
||||
}
|
||||
|
||||
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
|
||||
index e9a655e..ed43635 100644
|
||||
--- a/src/afs/afs_prototypes.h
|
||||
+++ b/src/afs/afs_prototypes.h
|
||||
@@ -364,10 +364,7 @@
|
||||
extern int afs_icl_CopyOut(struct afs_icl_log *logp,
|
||||
afs_int32 * bufferp, afs_int32 * bufSizep,
|
||||
afs_uint32 * cookiep, afs_int32 * flagsp);
|
||||
-extern int afs_icl_GetLogParms(struct afs_icl_log *logp, afs_int32 * maxSizep,
|
||||
- afs_int32 * curSizep);
|
||||
extern int afs_icl_LogHold(struct afs_icl_log *logp);
|
||||
-extern int afs_icl_LogHoldNL(struct afs_icl_log *logp);
|
||||
extern int afs_icl_LogUse(struct afs_icl_log *logp);
|
||||
extern int afs_icl_LogFreeUse(struct afs_icl_log *logp);
|
||||
extern int afs_icl_LogSetSize(struct afs_icl_log *logp,
|
||||
@@ -378,11 +375,6 @@
|
||||
extern int afs_icl_ZeroLog(struct afs_icl_log *logp);
|
||||
extern int afs_icl_LogFree(struct afs_icl_log *logp);
|
||||
extern struct afs_icl_log *afs_icl_FindLog(char *name);
|
||||
-extern int
|
||||
- afs_icl_EnumerateLogs(int (*aproc)
|
||||
-
|
||||
- (char *name, char *arock, struct afs_icl_log * tp),
|
||||
- char *arock);
|
||||
extern int afs_icl_CreateSet(char *name, struct afs_icl_log *baseLogp,
|
||||
struct afs_icl_log *fatalLogp,
|
||||
struct afs_icl_set **outSetpp);
|
||||
@@ -391,18 +383,7 @@
|
||||
struct afs_icl_log *fatalLogp,
|
||||
afs_uint32 flags,
|
||||
struct afs_icl_set **outSetpp);
|
||||
-extern int afs_icl_SetEnable(struct afs_icl_set *setp, afs_int32 eventID,
|
||||
- int setValue);
|
||||
-extern int afs_icl_GetEnable(struct afs_icl_set *setp, afs_int32 eventID,
|
||||
- int *getValuep);
|
||||
extern int afs_icl_ZeroSet(struct afs_icl_set *setp);
|
||||
-extern int
|
||||
- afs_icl_EnumerateSets(int (*aproc)
|
||||
-
|
||||
- (char *name, char *arock, struct afs_icl_log * tp),
|
||||
- char *arock);
|
||||
-extern int afs_icl_AddLogToSet(struct afs_icl_set *setp,
|
||||
- struct afs_icl_log *newlogp);
|
||||
extern int afs_icl_SetSetStat(struct afs_icl_set *setp, int op);
|
||||
extern int afs_icl_SetHold(struct afs_icl_set *setp);
|
||||
extern int afs_icl_ZapSet(struct afs_icl_set *setp);
|
126
073adec.diff
Normal file
126
073adec.diff
Normal file
@ -0,0 +1,126 @@
|
||||
From 073adec17a9b7b55d3672b17f7faa4a122ce6e9d Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Thu, 08 Feb 2024 12:22:13 -0700
|
||||
Subject: [PATCH] afs: Remove SRXAFSCB_FetchData/StoreData
|
||||
|
||||
Commit 'client-64bit-file-size-support-20011031' (971b18bc42) introduced
|
||||
the RPC functions SRXAFSCB_FetchData() and SRXAFSCB_StoreData with RPC
|
||||
numbers of 65536 and 65537 respectively.
|
||||
|
||||
Commit 'more-64bit-file-size-support-20011031' (c5b1a3775f) removed the
|
||||
references from afscbint.xg, but did not remove the actual code. The
|
||||
65536 RPC number was reassigned to SRXAFSCB_GetCE64, and the commit:
|
||||
'This is mostly a rewrite of src/afs/afs_cell.c, and associated changes'
|
||||
(629d08065) assigned the 65537 RPC to SRXAFSCB_GetCellByNum.
|
||||
|
||||
Remove the 2 functions since there are no references other than the
|
||||
prototype in afs_prototypes.h.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15639
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 379f7fc51d411990189ec28e48c91edc87d76120)
|
||||
|
||||
Change-Id: I1a3539227d22e6df89d78245634dfeb14943035a
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c
|
||||
index 22edefb..56e8cd2 100644
|
||||
--- a/src/afs/afs_callback.c
|
||||
+++ b/src/afs/afs_callback.c
|
||||
@@ -1473,71 +1473,6 @@
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
- * EXPORTED SRXAFSCB_FetchData
|
||||
- *
|
||||
- * Description:
|
||||
- * Routine to do third party move from a remioserver to the original
|
||||
- * issuer of an ArchiveData request. Presently supported only by the
|
||||
- * "fs" command, not by the AFS client.
|
||||
- *
|
||||
- * Arguments:
|
||||
- * rxcall: Ptr to Rx call on which this request came in.
|
||||
- * Fid: pointer to AFSFid structure.
|
||||
- * Fd: File descriptor inside fs command.
|
||||
- * Position: Offset in the file.
|
||||
- * Length: Data length to transfer.
|
||||
- * TotalLength: Pointer to total file length field
|
||||
- *
|
||||
- * Returns:
|
||||
- * 0 on success
|
||||
- *
|
||||
- * Environment:
|
||||
- * Nothing interesting.
|
||||
- *
|
||||
- * Side Effects:
|
||||
- *------------------------------------------------------------------------*/
|
||||
-int
|
||||
-SRXAFSCB_FetchData(struct rx_call *rxcall, struct AFSFid *Fid, afs_int32 Fd,
|
||||
- afs_int64 Position, afs_int64 Length,
|
||||
- afs_int64 * TotalLength)
|
||||
-{
|
||||
- return ENOSYS;
|
||||
-}
|
||||
-
|
||||
-/*------------------------------------------------------------------------
|
||||
- * EXPORTED SRXAFSCB_StoreData
|
||||
- *
|
||||
- * Description:
|
||||
- * Routine to do third party move from a remioserver to the original
|
||||
- * issuer of a RetrieveData request. Presently supported only by the
|
||||
- * "fs" command, not by the AFS client.
|
||||
- *
|
||||
- * Arguments:
|
||||
- * rxcall: Ptr to Rx call on which this request came in.
|
||||
- * Fid: pointer to AFSFid structure.
|
||||
- * Fd: File descriptor inside fs command.
|
||||
- * Position: Offset in the file.
|
||||
- * Length: Data length to transfer.
|
||||
- * TotalLength: Pointer to total file length field
|
||||
- *
|
||||
- * Returns:
|
||||
- * 0 on success
|
||||
- *
|
||||
- * Environment:
|
||||
- * Nothing interesting.
|
||||
- *
|
||||
- * Side Effects:
|
||||
- * As advertised.
|
||||
- *------------------------------------------------------------------------*/
|
||||
-int
|
||||
-SRXAFSCB_StoreData(struct rx_call *rxcall, struct AFSFid *Fid, afs_int32 Fd,
|
||||
- afs_int64 Position, afs_int64 Length,
|
||||
- afs_int64 * TotalLength)
|
||||
-{
|
||||
- return ENOSYS;
|
||||
-}
|
||||
-
|
||||
-/*------------------------------------------------------------------------
|
||||
* EXPORTED SRXAFSCB_GetCellByNum
|
||||
*
|
||||
* Description:
|
||||
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
|
||||
index ed43635..208bd03 100644
|
||||
--- a/src/afs/afs_prototypes.h
|
||||
+++ b/src/afs/afs_prototypes.h
|
||||
@@ -103,13 +103,6 @@
|
||||
afs_uint32 * serverVersion,
|
||||
afs_uint32 * configCount,
|
||||
cacheConfig * config);
|
||||
-extern int SRXAFSCB_FetchData(struct rx_call *rxcall, struct AFSFid *Fid,
|
||||
- afs_int32 Fd, afs_int64 Position,
|
||||
- afs_int64 Length, afs_int64 * TotalLength);
|
||||
-extern int SRXAFSCB_StoreData(struct rx_call *rxcall, struct AFSFid *Fid,
|
||||
- afs_int32 Fd, afs_int64 Position,
|
||||
- afs_int64 Length, afs_int64 * TotalLength);
|
||||
-
|
||||
|
||||
/* afs_cbqueue.c */
|
||||
extern afs_rwlock_t afs_xcbhash;
|
134
0d9f6cf.diff
Normal file
134
0d9f6cf.diff
Normal file
@ -0,0 +1,134 @@
|
||||
From 0d9f6cf121e49cfe1a2047b98d4c30b82a1898bd Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Thu, 15 Feb 2024 09:00:05 -0700
|
||||
Subject: [PATCH] afs: Move function prototypes into headers
|
||||
|
||||
Several .c files contain external function prototypes, while the
|
||||
implementing files do not have these prototypes.
|
||||
|
||||
Move these prototypes into header files so that the prototypes are
|
||||
available to both the caller and the implementation.
|
||||
|
||||
Because the file holding the implementation does not have prototypes,
|
||||
these functions are flagged when building against a Linux 6.8 kernel
|
||||
(which sets the -Wmissing-declarations and -Wmissing-prototypes compiler
|
||||
flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Add the prototypes for the following to afs_prototypes.h:
|
||||
exporter_add
|
||||
afs_syscall (AFS_LINUX_ENV)
|
||||
BlobScan
|
||||
|
||||
Remove the prototypes from the .c files where they are referenced.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15642
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 85781d7e83ae4501d8ab267bf55ef63f90f63101)
|
||||
|
||||
Change-Id: I74333e99e08af88bebdcbff4767d79397acac358
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
|
||||
index fbdee29..3e79774 100644
|
||||
--- a/src/afs/LINUX/osi_ioctl.c
|
||||
+++ b/src/afs/LINUX/osi_ioctl.c
|
||||
@@ -34,9 +34,6 @@
|
||||
|
||||
extern struct proc_dir_entry *openafs_procfs;
|
||||
|
||||
-extern asmlinkage long
|
||||
-afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
|
||||
-
|
||||
static int
|
||||
afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
diff --git a/src/afs/LINUX/osi_syscall.c b/src/afs/LINUX/osi_syscall.c
|
||||
index 5e9e519..dc78da8 100644
|
||||
--- a/src/afs/LINUX/osi_syscall.c
|
||||
+++ b/src/afs/LINUX/osi_syscall.c
|
||||
@@ -91,9 +91,6 @@
|
||||
|
||||
|
||||
/***** ALL PLATFORMS *****/
|
||||
-extern asmlinkage long
|
||||
-afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
|
||||
-
|
||||
static SYSCALLTYPE *afs_sys_call_table;
|
||||
static SYSCALLTYPE afs_ni_syscall = 0;
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||
index 7e85aa5..08fccb1 100644
|
||||
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||
@@ -407,8 +407,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-extern int BlobScan(struct dcache * afile, afs_int32 ablob, afs_int32 *ablobOut);
|
||||
-
|
||||
/* This is a complete rewrite of afs_readdir, since we can make use of
|
||||
* filldir instead of afs_readdir_move. Note that changes to vcache/dcache
|
||||
* handling and use of bulkstats will need to be reflected here as well.
|
||||
diff --git a/src/afs/VNOPS/afs_vnop_lookup.c b/src/afs/VNOPS/afs_vnop_lookup.c
|
||||
index e1796c5..0fbe4e8 100644
|
||||
--- a/src/afs/VNOPS/afs_vnop_lookup.c
|
||||
+++ b/src/afs/VNOPS/afs_vnop_lookup.c
|
||||
@@ -667,8 +667,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-extern int BlobScan(struct dcache * afile, afs_int32 ablob, afs_int32 *ablobOut);
|
||||
-
|
||||
/* called with an unlocked directory and directory cookie. Areqp
|
||||
* describes who is making the call.
|
||||
* Scans the next N (about 30, typically) directory entries, and does
|
||||
diff --git a/src/afs/afs_nfsclnt.c b/src/afs/afs_nfsclnt.c
|
||||
index fbb5006..4c7806d 100644
|
||||
--- a/src/afs/afs_nfsclnt.c
|
||||
+++ b/src/afs/afs_nfsclnt.c
|
||||
@@ -160,7 +160,6 @@
|
||||
osi_Assert(ISAFS_GLOCK());
|
||||
#endif
|
||||
if (!init_nfsexporter) {
|
||||
- extern struct afs_exporter *exporter_add();
|
||||
|
||||
init_nfsexporter = 1;
|
||||
LOCK_INIT(&afs_xnfspag, "afs_xnfspag");
|
||||
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
|
||||
index 208bd03..9b3b1af 100644
|
||||
--- a/src/afs/afs_prototypes.h
|
||||
+++ b/src/afs/afs_prototypes.h
|
||||
@@ -331,6 +331,8 @@
|
||||
|
||||
/* afs_exporter.c */
|
||||
extern struct afs_exporter *root_exported;
|
||||
+extern struct afs_exporter * exporter_add(afs_int32 size, struct exporterops *ops,
|
||||
+ afs_int32 state, afs_int32 type, char *data);
|
||||
extern struct afs_exporter *exporter_find(int type);
|
||||
extern void shutdown_exporter(void);
|
||||
|
||||
@@ -923,6 +925,10 @@
|
||||
extern int Afs_syscall(void);
|
||||
#endif
|
||||
|
||||
+#if defined(AFS_LINUX_ENV)
|
||||
+extern asmlinkage long afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
|
||||
+#endif
|
||||
+
|
||||
/* afs_tokens.c */
|
||||
struct ktc_tokenUnion;
|
||||
struct ktc_setTokenData;
|
||||
@@ -1292,6 +1298,7 @@
|
||||
|
||||
/* VNOPS/afs_vnop_readdir.c */
|
||||
extern int afs_rd_stash_i;
|
||||
+extern int BlobScan(struct dcache * afile, afs_int32 ablob, int *ablobOut);
|
||||
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|
||||
extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio,
|
||||
afs_ucred_t *acred, int *eofp);
|
347
0e983a9.diff
Normal file
347
0e983a9.diff
Normal file
@ -0,0 +1,347 @@
|
||||
From 0e983a9a7e010a4e7c8a4c60cf313e566323bbf1 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@dson.org>
|
||||
Date: Sun, 03 May 2020 10:33:28 -0500
|
||||
Subject: [PATCH] afs: Drop GLOCK for various Rx calls
|
||||
|
||||
Most calls into Rx from libafs do so without the AFS_GLOCK, but a few
|
||||
pieces of code still hold AFS_GLOCK while making some Rx calls. A few
|
||||
calls into Rx also currently require AFS_GLOCK, but drop AFS_GLOCK
|
||||
internally, which is somewhat confusing/inconsistent. Calling Rx
|
||||
functions with AFS_GLOCK held can potentially cause locking/allocation
|
||||
problems on various platforms, such as FreeBSD where we get WITNESS
|
||||
warnings about acquiring sleepable Rx locks while holding the
|
||||
non-sleepable AFS_GLOCK.
|
||||
|
||||
Fix a variety of Rx calls from libafs to drop AFS_GLOCK before calling
|
||||
into Rx. Specifically, this commit handles calls to rxi_GetIFInfo,
|
||||
rx_InitHost, rx_StartServer, rx_ServerProc, rx_GetConnection,
|
||||
rx_DestroyConnection/rx_PutConnection, and
|
||||
rx_SetConnSecondsUntilNatPing.
|
||||
|
||||
For calls made via afs_start_thread, adjust afs_start_thread to accept
|
||||
a new argument that says whether to acquire AFS_GLOCK for the relevant
|
||||
function or not.
|
||||
|
||||
For a call to rx_InitHost inside afs_InitSetup, dropping GLOCK makes
|
||||
it possible for another thread to also enter afs_InitSetup while we're
|
||||
running, before afs_InitSetup_done is set. To prevent two threads from
|
||||
running afs_InitSetup in parallel, introduce afs_InitSetup_running
|
||||
(which is set while afs_InitSetup is running), and simply wait for it
|
||||
to be cleared if it is set when we enter afs_InitSetup.
|
||||
|
||||
This commit does not handle strictly all calls into Rx from libafs,
|
||||
since many Rx calls don't do anything interesting besides set some
|
||||
internal variables, and so AFS_GLOCK doesn't really matter for them,
|
||||
and dropping/reacquiring it around those calls may have performance
|
||||
impact.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/14184
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
(cherry picked from commit d5e1428a3bd4a7fbb4401cf17176474f0c1825d3)
|
||||
|
||||
Conflicts:
|
||||
src/afs/afs_call.c - context only due to not having commit:
|
||||
'Log binding ip address and port during startup' (02dede5d40)
|
||||
|
||||
Change-Id: I0d14105d5dc8bfd4740c7a9adfc61c36f8a2318c
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
|
||||
index aa5d5fc..be69846 100644
|
||||
--- a/src/afs/LINUX/osi_misc.c
|
||||
+++ b/src/afs/LINUX/osi_misc.c
|
||||
@@ -155,7 +155,18 @@
|
||||
|
||||
|
||||
/* This could use some work, and support on more platforms. */
|
||||
-int afs_thread_wrapper(void *rock)
|
||||
+static int
|
||||
+afs_thread_wrapper(void *rock)
|
||||
+{
|
||||
+ void (*proc)(void) = rock;
|
||||
+ __module_get(THIS_MODULE);
|
||||
+ (*proc)();
|
||||
+ module_put(THIS_MODULE);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+afs_thread_wrapper_glock(void *rock)
|
||||
{
|
||||
void (*proc)(void) = rock;
|
||||
__module_get(THIS_MODULE);
|
||||
@@ -166,7 +177,12 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void afs_start_thread(void (*proc)(void), char *name)
|
||||
+void
|
||||
+afs_start_thread(void (*proc)(void), char *name, int needs_glock)
|
||||
{
|
||||
- kthread_run(afs_thread_wrapper, proc, "%s", name);
|
||||
+ if (needs_glock) {
|
||||
+ kthread_run(afs_thread_wrapper_glock, proc, "%s", name);
|
||||
+ } else {
|
||||
+ kthread_run(afs_thread_wrapper, proc, "%s", name);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/afs/LINUX/osi_prototypes.h b/src/afs/LINUX/osi_prototypes.h
|
||||
index 130b566..2ed0543 100644
|
||||
--- a/src/afs/LINUX/osi_prototypes.h
|
||||
+++ b/src/afs/LINUX/osi_prototypes.h
|
||||
@@ -50,7 +50,7 @@
|
||||
struct dentry **dpp);
|
||||
extern int osi_abspath(char *aname, char *buf, int buflen,
|
||||
int followlink, char **pathp);
|
||||
-extern void afs_start_thread(void (*proc)(void), char *name);
|
||||
+extern void afs_start_thread(void (*proc)(void), char *name, int needs_glock);
|
||||
|
||||
/* osi_probe.c */
|
||||
extern void *osi_find_syscall_table(int which);
|
||||
diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c
|
||||
index 4ac63b1..7fb323c 100644
|
||||
--- a/src/afs/afs_call.c
|
||||
+++ b/src/afs/afs_call.c
|
||||
@@ -104,10 +104,18 @@
|
||||
static int
|
||||
afs_InitSetup(int preallocs)
|
||||
{
|
||||
+ static int afs_InitSetup_running;
|
||||
+
|
||||
int code;
|
||||
+
|
||||
+ while (afs_InitSetup_running) {
|
||||
+ afs_osi_Sleep(&afs_InitSetup_running);
|
||||
+ }
|
||||
|
||||
if (afs_InitSetup_done)
|
||||
return EAGAIN;
|
||||
+
|
||||
+ afs_InitSetup_running = 1;
|
||||
|
||||
#ifdef AFS_SUN510_ENV
|
||||
/* Initialize a RW lock for the ifinfo global array */
|
||||
@@ -133,10 +141,12 @@
|
||||
/* start RX */
|
||||
if(!afscall_set_rxpck_received)
|
||||
rx_extraPackets = AFS_NRXPACKETS; /* smaller # of packets */
|
||||
+ AFS_GUNLOCK();
|
||||
code = rx_InitHost(rx_bindhost, htons(7001));
|
||||
+ AFS_GLOCK();
|
||||
if (code) {
|
||||
afs_warn("AFS: RX failed to initialize %d).\n", code);
|
||||
- return code;
|
||||
+ goto done;
|
||||
}
|
||||
rx_SetRxDeadTime(afs_rx_deadtime);
|
||||
/* resource init creates the services */
|
||||
@@ -145,6 +155,9 @@
|
||||
afs_InitSetup_done = 1;
|
||||
afs_osi_Wakeup(&afs_InitSetup_done);
|
||||
|
||||
+ done:
|
||||
+ afs_InitSetup_running = 0;
|
||||
+ afs_osi_Wakeup(&afs_InitSetup_running);
|
||||
return code;
|
||||
}
|
||||
|
||||
@@ -1703,7 +1716,9 @@
|
||||
afs_warn("CB... ");
|
||||
|
||||
afs_termState = AFSOP_STOP_RXCALLBACK;
|
||||
+ AFS_GUNLOCK();
|
||||
rx_WakeupServerProcs();
|
||||
+ AFS_GLOCK();
|
||||
#ifdef AFS_AIX51_ENV
|
||||
shutdown_rxkernel();
|
||||
#endif
|
||||
@@ -1756,7 +1771,9 @@
|
||||
afs_warn("NetIfPoller... ");
|
||||
osi_StopNetIfPoller();
|
||||
#endif
|
||||
+ AFS_GUNLOCK();
|
||||
rxi_FreeAllPackets();
|
||||
+ AFS_GLOCK();
|
||||
|
||||
afs_termState = AFSOP_STOP_COMPLETE;
|
||||
|
||||
diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c
|
||||
index 1fe990e..7cffef6 100644
|
||||
--- a/src/afs/afs_callback.c
|
||||
+++ b/src/afs/afs_callback.c
|
||||
@@ -985,7 +985,9 @@
|
||||
/*
|
||||
* Donate this process to Rx.
|
||||
*/
|
||||
+ AFS_GUNLOCK();
|
||||
rx_ServerProc(NULL);
|
||||
+ AFS_GLOCK();
|
||||
return (0);
|
||||
|
||||
} /*afs_RXCallBackServer */
|
||||
diff --git a/src/afs/afs_conn.c b/src/afs/afs_conn.c
|
||||
index 2a3a513..8728ce5 100644
|
||||
--- a/src/afs/afs_conn.c
|
||||
+++ b/src/afs/afs_conn.c
|
||||
@@ -532,7 +532,9 @@
|
||||
*/
|
||||
if ((service != 52) && (sap->natping == NULL)) {
|
||||
sap->natping = tc;
|
||||
+ AFS_GUNLOCK();
|
||||
rx_SetConnSecondsUntilNatPing(tc->id, 20);
|
||||
+ AFS_GLOCK();
|
||||
}
|
||||
|
||||
tc->forceConnectFS = 0; /* apparently we're appropriately connected now */
|
||||
@@ -542,7 +544,9 @@
|
||||
} /* end of if (tc->forceConnectFS)*/
|
||||
|
||||
*rxconn = tc->id;
|
||||
+ AFS_GUNLOCK();
|
||||
rx_GetConnection(*rxconn);
|
||||
+ AFS_GLOCK();
|
||||
|
||||
ReleaseSharedLock(&afs_xconn);
|
||||
return tc;
|
||||
@@ -672,7 +676,9 @@
|
||||
(unsigned long)(uintptrsz)ac, (int)ac->refCount);
|
||||
}
|
||||
ac->parent->refCount--;
|
||||
+ AFS_GUNLOCK();
|
||||
rx_PutConnection(rxconn);
|
||||
+ AFS_GLOCK();
|
||||
} /*afs_PutConn */
|
||||
|
||||
|
||||
diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c
|
||||
index 1879772..632aa84 100644
|
||||
--- a/src/afs/afs_daemons.c
|
||||
+++ b/src/afs/afs_daemons.c
|
||||
@@ -223,19 +223,21 @@
|
||||
}
|
||||
}
|
||||
if (last10MinCheck + 600 < now) {
|
||||
+ int addrs_changed;
|
||||
#ifdef AFS_USERSPACE_IP_ADDR
|
||||
extern int rxi_GetcbiInfo(void);
|
||||
#endif
|
||||
afs_Trace1(afs_iclSetp, CM_TRACE_PROBEUP, ICL_TYPE_INT32, 600);
|
||||
#ifdef AFS_USERSPACE_IP_ADDR
|
||||
- if (rxi_GetcbiInfo()) { /* addresses changed from last time */
|
||||
+ addrs_changed = rxi_GetcbiInfo();
|
||||
+#else
|
||||
+ AFS_GUNLOCK();
|
||||
+ addrs_changed = rxi_GetIFInfo();
|
||||
+ AFS_GLOCK();
|
||||
+#endif
|
||||
+ if (addrs_changed) { /* addresses changed from last time */
|
||||
afs_FlushCBs();
|
||||
}
|
||||
-#else /* AFS_USERSPACE_IP_ADDR */
|
||||
- if (rxi_GetIFInfo()) { /* addresses changed from last time */
|
||||
- afs_FlushCBs();
|
||||
- }
|
||||
-#endif /* else AFS_USERSPACE_IP_ADDR */
|
||||
if (!afs_CheckServerDaemonStarted)
|
||||
afs_CheckServers(0, NULL);
|
||||
afs_GCUserData(); /* gc old conns */
|
||||
diff --git a/src/afs/afs_init.c b/src/afs/afs_init.c
|
||||
index bdb791c..efa5132 100644
|
||||
--- a/src/afs/afs_init.c
|
||||
+++ b/src/afs/afs_init.c
|
||||
@@ -554,7 +554,9 @@
|
||||
afs_server =
|
||||
rx_NewService(0, RX_STATS_SERVICE_ID, "rpcstats", &secobj, 1,
|
||||
RXSTATS_ExecuteRequest);
|
||||
+ AFS_GUNLOCK();
|
||||
rx_StartServer(0);
|
||||
+ AFS_GLOCK();
|
||||
afs_osi_Wakeup(&afs_server); /* wakeup anyone waiting for it */
|
||||
return 0;
|
||||
|
||||
diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c
|
||||
index 610cfb3..9b7a906 100644
|
||||
--- a/src/afs/afs_pag_call.c
|
||||
+++ b/src/afs/afs_pag_call.c
|
||||
@@ -91,9 +91,12 @@
|
||||
afs_uuid_create(&afs_cb_interface.uuid);
|
||||
|
||||
AFS_GLOCK();
|
||||
-
|
||||
afs_InitStats();
|
||||
+ AFS_GUNLOCK();
|
||||
+
|
||||
rx_Init(htons(7001));
|
||||
+
|
||||
+ AFS_GLOCK();
|
||||
|
||||
AFS_STATCNT(afs_ResourceInit);
|
||||
AFS_RWLOCK_INIT(&afs_xuser, "afs_xuser");
|
||||
@@ -117,18 +120,20 @@
|
||||
1, RXSTATS_ExecuteRequest);
|
||||
pagcb_svc = rx_NewService(0, PAGCB_SERVICEID, "pagcb", &srv_secobj,
|
||||
1, PAGCB_ExecuteRequest);
|
||||
+ AFS_GUNLOCK();
|
||||
rx_StartServer(0);
|
||||
+ AFS_GLOCK();
|
||||
|
||||
clt_secobj = rxnull_NewClientSecurityObject();
|
||||
rmtsys_conn = rx_NewConnection(nfs_server_addr, htons(7009),
|
||||
RMTSYS_SERVICEID, clt_secobj, 0);
|
||||
|
||||
#ifdef RXK_LISTENER_ENV
|
||||
- afs_start_thread(rxk_Listener, "Rx Listener");
|
||||
+ afs_start_thread(rxk_Listener, "Rx Listener", 1);
|
||||
#endif
|
||||
- afs_start_thread((void *)(void *)rx_ServerProc, "Rx Server Thread");
|
||||
- afs_start_thread(afs_rxevent_daemon, "Rx Event Daemon");
|
||||
- afs_start_thread(afs_Daemon, "AFS PAG Daemon");
|
||||
+ afs_start_thread((void *)(void *)rx_ServerProc, "Rx Server Thread", 0);
|
||||
+ afs_start_thread(afs_rxevent_daemon, "Rx Event Daemon", 1);
|
||||
+ afs_start_thread(afs_Daemon, "AFS PAG Daemon", 1);
|
||||
|
||||
afs_icl_InitLogs();
|
||||
|
||||
diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c
|
||||
index c90df3d..239cf16 100644
|
||||
--- a/src/rx/rx_kcommon.c
|
||||
+++ b/src/rx/rx_kcommon.c
|
||||
@@ -267,13 +267,7 @@
|
||||
threadID = rxi_availProcs++;
|
||||
MUTEX_EXIT(&rx_quota_mutex);
|
||||
|
||||
-# ifdef RX_ENABLE_LOCKS
|
||||
- AFS_GUNLOCK();
|
||||
-# endif /* RX_ENABLE_LOCKS */
|
||||
rxi_ServerProc(threadID, NULL, NULL);
|
||||
-# ifdef RX_ENABLE_LOCKS
|
||||
- AFS_GLOCK();
|
||||
-# endif /* RX_ENABLE_LOCKS */
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -856,8 +850,6 @@
|
||||
# if (defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)) && defined(KERNEL_FUNNEL)
|
||||
thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
|
||||
# endif
|
||||
- AFS_ASSERT_GLOCK();
|
||||
- AFS_GUNLOCK();
|
||||
# if defined(AFS_HPUX102_ENV)
|
||||
# if defined(AFS_HPUX110_ENV)
|
||||
/* we need a file associated with the socket so sosend in NetSend
|
||||
@@ -997,14 +989,12 @@
|
||||
# endif /* else defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) */
|
||||
# endif /* else AFS_HPUX110_ENV */
|
||||
|
||||
- AFS_GLOCK();
|
||||
# if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
|
||||
thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
|
||||
# endif
|
||||
return (osi_socket *)newSocket;
|
||||
|
||||
bad:
|
||||
- AFS_GLOCK();
|
||||
# if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
|
||||
thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
|
||||
# endif
|
57
112fb94.diff
Normal file
57
112fb94.diff
Normal file
@ -0,0 +1,57 @@
|
||||
From 112fb94a608a9a810cc9b43fdf762f15277d9eaa Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Thu, 08 Feb 2024 11:50:16 -0700
|
||||
Subject: [PATCH] afs: Declare init_hckernel_mutex()
|
||||
|
||||
The function init_hckernel_mutex() (in rand.c) is flagged due to a
|
||||
missing prototype when building against a Linux 6.8 kernel (which sets
|
||||
the -Wmissing-declarations and -Wmissing-prototypes compiler flags as
|
||||
default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Add a function prototype for init_hckernel_mutex() to afs_osi.h and
|
||||
remove the prototype from afs_osi.c
|
||||
|
||||
There are no functional changes with this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15622
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit ccc2af429710104793fb4659b10697cceab182b3)
|
||||
|
||||
Change-Id: Ic5eb4584a980657a01a1cb4411c0c1f03b1f3560
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c
|
||||
index 6f54c63..e8f852e 100644
|
||||
--- a/src/afs/afs_osi.c
|
||||
+++ b/src/afs/afs_osi.c
|
||||
@@ -25,11 +25,6 @@
|
||||
* -- On HP called from afsc_link.
|
||||
* -- On SGI called from afs_init. */
|
||||
|
||||
-/* No hckernel-specific header for this prototype. */
|
||||
-#ifndef UKERNEL
|
||||
-extern void init_hckernel_mutex(void);
|
||||
-#endif
|
||||
-
|
||||
afs_lock_t afs_ftf; /* flush text lock */
|
||||
|
||||
#ifdef AFS_SGI_ENV
|
||||
diff --git a/src/afs/afs_osi.h b/src/afs/afs_osi.h
|
||||
index 79c44a9..e3f0e0c 100644
|
||||
--- a/src/afs/afs_osi.h
|
||||
+++ b/src/afs/afs_osi.h
|
||||
@@ -458,4 +458,9 @@
|
||||
# define osi_ShouldDeferRemunlink(avc) 0
|
||||
#endif
|
||||
|
||||
+/* No hckernel-specific header for this prototype. */
|
||||
+#ifndef UKERNEL
|
||||
+extern void init_hckernel_mutex(void);
|
||||
+#endif
|
||||
+
|
||||
#endif /* _AFS_OSI_ */
|
80
1e1bf8e.diff
Normal file
80
1e1bf8e.diff
Normal file
@ -0,0 +1,80 @@
|
||||
From 1e1bf8ebcd3c18b05326cd7b26a471db804aeaeb Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Tue, 24 Jul 2018 23:22:01 -0500
|
||||
Subject: [PATCH] LINUX: Minor osi_vfsop.c cleanup
|
||||
|
||||
- Fix the formatting on afs_mount/afs_get_sb definitions
|
||||
|
||||
- Declare a couple of functions static that are not referenced outside
|
||||
of this file
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/13282
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit fa15fbda0aa0c3810695d9b867d3258b60e76b7c)
|
||||
|
||||
Change-Id: I8a32475bf2ddb9c7206aef679947021925697c5a
|
||||
Reviewed-on: https://gerrit.openafs.org/15680
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
|
||||
index b85ab3f..bb49a5c 100644
|
||||
--- a/src/afs/LINUX/osi_vfsops.c
|
||||
+++ b/src/afs/LINUX/osi_vfsops.c
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/* Forward declarations */
|
||||
static int afs_root(struct super_block *afsp);
|
||||
-int afs_fill_super(struct super_block *sb, void *data, int silent);
|
||||
+static int afs_fill_super(struct super_block *sb, void *data, int silent);
|
||||
|
||||
|
||||
/*
|
||||
@@ -52,19 +52,22 @@
|
||||
#if defined(STRUCT_FILE_SYSTEM_TYPE_HAS_MOUNT)
|
||||
static struct dentry *
|
||||
afs_mount(struct file_system_type *fs_type, int flags,
|
||||
- const char *dev_name, void *data) {
|
||||
+ const char *dev_name, void *data)
|
||||
+{
|
||||
return mount_nodev(fs_type, flags, data, afs_fill_super);
|
||||
}
|
||||
#elif defined(GET_SB_HAS_STRUCT_VFSMOUNT)
|
||||
static int
|
||||
afs_get_sb(struct file_system_type *fs_type, int flags,
|
||||
- const char *dev_name, void *data, struct vfsmount *mnt) {
|
||||
+ const char *dev_name, void *data, struct vfsmount *mnt)
|
||||
+{
|
||||
return get_sb_nodev(fs_type, flags, data, afs_fill_super, mnt);
|
||||
}
|
||||
#else
|
||||
static struct super_block *
|
||||
afs_get_sb(struct file_system_type *fs_type, int flags,
|
||||
- const char *dev_name, void *data) {
|
||||
+ const char *dev_name, void *data)
|
||||
+{
|
||||
return get_sb_nodev(fs_type, flags, data, afs_fill_super);
|
||||
}
|
||||
#endif
|
||||
@@ -83,7 +86,7 @@
|
||||
|
||||
struct backing_dev_info *afs_backing_dev_info;
|
||||
|
||||
-int
|
||||
+static int
|
||||
afs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
int code = 0;
|
||||
@@ -372,7 +375,7 @@
|
||||
* statp is in user space, so we need to cobble together a statfs, then
|
||||
* copy it.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
#if defined(STATFS_TAKES_DENTRY)
|
||||
afs_statfs(struct dentry *dentry, struct kstatfs *statp)
|
||||
#else
|
71
2056ce8.diff
Normal file
71
2056ce8.diff
Normal file
@ -0,0 +1,71 @@
|
||||
From 2056ce8ae0d617d663e6181573c982994a1836db Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 15:30:23 -0700
|
||||
Subject: [PATCH] rx: Add static attribute to internal functions
|
||||
|
||||
When building against a Linux 6.8 kernel, functions that are missing
|
||||
prototypes or declarations are flagged.
|
||||
|
||||
We can add the static attribute to functions that are not referenced
|
||||
outside of the file that implements them to avoid having these functions
|
||||
flagged by the compiler.
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
There are no functional changes in this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15626
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 55adceba2d561ec4e89235de329782a68e603a11)
|
||||
|
||||
Change-Id: I1b2a6e1c07bd4b75b7b83e177f17865eb903e488
|
||||
---
|
||||
|
||||
diff --git a/src/rx/rx.c b/src/rx/rx.c
|
||||
index aaec609..d6c52c3 100644
|
||||
--- a/src/rx/rx.c
|
||||
+++ b/src/rx/rx.c
|
||||
@@ -6513,7 +6513,7 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
rxi_NatKeepAliveEvent(struct rxevent *event, void *arg1,
|
||||
void *dummy, int dummy2)
|
||||
{
|
||||
@@ -6615,7 +6615,7 @@
|
||||
* declared dead; if nothing has been sent for a while, we send a
|
||||
* keep-alive packet (if we're actually trying to keep the call alive)
|
||||
*/
|
||||
-void
|
||||
+static void
|
||||
rxi_KeepAliveEvent(struct rxevent *event, void *arg1, void *dummy,
|
||||
int dummy2)
|
||||
{
|
||||
@@ -6656,7 +6656,7 @@
|
||||
}
|
||||
|
||||
/* Does what's on the nameplate. */
|
||||
-void
|
||||
+static void
|
||||
rxi_GrowMTUEvent(struct rxevent *event, void *arg1, void *dummy, int dummy2)
|
||||
{
|
||||
struct rx_call *call = arg1;
|
||||
@@ -8266,7 +8266,7 @@
|
||||
static int rxi_monitor_peerStats = 0;
|
||||
|
||||
|
||||
-void
|
||||
+static void
|
||||
rxi_ClearRPCOpStat(rx_function_entry_v1_p rpc_stat)
|
||||
{
|
||||
rpc_stat->invocations = 0;
|
49
5312d06.diff
Normal file
49
5312d06.diff
Normal file
@ -0,0 +1,49 @@
|
||||
From 5312d069bc57d200ff65bf968c9bdff0f38fe653 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 09:13:27 -0700
|
||||
Subject: [PATCH] afs: Remove afs_osi_UnmaskUserLoop()
|
||||
|
||||
The function afs_osi_UnmaskUserLoop() is not referenced anywhere within
|
||||
the source tree.
|
||||
|
||||
Remove the function afs_osi_UnmaskUserLoop().
|
||||
|
||||
The commit: 'darwin-afsdb-handler-signal-mask-20040728' (9728182c00)
|
||||
introduced the function, but afs_osi_UnmaskUserLoop() has never been
|
||||
referenced or defined within a header file.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15617
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 587cfce29cb4e014e5b8d96e0433c5e7d2c6729a)
|
||||
|
||||
Change-Id: I0fe91a41e8f00773cb1d5976a8c3e39e4415f6bc
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c
|
||||
index 18732d1..6f54c63 100644
|
||||
--- a/src/afs/afs_osi.c
|
||||
+++ b/src/afs/afs_osi.c
|
||||
@@ -152,14 +152,6 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-void
|
||||
-afs_osi_UnmaskUserLoop(void)
|
||||
-{
|
||||
-#ifdef AFS_DARWIN_ENV
|
||||
- afs_osi_fullSigRestore();
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
/* register rxk listener proc info */
|
||||
void
|
||||
afs_osi_RxkRegister(void)
|
43
67e48c8.diff
Normal file
43
67e48c8.diff
Normal file
@ -0,0 +1,43 @@
|
||||
From 67e48c84b9971e6b865274408080fbf5ec7ba1ac Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 15:52:57 -0700
|
||||
Subject: [PATCH] afs: Add declaration for RXAFS_ResidencyCmd()
|
||||
|
||||
The function RXAFS_ResidencyCmd() is 'manually' defined within the
|
||||
afsint.xg, so a prototype for the function is not defined.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Add a prototype for RXAFS_ResidencyCmd
|
||||
|
||||
There are no functional changes with this commit
|
||||
|
||||
The function RXAFS_ResidencyCmd() was introduced with commit:
|
||||
'rename-residency-from-mrafs-to-osd-20090427' (8655541d1e)
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15619
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 1d6cfbc5f627abf3808aae97afb72662301483b5)
|
||||
|
||||
Change-Id: I42d0868b83e119b0c3348a3af8aaf5961c040bb2
|
||||
---
|
||||
|
||||
diff --git a/src/fsint/afsint.xg b/src/fsint/afsint.xg
|
||||
index 9fe4980..cdcd07a 100644
|
||||
--- a/src/fsint/afsint.xg
|
||||
+++ b/src/fsint/afsint.xg
|
||||
@@ -664,6 +664,7 @@
|
||||
) = 220;
|
||||
|
||||
#ifdef RPC_CLIENT
|
||||
+%int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs);
|
||||
%int RXAFS_ResidencyCmd(struct rx_connection *z_conn, AFSFid *Fid, struct FsCmdInputs *Inputs, struct FsCmdOutputs *Outputs)
|
||||
%{
|
||||
% return RXAFS_FsCmd(z_conn, Fid, Inputs, Outputs);
|
75
6b20756.diff
Normal file
75
6b20756.diff
Normal file
@ -0,0 +1,75 @@
|
||||
From 6b207567af7244a4fc6c314fdc815aa14c4eae09 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 09 Feb 2024 09:01:33 -0700
|
||||
Subject: [PATCH] afs: fix 'ops' variable may be used uninitialized
|
||||
|
||||
When the function rxfs_storeInit() has the static attribute, gcc flags
|
||||
the variable 'ops' as possibly uninitialized.
|
||||
|
||||
In function 'afs_CacheStoreDCaches',
|
||||
inlined from 'afs_CacheStoreVCache' at
|
||||
.../src/afs/afs_fetchstore.c:630:14:
|
||||
.../afs/afs_fetchstore.c:535:17: error: 'ops' may be used
|
||||
uninitialized [-Werror=maybe-uninitialized]
|
||||
535 | code = (*ops->destroy)(&rock, code);
|
||||
| ~^~~~~~~~~~~~~~
|
||||
...src/afs/afs_fetchstore.c: In function 'afs_CacheStoreVCache':
|
||||
...src/afs/afs_fetchstore.c:567:22: note: 'ops' was declared here
|
||||
567 | struct storeOps *ops;
|
||||
| ^~~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
This is a false positive report by the gcc compiler.
|
||||
|
||||
The function rxfs_storeInit() returns a 0 only when it has successfully
|
||||
assigned a value to the ops variable, and afs_CacheStoreDcaches() is
|
||||
only called if the return value from rxfs_storeInit() is 0.
|
||||
|
||||
The ops variable is only used within a block that is within a for loop,
|
||||
which could leave a stray value if the variable isn't initialized within
|
||||
that loop.
|
||||
|
||||
Assigning a NULL to ops is sufficient to avoid the compiler error, and
|
||||
relocating the declaration of the ops variable into the block where it
|
||||
is actually used ensures that it's always initialized before its use
|
||||
within the loop.
|
||||
|
||||
Clean up whitespace in the statement that follows the new location for
|
||||
the ops variable.
|
||||
|
||||
Note, this commit is being added before a commit that adds the static
|
||||
attribute to the rxfs_storeInit() function which also "fixes" the
|
||||
compiler error (see: afs: Add static attribute to internal functions).
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15630
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 36e4c02ff27b9d66755b9544778896b9b1e5c391)
|
||||
|
||||
Change-Id: I9d8a07e576c6bf889f8f182c6fc0d34dc997c004
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
|
||||
index 7b35b8f..63b370d 100644
|
||||
--- a/src/afs/afs_fetchstore.c
|
||||
+++ b/src/afs/afs_fetchstore.c
|
||||
@@ -564,7 +564,6 @@
|
||||
afs_hyper_t *anewDV, afs_size_t *amaxStoredLength)
|
||||
{
|
||||
afs_int32 code = 0;
|
||||
- struct storeOps *ops;
|
||||
void * rock = NULL;
|
||||
unsigned int i, j;
|
||||
|
||||
@@ -619,7 +618,8 @@
|
||||
ICL_HANDLE_OFFSET(length));
|
||||
|
||||
do {
|
||||
- tc = afs_Conn(&avc->f.fid, areq, 0, &rxconn);
|
||||
+ struct storeOps *ops = NULL;
|
||||
+ tc = afs_Conn(&avc->f.fid, areq, 0, &rxconn);
|
||||
|
||||
#ifdef AFS_64BIT_CLIENT
|
||||
restart:
|
48
743d72f.diff
Normal file
48
743d72f.diff
Normal file
@ -0,0 +1,48 @@
|
||||
From 743d72f6b6aba44599099c7cbc879435f9005e3a Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Wed, 03 Apr 2024 11:36:54 -0600
|
||||
Subject: [PATCH] Linux: Define afs_thread_wrapper() as static
|
||||
|
||||
When building against a Linux 6.8 kernel, functions that are missing
|
||||
prototypes or declarations are flagged.
|
||||
|
||||
We can add the static attribute to functions that are not referenced
|
||||
outside of the file that implements them to avoid having these functions
|
||||
flagged by the compiler.
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
This is an openafs-1.8.x specific commit.
|
||||
|
||||
The function afs_thread_wrapper() in LINUX/osi_misc.c on the master
|
||||
branch was changed to a static function with commit:
|
||||
'afs: Drop GLOCK for various Rx calls' (d5e1428a3b)
|
||||
However this is a larger change than needed to fix the build problem and
|
||||
the commit could have a significant impact for 1.8.x since it is
|
||||
changing rx locking. To avoid introducing such a change, just change
|
||||
the afs_thread_wrapper() to static as a 1.8.x specific commit.
|
||||
|
||||
There are no functional changes in this commit.
|
||||
|
||||
Change-Id: I4edc61e6a4989c16ccf41b935e205dbf209bf2a5
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
|
||||
index aa5d5fc..27f73cd 100644
|
||||
--- a/src/afs/LINUX/osi_misc.c
|
||||
+++ b/src/afs/LINUX/osi_misc.c
|
||||
@@ -155,7 +155,8 @@
|
||||
|
||||
|
||||
/* This could use some work, and support on more platforms. */
|
||||
-int afs_thread_wrapper(void *rock)
|
||||
+static int
|
||||
+afs_thread_wrapper(void *rock)
|
||||
{
|
||||
void (*proc)(void) = rock;
|
||||
__module_get(THIS_MODULE);
|
66
7cae97b.diff
Normal file
66
7cae97b.diff
Normal file
@ -0,0 +1,66 @@
|
||||
From 7cae97b86fbcc4a53967927d6c2cae9dcbc6ac4d Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Mon, 12 Feb 2024 12:31:30 -0700
|
||||
Subject: [PATCH] Linux 6.8: use hlist iteration for dentry children
|
||||
|
||||
Linux 6.8 commit 'dentry: switch the lists of children to hlist'
|
||||
(da549bdd15) replaces the dentry lists d_subdirs/d_child with the hlist
|
||||
d_children/d_sib.
|
||||
|
||||
Add an autoconf test for a d_children member in the dentry structure.
|
||||
|
||||
Define a macro that uses the applicable Linux function for iterating
|
||||
over a dentry's children.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15632
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 8e0bbe6a07523dd2e7efb3c9d1b4ad9e19fc9bb7)
|
||||
|
||||
Change-Id: Ief4c334c4ef3e54822e068dcdf654541e86b9176
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_vcache.c b/src/afs/LINUX/osi_vcache.c
|
||||
index 897fd37..43644f4 100644
|
||||
--- a/src/afs/LINUX/osi_vcache.c
|
||||
+++ b/src/afs/LINUX/osi_vcache.c
|
||||
@@ -15,6 +15,14 @@
|
||||
|
||||
#include "osi_compat.h"
|
||||
|
||||
+#if defined(STRUCT_DENTRY_HAS_D_CHILDREN)
|
||||
+# define afs_for_each_child(child, parent) \
|
||||
+ hlist_for_each_entry((child), &(parent)->d_children, d_sib)
|
||||
+#else
|
||||
+# define afs_for_each_child(child, parent) \
|
||||
+ list_for_each_entry((child), &(parent)->d_subdirs, d_child)
|
||||
+#endif
|
||||
+
|
||||
static void
|
||||
TryEvictDirDentries(struct inode *inode)
|
||||
{
|
||||
@@ -312,7 +320,7 @@
|
||||
* because 'dp' is an ancestor of 'child'.
|
||||
*/
|
||||
struct dentry *child;
|
||||
- list_for_each_entry(child, &dp->d_subdirs, d_child) {
|
||||
+ afs_for_each_child(child, dp) {
|
||||
spin_lock(&child->d_lock);
|
||||
child->d_time = 0;
|
||||
spin_unlock(&child->d_lock);
|
||||
diff --git a/src/cf/linux-kernel-struct.m4 b/src/cf/linux-kernel-struct.m4
|
||||
index 2824ec1..5cd346f 100644
|
||||
--- a/src/cf/linux-kernel-struct.m4
|
||||
+++ b/src/cf/linux-kernel-struct.m4
|
||||
@@ -17,6 +17,9 @@
|
||||
dnl linux 2.6.16 moved dentry->d_child to dentry->d_u.d_child
|
||||
dnl linux 3.19 moved it back to dentry->d_child
|
||||
AC_CHECK_LINUX_STRUCT([dentry], [d_u.d_child], [dcache.h])
|
||||
+dnl linux 6.8 uses hlist for dentry children and renamed
|
||||
+dnl d_subdirs/d_child to d_childern/d_sib
|
||||
+AC_CHECK_LINUX_STRUCT([dentry], [d_children], [dcache.h])
|
||||
AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
|
||||
AC_CHECK_LINUX_STRUCT([group_info], [gid], [cred.h])
|
||||
AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
|
81
81b910a.diff
Normal file
81
81b910a.diff
Normal file
@ -0,0 +1,81 @@
|
||||
From 81b910ab4a0ef0d0b6cd3a1a636fcbcd050c0245 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Tue, 05 Mar 2024 08:37:47 -0700
|
||||
Subject: [PATCH] Linux 6.8: Remove ctl_table sentinels
|
||||
|
||||
The Linux 6.8 commit 'sysctl: Remove the now superfluous sentinel
|
||||
elements from ctl_table array' (c8a65501d3) was a clean up commit
|
||||
that removed the sentinel entry in the ctl_table array (e.g. the
|
||||
"null" entry at the end of the table).
|
||||
|
||||
As of Linux 6.8, including the sentinel entry (.procname =) in the
|
||||
ctl_table is unnecessary, but doesn't yet break anything. But it is
|
||||
likely that including the sentinel will start to cause runtime errors in
|
||||
future Linux versions very soon, so avoid the sentinel when we can, to
|
||||
avoid possible problems in the future.
|
||||
|
||||
Define a new macro that can be used as the last entry of a ctl_table
|
||||
that will either add a "null" entry, or nothing.
|
||||
|
||||
There is not a specific build test we can use within configure, so we
|
||||
must explicitly test the Linux version to decide if we need to use a
|
||||
sentinel or not when defining the macro. We are selecting 6.8 to match
|
||||
the version where the Linux kernel is removing the sentinels from the in
|
||||
kernel filesystems.
|
||||
|
||||
Note: See the Linux merge commits 'Merge tag 'sysctl-6.8-rc1' of
|
||||
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux' (a05aea98d4)
|
||||
for more details behind the staged removal of the sentinels in the
|
||||
ctl_table structures and the potential future change for removing the
|
||||
actual check for the sentinel within the Linux kernel.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15645
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 35c8c1bf0b1cb48178f676ba5bcf16ad59c5a33b)
|
||||
|
||||
Change-Id: I34cb7586003e10a6c7438d7205123d57af30585e
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c
|
||||
index a0a0398..c1116fc 100644
|
||||
--- a/src/afs/LINUX/osi_sysctl.c
|
||||
+++ b/src/afs/LINUX/osi_sysctl.c
|
||||
@@ -54,6 +54,14 @@
|
||||
# define AFS_SYSCTL_INT(num, perms, var) \
|
||||
AFS_SYSCTL_INT2(num, perms, #var, var)
|
||||
|
||||
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
|
||||
+/* end of list sentinel not needed */
|
||||
+# define AFS_SYSCTL_SENTINEL
|
||||
+# else
|
||||
+/* NULL entry to mark the end of the list */
|
||||
+# define AFS_SYSCTL_SENTINEL { .procname = NULL }
|
||||
+# endif
|
||||
+
|
||||
static struct ctl_table_header *afs_sysctl = NULL;
|
||||
|
||||
static struct ctl_table afs_sysctl_table[] = {
|
||||
@@ -75,9 +83,7 @@
|
||||
AFS_SYSCTL_INT( 13, 0644, afs_cacheBlocks),
|
||||
AFS_SYSCTL_INT2(14, 0644, "md5inum", afs_md5inum),
|
||||
|
||||
- {
|
||||
- .procname = 0
|
||||
- }
|
||||
+ AFS_SYSCTL_SENTINEL
|
||||
};
|
||||
# if !defined(HAVE_LINUX_REGISTER_SYSCTL)
|
||||
static struct ctl_table fs_sysctl_table[] = {
|
||||
@@ -87,9 +93,7 @@
|
||||
.mode = 0555,
|
||||
.child = afs_sysctl_table
|
||||
},
|
||||
- {
|
||||
- .procname = 0
|
||||
- }
|
||||
+ AFS_SYSCTL_SENTINEL
|
||||
};
|
||||
# endif
|
||||
int
|
112
87ab04a.diff
Normal file
112
87ab04a.diff
Normal file
@ -0,0 +1,112 @@
|
||||
From 87ab04acc921794f49084548cf5fc94f6f37f10e Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Mon, 12 Feb 2024 08:25:47 -0700
|
||||
Subject: [PATCH] afs: Add includes to pick up function prototypes
|
||||
|
||||
The functions defined in LINUX/osi_crypto.c, osi_pagecopy.c,
|
||||
osi_probe.c, and osi_syscall.c have function prototypes defined in
|
||||
existing header files, however either due to missing includes or
|
||||
preprocessor conditionals that skip the includes, these function
|
||||
prototypes are not being pulled in.
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Add the necessary includes to osi_crypto.c and osi_pagecopy.c and
|
||||
re-arrange the includes in osi_probe.c and osi_syscall.c to ensure that
|
||||
the function prototypes are present when building the Linux kernel
|
||||
module.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15641
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 3683f15278e34e13d7272928eaf666f0acc4e1e9)
|
||||
|
||||
Change-Id: Iac704fc98d0d685358224049f383d68aa7a105f8
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_crypto.c b/src/afs/LINUX/osi_crypto.c
|
||||
index ead1916..7f8435c 100644
|
||||
--- a/src/afs/LINUX/osi_crypto.c
|
||||
+++ b/src/afs/LINUX/osi_crypto.c
|
||||
@@ -25,6 +25,9 @@
|
||||
#include <afsconfig.h>
|
||||
#include "afs/param.h"
|
||||
|
||||
+#include "afs/sysincludes.h"
|
||||
+#include "afsincludes.h"
|
||||
+
|
||||
#include <linux/random.h>
|
||||
|
||||
int
|
||||
diff --git a/src/afs/LINUX/osi_pagecopy.c b/src/afs/LINUX/osi_pagecopy.c
|
||||
index 7142a1b..42f5e38 100644
|
||||
--- a/src/afs/LINUX/osi_pagecopy.c
|
||||
+++ b/src/afs/LINUX/osi_pagecopy.c
|
||||
@@ -61,6 +61,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/slab.h>
|
||||
+#include "osi_pagecopy.h"
|
||||
|
||||
static DECLARE_WAIT_QUEUE_HEAD (afs_pagecopy_wq);
|
||||
static spinlock_t afs_pagecopy_lock;
|
||||
diff --git a/src/afs/LINUX/osi_probe.c b/src/afs/LINUX/osi_probe.c
|
||||
index 9b06fa7..be42ecf 100644
|
||||
--- a/src/afs/LINUX/osi_probe.c
|
||||
+++ b/src/afs/LINUX/osi_probe.c
|
||||
@@ -48,9 +48,13 @@
|
||||
#ifdef OSI_PROBE_STANDALONE
|
||||
# define OSI_PROBE_DEBUG
|
||||
#endif
|
||||
+
|
||||
#ifndef OSI_PROBE_STANDALONE
|
||||
# include <afsconfig.h>
|
||||
# include "afs/param.h"
|
||||
+
|
||||
+# include "afs/sysincludes.h"
|
||||
+# include "afsincludes.h"
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
@@ -60,10 +64,6 @@
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)
|
||||
/* Slightly kludgy, but too bad */
|
||||
#define scsi_command_size scsi_command_size_tbl
|
||||
-#endif
|
||||
-#ifndef OSI_PROBE_STANDALONE
|
||||
-# include "afs/sysincludes.h"
|
||||
-# include "afsincludes.h"
|
||||
#endif
|
||||
#include <linux/sched.h>
|
||||
#ifdef HAVE_LINUX_CONFIG_H
|
||||
diff --git a/src/afs/LINUX/osi_syscall.c b/src/afs/LINUX/osi_syscall.c
|
||||
index 836491c..5e9e519 100644
|
||||
--- a/src/afs/LINUX/osi_syscall.c
|
||||
+++ b/src/afs/LINUX/osi_syscall.c
|
||||
@@ -14,6 +14,10 @@
|
||||
#include <afsconfig.h>
|
||||
#include "afs/param.h"
|
||||
|
||||
+#include <linux/module.h> /* early to avoid printf->printk mapping */
|
||||
+#include "afs/sysincludes.h"
|
||||
+#include "afsincludes.h"
|
||||
+
|
||||
#ifdef LINUX_KEYRING_SUPPORT
|
||||
/* The syscall probing stuff is unnecessary (and is never called) if we have
|
||||
* keyrings support; we rely on keyrings instead of group ids to track PAGs.
|
||||
@@ -31,9 +35,6 @@
|
||||
|
||||
#else /* LINUX_KEYRING_SUPPORT */
|
||||
|
||||
-#include <linux/module.h> /* early to avoid printf->printk mapping */
|
||||
-#include "afs/sysincludes.h"
|
||||
-#include "afsincludes.h"
|
||||
#include <linux/unistd.h> /* For syscall numbers. */
|
||||
#include <linux/mm.h>
|
||||
|
52
9f052c1.diff
Normal file
52
9f052c1.diff
Normal file
@ -0,0 +1,52 @@
|
||||
From 9f052c137d1184a783c8ac3182c3544b275484f5 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Sat, 09 Jan 2021 12:50:03 -0600
|
||||
Subject: [PATCH] afs: Remove SRXAFSCB_GetDE
|
||||
|
||||
The GetDE RPC has been commented out from afscbint.xg effectively
|
||||
since it was introduced, but we still define the SRXAFSCB_GetDE server
|
||||
stub for it.
|
||||
|
||||
This is useless, but also potentially dangerous, since the stub
|
||||
routine just returns success, without populating the output arguments.
|
||||
One of the output arguments is a string, and so if this RPC is
|
||||
actually run, the rxgen-generated server code will try to xdr_string()
|
||||
that string. Since we never set it to anything, this will result in
|
||||
xdr_string trying to dereference a NULL pointer.
|
||||
|
||||
None of this actually happens currently, since the GetDE RPC is
|
||||
commented out. But to avoid the above situation if it's ever
|
||||
uncommented, remove the useless SRXAFSCB_GetDE function.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/14488
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 444a971edc47c34efbefed6e332ee6e843ae072b)
|
||||
|
||||
Change-Id: I83846d79ce3143571923cb6023075620091f093d
|
||||
Reviewed-on: https://gerrit.openafs.org/15681
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c
|
||||
index e7d8ab5..22edefb 100644
|
||||
--- a/src/afs/afs_callback.c
|
||||
+++ b/src/afs/afs_callback.c
|
||||
@@ -1636,14 +1636,3 @@
|
||||
|
||||
return code;
|
||||
}
|
||||
-
|
||||
-
|
||||
-int
|
||||
-SRXAFSCB_GetDE(struct rx_call *a_call, afs_int32 a_index, afs_int32 *addr,
|
||||
- afs_int32 *inode, afs_int32 *flags, afs_int32 *time,
|
||||
- char ** fileName)
|
||||
-{ /*SRXAFSCB_GetDE*/
|
||||
- int code = 0; /*Return code*/
|
||||
- return(code);
|
||||
-
|
||||
-} /*SRXAFSCB_GetDE*/
|
40
ChangeLog
40
ChangeLog
@ -1,3 +1,43 @@
|
||||
commit 1a36b929773ea369a5b14a48759949fe6acbe3b7
|
||||
Author: Mark Vitale <mvitale@sinenomine.net>
|
||||
Date: Thu Mar 7 12:48:22 2024 -0500
|
||||
|
||||
Make OpenAFS 1.8.11
|
||||
|
||||
Update version strings for the 1.8.11 release.
|
||||
Add final updates to NEWS.
|
||||
|
||||
Change-Id: Id66da29a5001f18e8816bcb214f70544474bfaef
|
||||
Reviewed-on: https://gerrit.openafs.org/15671
|
||||
Tested-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
|
||||
commit 33fabe9e0b3c8b608bff82f3fda9ba2f8b3775a7
|
||||
Author: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Tue Nov 13 11:09:52 2018 -0600
|
||||
|
||||
roken: Use srcdir for roken-post.h
|
||||
|
||||
roken-post.h is a source file, not a generated file in the objdir.
|
||||
Specify $(srcdir) so we can work with objdir builds.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/13387
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 345a739b7bb6c9c142a2b0fe584fed6c44d6c655)
|
||||
|
||||
Change-Id: Ie02f0aaf373bebe74b0eaf8969b712c146a462f8
|
||||
Reviewed-on: https://gerrit.openafs.org/15638
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
|
||||
commit 47c4fb427a02809a73a8f7024e49ff5f58d2be06
|
||||
Author: Stephan Wiesand <stephan.wiesand@desy.de>
|
||||
Date: Thu Aug 3 17:35:02 2023 +0200
|
||||
|
90
RELNOTES-1.8.11
Normal file
90
RELNOTES-1.8.11
Normal file
@ -0,0 +1,90 @@
|
||||
User-Visible OpenAFS Changes
|
||||
|
||||
OpenAFS 1.8.11
|
||||
|
||||
All platforms
|
||||
|
||||
* Check Rx RPC call number in incoming packets before allocating new
|
||||
RPC calls to avoid re-running RPC calls when spurious packets are
|
||||
received (15562)
|
||||
|
||||
* Fix memory leaks (15516 15517)
|
||||
|
||||
* Fix build failure when building with _FORTIFY_SOURCE (15518 15519)
|
||||
|
||||
* Fix build failures when building with the clang compiler (15540 15541
|
||||
15547 15548)
|
||||
|
||||
* Improve error detection in OpenAFS directories for both clients
|
||||
and servers (15544 15545 15546)
|
||||
|
||||
* Add a Makefile target to build Red Hat RPM packages (15514)
|
||||
|
||||
* Add support for custom version numbers in Red Hat RPM packages (15513)
|
||||
|
||||
All server platforms
|
||||
|
||||
* Fix File Server and Protection Server crashes due to recursive thread
|
||||
lock bug (15609)
|
||||
|
||||
* Fix fileserver crashes during startup (15509 15543)
|
||||
|
||||
* The bosserver no longer creates the client configuration directory and
|
||||
"ThisCell" and "CellServDB" symlinks. The "vos", "pts", and "bos"
|
||||
commands now read cell configuration from the server cell configuration
|
||||
directory when the client cell configuration directory is not present.
|
||||
This change allows server packaging to be independent of client packaging
|
||||
and removes the need for client configuration artifacts on hosts running
|
||||
server processes only (15510 15511 15512)
|
||||
|
||||
* Print a warning in the volserver log when an older version of a volume
|
||||
is restored over an existing volume, unless the volume was restored with
|
||||
"-overwrite full" (15531)
|
||||
|
||||
* Print a warning in the bosserver log when the bosserver was not started
|
||||
in restricted mode (15537)
|
||||
|
||||
* Avoid unbounded string copies when looking up volumes by name in
|
||||
the vlserver (15538)
|
||||
|
||||
* Fix off-by-one directory entry name size check in salvager (15598)
|
||||
|
||||
All client platforms
|
||||
|
||||
* Updated the CellServDB to the latest version from grand.central.org
|
||||
(15603)
|
||||
|
||||
All UNIX/Linux client platforms
|
||||
|
||||
* Fix PAG object memory leak which can degrade performance (15506)
|
||||
|
||||
* Improve kernel memory reclamation after accessing a large number of
|
||||
files (15536)
|
||||
|
||||
* Improve cache corruption detection and refetch cache entries
|
||||
when cache entry size mismatches are detected (15532 15533 15535)
|
||||
|
||||
* Fix panic in user-space client (libuafs, Fuse client) (15539)
|
||||
|
||||
Linux clients
|
||||
|
||||
* Add support for Linux 6.7 (15600)
|
||||
|
||||
* Add support for Linux 6.6 (15575 15589 15590)
|
||||
|
||||
* Add support for Linux 6.5 (15520 15521 15522 15523 15558)
|
||||
|
||||
* Fix BUG when directory entry names are longer than 16 characters.
|
||||
Affects Linux 6.5 or higher built with GCC 13 or higher (15599)
|
||||
|
||||
* Invalidate Linux VFS dentry caches in the AFS filesystem when running
|
||||
"fs flush*" commands. This reduces the need to drop Linux VFS caches
|
||||
by writing to the "/proc/sys/vm/drop_caches" file when
|
||||
troubleshooting (15515)
|
||||
|
||||
* Fix build failures (15507 15508 15596 15542 15549)
|
||||
|
||||
macOS
|
||||
|
||||
* Add support for MacOS 14 ("Sonoma") (15602)
|
||||
|
@ -1 +0,0 @@
|
||||
User-Visible OpenAFS Changes
|
177
a14a9ad.diff
Normal file
177
a14a9ad.diff
Normal file
@ -0,0 +1,177 @@
|
||||
From a14a9add73341bc3c355250bc43282e022bff95c Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Wed, 07 Feb 2024 15:25:10 -0700
|
||||
Subject: [PATCH] Linux 6.8: Add function prototypes for krb5
|
||||
|
||||
The external files for heimdal/krb5 do not provide function prototypes
|
||||
in a header file that is used when building files that we use from
|
||||
heimdal/krb5 (e.g. crypto.c).
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
We cannot modify the external source files, however there is the local
|
||||
OpenAFS include file, krb5_locl.h, that does contain OpenAFS specific
|
||||
changes.
|
||||
|
||||
Add declarations to krb5_locl.h for the functions defined in the
|
||||
heimdal/krb5 source.
|
||||
|
||||
There are no functional changes with this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15621
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 612927dd1dd44bbd08eda790de12b24213583156)
|
||||
|
||||
Change-Id: Iaae28186a24c3c5ca4407de9563c8cfed9644921
|
||||
---
|
||||
|
||||
diff --git a/src/crypto/rfc3961/krb5_locl.h b/src/crypto/rfc3961/krb5_locl.h
|
||||
index 6e70673..04292ee 100644
|
||||
--- a/src/crypto/rfc3961/krb5_locl.h
|
||||
+++ b/src/crypto/rfc3961/krb5_locl.h
|
||||
@@ -287,6 +287,138 @@
|
||||
krb5_enctype etype,
|
||||
char **string);
|
||||
|
||||
+/*
|
||||
+ * Unused prototypes from heimdal/krb5. These are functions that are not used
|
||||
+ * outside of their compilation unit at all, but we may need to declare them to
|
||||
+ * avoid compiler warnings.
|
||||
+ */
|
||||
+struct _krb5_key_data;
|
||||
+struct _krb5_encryption_type;
|
||||
+/* heimdal/krb5/crypto.c */
|
||||
+KRB5_LIB_FUNCTION krb5_error_code _krb5_derive_key(krb5_context context,
|
||||
+ struct _krb5_encryption_type *et,
|
||||
+ struct _krb5_key_data *key,
|
||||
+ const void *constant,
|
||||
+ size_t len);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_allow_weak_crypto(krb5_context context,
|
||||
+ krb5_boolean enable);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_checksum_disable(krb5_context context,
|
||||
+ krb5_cksumtype type);
|
||||
+KRB5_LIB_FUNCTION krb5_boolean krb5_checksum_is_keyed(krb5_context context,
|
||||
+ krb5_cksumtype type);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_cksumtype_valid(krb5_context context,
|
||||
+ krb5_cksumtype ctype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_create_checksum_iov(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ krb5_crypto_iov *data,
|
||||
+ unsigned int num_data,
|
||||
+ krb5_cksumtype *type);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_getblocksize(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ size_t *blocksize);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_getenctype(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ krb5_enctype *enctype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_getpadsize(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ size_t *padsize);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_length(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ int type,
|
||||
+ size_t *len);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_length_iov(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ krb5_crypto_iov *data,
|
||||
+ unsigned int num_data);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_decrypt_iov_ivec(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ krb5_crypto_iov *data,
|
||||
+ unsigned int num_data,
|
||||
+ void *ivec);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_decrypt_ivec(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ void *data,
|
||||
+ size_t len,
|
||||
+ krb5_data *result,
|
||||
+ void *ivec);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_encrypt_iov_ivec(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ krb5_crypto_iov *data,
|
||||
+ int num_data,
|
||||
+ void *ivec);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_encrypt_ivec(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ const void *data,
|
||||
+ size_t len,
|
||||
+ krb5_data *result,
|
||||
+ void *ivec);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_enctype_disable(krb5_context context,
|
||||
+ krb5_enctype enctype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_enctype_enable(krb5_context context,
|
||||
+ krb5_enctype enctype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_enctype_to_keytype(krb5_context context,
|
||||
+ krb5_enctype etype,
|
||||
+ krb5_keytype *keytype);
|
||||
+KRB5_LIB_FUNCTION size_t krb5_get_wrapped_length (krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ size_t data_len);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_hmac(krb5_context context,
|
||||
+ krb5_cksumtype cktype,
|
||||
+ const void *data,
|
||||
+ size_t len,
|
||||
+ unsigned usage,
|
||||
+ krb5_keyblock *key,
|
||||
+ Checksum *result);
|
||||
+KRB5_LIB_FUNCTION krb5_boolean krb5_is_enctype_weak(krb5_context context,
|
||||
+ krb5_enctype enctype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_string_to_enctype(krb5_context context,
|
||||
+ const char *string,
|
||||
+ krb5_enctype *etype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_verify_checksum_iov(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ krb5_crypto_iov *data,
|
||||
+ unsigned int num_data,
|
||||
+ krb5_cksumtype *type);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_generate_random_keyblock(krb5_context context,
|
||||
+ krb5_enctype type,
|
||||
+ krb5_keyblock *key);
|
||||
+KRB5_LIB_FUNCTION krb5_boolean krb5_checksum_is_collision_proof(krb5_context context,
|
||||
+ krb5_cksumtype type);
|
||||
+
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_cksumtype_to_enctype(krb5_context context,
|
||||
+ krb5_cksumtype ctype,
|
||||
+ krb5_enctype *etype);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_encrypt_EncryptedData(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ void *data,
|
||||
+ size_t len,
|
||||
+ int kvno,
|
||||
+ EncryptedData *result);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_crypto_getconfoundersize(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ size_t *confoundersize);
|
||||
+
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_decrypt_EncryptedData(krb5_context context,
|
||||
+ krb5_crypto crypto,
|
||||
+ unsigned usage,
|
||||
+ const EncryptedData *e,
|
||||
+ krb5_data *result);
|
||||
+/* heimdal/krb5/data.c */
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_data_realloc(krb5_data *p, int len);
|
||||
+KRB5_LIB_FUNCTION krb5_error_code krb5_copy_data(krb5_context context,
|
||||
+ const krb5_data *indata,
|
||||
+ krb5_data **outdata);
|
||||
+KRB5_LIB_FUNCTION int krb5_data_cmp(const krb5_data *data1, const krb5_data *data2);
|
||||
+/* heimdal/krb5/store-int.c */
|
||||
+KRB5_LIB_FUNCTION krb5_ssize_t _krb5_get_int(void *buffer, unsigned long *value, size_t size);
|
||||
+
|
||||
#include "crypto.h"
|
||||
|
||||
struct _krb5_checksum_type * _krb5_find_checksum (krb5_cksumtype);
|
99
a87845d.diff
Normal file
99
a87845d.diff
Normal file
@ -0,0 +1,99 @@
|
||||
From a87845d40aac04ff12dde369753c9472a8e4808d Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Mon, 12 Feb 2024 09:43:29 -0700
|
||||
Subject: [PATCH] afs: Remove SRXAFSCB* protos from afs_prototypes.h
|
||||
|
||||
The prototypes for the afscbint RPC functions (SRXAFSCB_*) implemented
|
||||
in afs_callback.c are defined in 2 locations, afs_protypes.h and
|
||||
afscbint.h (which is generated by rxgen).
|
||||
|
||||
Remove the protoypes for the SRXAFSCB_* functions from afs_prototypes.h
|
||||
as they are redundant and are currently out of sync (the prototypes
|
||||
for SRXAFSCB_GetCellByNum() and SRXAFSCB_TellMeAboutYourself() are
|
||||
not present in afs_prototypes.h). Also remove a redundant prototype for
|
||||
afs_RXCallBackServer() which was prototyped both before and in the
|
||||
middle of the SRXAFSCB* prototypes.
|
||||
|
||||
Since afs_callback.c only pulled in afs_prototypes.h and not afscbint.h,
|
||||
add an include for afscbint.h to ensure that the all the prototypes for
|
||||
the SRXAFSCB_* functions are present.
|
||||
|
||||
The 2 functions listed above are flagged due to missing prototypes when
|
||||
building against a Linux 6.8 kernel (which sets the
|
||||
-Wmissing-declarations and -Wmissing-prototypes compiler flags as
|
||||
default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15644
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit fae4003b403420d0b548920c7837a2d2b6e432ae)
|
||||
|
||||
Change-Id: I7d435455fc60cc10200ee91d0d76534367ab5883
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c
|
||||
index 56e8cd2..1fe990e 100644
|
||||
--- a/src/afs/afs_callback.c
|
||||
+++ b/src/afs/afs_callback.c
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "afs/sysincludes.h" /*Standard vendor system headers */
|
||||
#include "afsincludes.h" /*AFS-based standard headers */
|
||||
+#define FSINT_COMMON_XG
|
||||
+#include "afs/afscbint.h"
|
||||
#include "afs/afs_stats.h" /*Cache Manager stats */
|
||||
#include "afs/opr.h"
|
||||
#include "afs/afs_args.h"
|
||||
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
|
||||
index d7894dd..b9811f8 100644
|
||||
--- a/src/afs/afs_prototypes.h
|
||||
+++ b/src/afs/afs_prototypes.h
|
||||
@@ -65,44 +65,7 @@
|
||||
extern struct interfaceAddr afs_cb_interface;
|
||||
|
||||
extern int afs_RXCallBackServer(void);
|
||||
-extern int SRXAFSCB_GetCE(struct rx_call *a_call, afs_int32 a_index,
|
||||
- struct AFSDBCacheEntry *a_result);
|
||||
-extern int SRXAFSCB_GetCE64(struct rx_call *a_call, afs_int32 a_index,
|
||||
- struct AFSDBCacheEntry64 *a_result);
|
||||
-extern int SRXAFSCB_GetLock(struct rx_call *a_call, afs_int32 a_index,
|
||||
- struct AFSDBLock *a_result);
|
||||
-extern int SRXAFSCB_CallBack(struct rx_call *a_call,
|
||||
- struct AFSCBFids *a_fids,
|
||||
- struct AFSCBs *a_callbacks);
|
||||
-extern int SRXAFSCB_Probe(struct rx_call *a_call);
|
||||
-extern int SRXAFSCB_InitCallBackState(struct rx_call *a_call);
|
||||
-extern int SRXAFSCB_XStatsVersion(struct rx_call *a_call,
|
||||
- afs_int32 * a_versionP);
|
||||
-extern int SRXAFSCB_GetXStats(struct rx_call *a_call,
|
||||
- afs_int32 a_clientVersionNum,
|
||||
- afs_int32 a_collectionNumber,
|
||||
- afs_int32 * a_srvVersionNumP,
|
||||
- afs_int32 * a_timeP, AFSCB_CollData * a_dataP);
|
||||
-extern int afs_RXCallBackServer(void);
|
||||
extern int shutdown_CB(void);
|
||||
-extern int SRXAFSCB_InitCallBackState2(struct rx_call *a_call,
|
||||
- struct interfaceAddr *addr);
|
||||
-extern int SRXAFSCB_WhoAreYou(struct rx_call *a_call,
|
||||
- struct interfaceAddr *addr);
|
||||
-extern int SRXAFSCB_InitCallBackState3(struct rx_call *a_call,
|
||||
- afsUUID * a_uuid);
|
||||
-extern int SRXAFSCB_ProbeUuid(struct rx_call *a_call, afsUUID * a_uuid);
|
||||
-extern int SRXAFSCB_GetServerPrefs(struct rx_call *a_call, afs_int32 a_index,
|
||||
- afs_int32 * a_srvr_addr,
|
||||
- afs_int32 * a_srvr_rank);
|
||||
-extern int SRXAFSCB_GetCellServDB(struct rx_call *a_call, afs_int32 a_index,
|
||||
- char **a_name, serverList * a_hosts);
|
||||
-extern int SRXAFSCB_GetLocalCell(struct rx_call *a_call, char **a_name);
|
||||
-extern int SRXAFSCB_GetCacheConfig(struct rx_call *a_call,
|
||||
- afs_uint32 callerVersion,
|
||||
- afs_uint32 * serverVersion,
|
||||
- afs_uint32 * configCount,
|
||||
- cacheConfig * config);
|
||||
|
||||
/* afs_cbqueue.c */
|
||||
extern afs_rwlock_t afs_xcbhash;
|
53
aae8b00.diff
Normal file
53
aae8b00.diff
Normal file
@ -0,0 +1,53 @@
|
||||
From aae8b00d97585b60702151c6f28ff7ec4d65c2d9 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 09:09:39 -0700
|
||||
Subject: [PATCH] afs: Remove afs_MemExtendEntry()
|
||||
|
||||
The function afs_MemExtendEntry() is not referenced anywhere within
|
||||
the source tree.
|
||||
|
||||
Remove the function afs_MemExtendEntry().
|
||||
|
||||
The commit: 'memcache: add extend-entry function' (f821c7e5c8)
|
||||
introduced the function, but afs_MemExtendEntry() has never been
|
||||
referenced or defined within a header file.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Note, afsMemExtendedEntry() was a wrapper for the function
|
||||
_afs_MemExtendedEntry(), which is still used.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15616
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit eab2a4ae758876bb7547d289f936f9cfc4227cf5)
|
||||
|
||||
Change-Id: I37f241a6df33ab15249c6708d5ca820353c8b413
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_memcache.c b/src/afs/afs_memcache.c
|
||||
index 936cbe9..419083d 100644
|
||||
--- a/src/afs/afs_memcache.c
|
||||
+++ b/src/afs/afs_memcache.c
|
||||
@@ -302,16 +302,6 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int
|
||||
-afs_MemExtendEntry(struct memCacheEntry *mceP, afs_uint32 size)
|
||||
-{
|
||||
- int code = 0;
|
||||
- ObtainWriteLock(&mceP->afs_memLock, 560);
|
||||
- code = _afs_MemExtendEntry(mceP, size);
|
||||
- ReleaseWriteLock(&mceP->afs_memLock);
|
||||
- return code;
|
||||
-}
|
||||
-
|
||||
void
|
||||
shutdown_memcache(void)
|
||||
{
|
47
b77b304.diff
Normal file
47
b77b304.diff
Normal file
@ -0,0 +1,47 @@
|
||||
From b77b304bb58f472e8a9d2f3b6d47fffd38d0c905 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Tue, 07 Dec 2021 15:43:35 -0600
|
||||
Subject: [PATCH] rxgen: Declare generated PKG_TranslateOpCode()
|
||||
|
||||
Ever since commit 5c77a6ca (rxgen: add *TranslateOpcode functions to
|
||||
XDR code), rxgen generates a PKG_TranslateOpCode function in the
|
||||
relevant .xdr.c source, which can translate an RPC opcode into the RPC
|
||||
name. But we never declare this function in a header file, making it
|
||||
impossible to use without compiler warnings (unless the caller
|
||||
declares the function itself).
|
||||
|
||||
To make it possible to actually use this function, declare this
|
||||
function in the generated header file.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/14871
|
||||
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 9b2c27fc6d299cb0b23eca3e8cb25b7e0c41b11a)
|
||||
|
||||
Change-Id: I2479ff7f6579769b3319b2939ffde60fe570c880
|
||||
---
|
||||
|
||||
diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c
|
||||
index 768e42f..59854f4 100644
|
||||
--- a/src/rxgen/rpc_parse.c
|
||||
+++ b/src/rxgen/rpc_parse.c
|
||||
@@ -2150,6 +2150,8 @@
|
||||
{
|
||||
f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n",
|
||||
prefix, PackagePrefix[PackageIndex]);
|
||||
+ f_print(fout,"extern char * %s%sTranslateOpCode(int op);\n", prefix,
|
||||
+ PackagePrefix[PackageIndex]);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2161,6 +2163,8 @@
|
||||
f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n",
|
||||
prefix, pprefix);
|
||||
f_print(fout,"\nextern int %sOpCodeIndex(int op);\n", PackagePrefix[PackageIndex]);
|
||||
+ f_print(fout, "extern char * %s%sTranslateOpCode(int op);\n",
|
||||
+ prefix, pprefix);
|
||||
}
|
||||
|
||||
void
|
89
d1c89ac.diff
Normal file
89
d1c89ac.diff
Normal file
@ -0,0 +1,89 @@
|
||||
From d1c89acf70a794b78c5daaff206d734e36bbec6d Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Tue, 30 Jan 2024 20:44:48 -0600
|
||||
Subject: [PATCH] roken: Declare ct_memcmp in hcrypto kernel roken.h
|
||||
|
||||
Currently, we build roken's ct.c for our kernel module to provide
|
||||
ct_memcmp(). We declare a prototype for ct_memcmp() in krb5_locl.h,
|
||||
and all of our kernel callers of ct_memcmp() include krb5_locl.h, so
|
||||
all callers get a prototype and avoid "implicit declaration" compiler
|
||||
warnings.
|
||||
|
||||
However, roken's ct.c itself does not include krb5_locl.h, so it
|
||||
doesn't get a prototype for ct_memcmp(). This is dangerous, since if
|
||||
the prototype ever slightly differs from the implementation for any
|
||||
reason, it could cause a variety of issues.
|
||||
|
||||
This also causes warnings when building against a Linux 6.8 kernel
|
||||
(which sets the -Wmissing-declarations and -Wmissing-prototypes
|
||||
compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
We cannot change ct.c, since it is an external source file. To fix
|
||||
this, instead move the prototype of ct_memcmp() to our stub
|
||||
kernel-only roken.h header, which is included by ct.c. Make
|
||||
krb5_locl.h also include roken.h when building kernel code, so all of
|
||||
the ct_memcmp() callers also get the prototype.
|
||||
|
||||
While we're here, add some informative comments and an include guard
|
||||
to our previously-blank roken.h stub.
|
||||
|
||||
Written in collaboration with cwills@sinenomine.net.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15620
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit be236069e9d26339ed5f9939965bca0dd3f8bf4e)
|
||||
|
||||
Change-Id: I1112881938b0585263871f8f83d63b8909b12f0d
|
||||
---
|
||||
|
||||
diff --git a/src/crypto/hcrypto/kernel/roken.h b/src/crypto/hcrypto/kernel/roken.h
|
||||
index e69de29..f8c2334 100644
|
||||
--- a/src/crypto/hcrypto/kernel/roken.h
|
||||
+++ b/src/crypto/hcrypto/kernel/roken.h
|
||||
@@ -0,0 +1,17 @@
|
||||
+#ifndef OPENAFS_HCRYPTO_KERNEL_ROKEN_H
|
||||
+#define OPENAFS_HCRYPTO_KERNEL_ROKEN_H
|
||||
+
|
||||
+/*
|
||||
+ * This is a stub roken.h used for building roken code (or roken-using code) in
|
||||
+ * the kernel. For userspace code, use a real roken.h. This just contains a few
|
||||
+ * prototypes of roken functions we actually use in kernel code.
|
||||
+ */
|
||||
+
|
||||
+#ifndef KERNEL
|
||||
+# error "This header is for kernel code only"
|
||||
+#endif
|
||||
+
|
||||
+/* ct.c */
|
||||
+int ct_memcmp(const void *p1, const void *p2, size_t len);
|
||||
+
|
||||
+#endif /* OPENAFS_HCRYPTO_KERNEL_ROKEN_H */
|
||||
diff --git a/src/crypto/rfc3961/krb5_locl.h b/src/crypto/rfc3961/krb5_locl.h
|
||||
index eb279a9..6e70673 100644
|
||||
--- a/src/crypto/rfc3961/krb5_locl.h
|
||||
+++ b/src/crypto/rfc3961/krb5_locl.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifdef KERNEL
|
||||
|
||||
#include "config.h"
|
||||
+#include <roken.h>
|
||||
|
||||
#else
|
||||
#include <afsconfig.h>
|
||||
@@ -285,11 +286,6 @@
|
||||
krb5_error_code krb5_enctype_to_string(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
char **string);
|
||||
-#ifdef KERNEL
|
||||
-/* Roken provides this in userspace, but we're on our own in the kernel. */
|
||||
-int ct_memcmp(const void *p1, const void *p2, size_t len);
|
||||
-#endif
|
||||
-
|
||||
|
||||
#include "crypto.h"
|
||||
|
147
d9f3a2c.diff
Normal file
147
d9f3a2c.diff
Normal file
@ -0,0 +1,147 @@
|
||||
From d9f3a2c6639e694c8d6fc4ad00d6a37d6e1f9bf6 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Mon, 11 Mar 2024 09:05:33 -0600
|
||||
Subject: [PATCH] Linux 6.8: Use roken's strlcpy() in kernel module
|
||||
|
||||
The Linux 6.8 commit 'string: Remove strlcpy()' (d26270061a) removed the
|
||||
the strlcpy function from the Linux kernel. The replacement function,
|
||||
strscpy(), cannot be used as a drop-in replacement as its currently a
|
||||
Linux kernel specific function and there are differences in the returned
|
||||
value.
|
||||
|
||||
We can use roken's strlcpy() (provided in roken/strlcpy.c).
|
||||
|
||||
Create a configure test to that defines its own strlcpy() to test
|
||||
if the kernel doesn't provide one itself. Note, we need to use a
|
||||
different function signature for strlcpy() from what the kernel might
|
||||
have otherwise the test build succeeds when the kernel does provide a
|
||||
strlcpy().
|
||||
|
||||
Update the OpenAFS kernel specific roken.h to define the prototype for
|
||||
strlcpy when it's not present in the Linux kernel. We need to match the
|
||||
defines used in the 'real' roken.h so the roken/strlcpy.c can build
|
||||
properly. Add defines for ROKEN_LIB_FUNCTION, ROKEN_LIB_CALL and
|
||||
ROKEN_LIB_VARIABLE to the kernel roken.h
|
||||
|
||||
Update Linux's osi_machdep.h to include roken.h so the strlcpy protoype
|
||||
is available.
|
||||
|
||||
Update the Linux MakefileProto to include the strcpy-kernel object
|
||||
when building the kernel module.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15646
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 30b18c165752e6d0ce7b6daa6a90453f5e5e6d17)
|
||||
|
||||
Change-Id: I8013623e8f735d15bb7d4ac84ed0867f12b77783
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h
|
||||
index 916a1df..263c863 100644
|
||||
--- a/src/afs/LINUX/osi_machdep.h
|
||||
+++ b/src/afs/LINUX/osi_machdep.h
|
||||
@@ -77,6 +77,7 @@
|
||||
#endif
|
||||
|
||||
#include "afs/sysincludes.h"
|
||||
+#include "roken.h"
|
||||
|
||||
#if !defined(HAVE_LINUX_TIME_T)
|
||||
typedef time64_t time_t;
|
||||
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
|
||||
index 7f3000f..6f9d350 100644
|
||||
--- a/src/cf/linux-kernel-func.m4
|
||||
+++ b/src/cf/linux-kernel-func.m4
|
||||
@@ -252,6 +252,17 @@
|
||||
[inode_set_atime(NULL, 0, 0);
|
||||
inode_set_mtime(NULL, 0, 0);])
|
||||
|
||||
+dnl Linux 6.8 removed the strlcpy() function. We test to see if we can redefine
|
||||
+dnl a strlcpy() function. We use a totally different function signature to
|
||||
+dnl to ensure that this fails when the kernel does provide strlcpy().
|
||||
+AC_CHECK_LINUX_FUNC([no_strlcpy],
|
||||
+ [[#include <linux/string.h>
|
||||
+ size_t strlcpy(char *d);
|
||||
+ size_t strlcpy(char *d) { return strlen(d); }]],
|
||||
+ [[static char buff[10];
|
||||
+ size_t s;
|
||||
+ s = strlcpy(buff);]])
|
||||
+
|
||||
dnl Consequences - things which get set as a result of the
|
||||
dnl above tests
|
||||
AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"],
|
||||
diff --git a/src/crypto/hcrypto/kernel/roken.h b/src/crypto/hcrypto/kernel/roken.h
|
||||
index f8c2334..6cb0601 100644
|
||||
--- a/src/crypto/hcrypto/kernel/roken.h
|
||||
+++ b/src/crypto/hcrypto/kernel/roken.h
|
||||
@@ -11,6 +11,35 @@
|
||||
# error "This header is for kernel code only"
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * The following function annotations are not needed when building for kernel
|
||||
+ * space
|
||||
+ */
|
||||
+#define ROKEN_LIB_FUNCTION
|
||||
+#define ROKEN_LIB_CALL
|
||||
+#define ROKEN_LIB_VARIABLE
|
||||
+
|
||||
+/*
|
||||
+ * Our HAVE_STRLCPY from autoconf refers to whether strlcpy() is available in
|
||||
+ * userspace. Whether it's available in the kernel is another question, so
|
||||
+ * override HAVE_STRLCPY here. Usually it is available (only a few cases lack
|
||||
+ * it), so turn it on by default, and turn it off for a few cases below.
|
||||
+ */
|
||||
+#undef HAVE_STRLCPY
|
||||
+#define HAVE_STRLCPY 1
|
||||
+
|
||||
+#ifdef AFS_AIX_ENV
|
||||
+# undef HAVE_STRLCPY
|
||||
+#elif defined(AFS_LINUX_ENV) && defined(HAVE_LINUX_NO_STRLCPY)
|
||||
+# undef HAVE_STRLCPY
|
||||
+#endif
|
||||
+
|
||||
+/* strlcpy.c */
|
||||
+#if defined (AFS_LINUX_ENV) && !defined(HAVE_STRLCPY)
|
||||
+# define strlcpy rk_strlcpy
|
||||
+ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL strlcpy (char *, const char *, size_t);
|
||||
+#endif
|
||||
+
|
||||
/* ct.c */
|
||||
int ct_memcmp(const void *p1, const void *p2, size_t len);
|
||||
|
||||
diff --git a/src/external/libafsdep b/src/external/libafsdep
|
||||
index fb365df..9d36a30 100644
|
||||
--- a/src/external/libafsdep
|
||||
+++ b/src/external/libafsdep
|
||||
@@ -24,3 +24,4 @@
|
||||
heimdal/krb5/keyblock.c
|
||||
heimdal/krb5/store-int.c
|
||||
heimdal/roken/ct.c
|
||||
+heimdal/roken/strlcpy.c
|
||||
\ No newline at end of file
|
||||
diff --git a/src/libafs/MakefileProto.LINUX.in b/src/libafs/MakefileProto.LINUX.in
|
||||
index 8744ab8..6e62c8c 100644
|
||||
--- a/src/libafs/MakefileProto.LINUX.in
|
||||
+++ b/src/libafs/MakefileProto.LINUX.in
|
||||
@@ -42,7 +42,8 @@
|
||||
osi_ioctl.o \
|
||||
osi_proc.o \
|
||||
osi_vnodeops.o \
|
||||
- osi_pagecopy.o
|
||||
+ osi_pagecopy.o \
|
||||
+ strlcpy-kernel.o
|
||||
|
||||
AFS_OS_PAGOBJS = \
|
||||
osi_alloc.o \
|
||||
@@ -59,7 +60,8 @@
|
||||
osi_flush.o \
|
||||
<all>
|
||||
osi_ioctl.o \
|
||||
- osi_pag_module.o
|
||||
+ osi_pag_module.o \
|
||||
+ strlcpy-kernel.o
|
||||
|
||||
AFS_OS_NFSOBJS =
|
||||
|
71
db91384.diff
Normal file
71
db91384.diff
Normal file
@ -0,0 +1,71 @@
|
||||
From db913849047d0ec77e735f14dbbce63652209cc1 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Thu, 08 Feb 2024 16:10:57 -0700
|
||||
Subject: [PATCH] afs: Remove afs_DbgDisconFiles()
|
||||
|
||||
The function afs_DbgDisconFiles() is not referenced anywhere within the
|
||||
source tree.
|
||||
|
||||
Remove the function afs_DbgDisconFiles().
|
||||
|
||||
The commit: 'disconnected-rw-20080922' (433afd4779) introduced
|
||||
afs_DbgDisconFiles(), but the function was never used.
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15640
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 32bb90047782f41df521bba5ab4aba8b4ed34203)
|
||||
|
||||
Change-Id: I61d06515845dbb18a370f7856285596514242e99
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_disconnected.c b/src/afs/afs_disconnected.c
|
||||
index 3b88585..1aaabd9 100644
|
||||
--- a/src/afs/afs_disconnected.c
|
||||
+++ b/src/afs/afs_disconnected.c
|
||||
@@ -1335,37 +1335,6 @@
|
||||
}
|
||||
|
||||
/*!
|
||||
- * Print list of disconnected files.
|
||||
- *
|
||||
- * \note Call with afs_DDirtyVCListLock read locked.
|
||||
- */
|
||||
-void
|
||||
-afs_DbgDisconFiles(void)
|
||||
-{
|
||||
- struct vcache *tvc;
|
||||
- struct afs_q *q;
|
||||
- int i = 0;
|
||||
-
|
||||
- afs_warn("List of dirty files: \n");
|
||||
-
|
||||
- ObtainReadLock(&afs_disconDirtyLock);
|
||||
- for (q = QPrev(&afs_disconDirty); q != &afs_disconDirty; q = QPrev(q)) {
|
||||
- tvc = QEntry(q, struct vcache, dirtyq);
|
||||
-
|
||||
- afs_warn("Cell=%u Volume=%u VNode=%u Unique=%u\n",
|
||||
- tvc->f.fid.Cell,
|
||||
- tvc->f.fid.Fid.Volume,
|
||||
- tvc->f.fid.Fid.Vnode,
|
||||
- tvc->f.fid.Fid.Unique);
|
||||
-
|
||||
- i++;
|
||||
- if (i >= 30)
|
||||
- osi_Panic("afs_DbgDisconFiles: loop in dirty list\n");
|
||||
- }
|
||||
- ReleaseReadLock(&afs_disconDirtyLock);
|
||||
-}
|
||||
-
|
||||
-/*!
|
||||
* Generate a fake fid for a disconnected shadow dir.
|
||||
* Similar to afs_GenFakeFid, only that it uses the dhash
|
||||
* to search for a uniquifier because a shadow dir lives only
|
150
dffd0e1.diff
Normal file
150
dffd0e1.diff
Normal file
@ -0,0 +1,150 @@
|
||||
From dffd0e1475f9fb346a146607335c9f9d847d4429 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Mon, 12 Feb 2024 08:59:32 -0700
|
||||
Subject: [PATCH] afs: Add afs_xioctl prototyes to afs_prototypes.h
|
||||
|
||||
Several .c files have external function prototypes for the afs_xioctl
|
||||
function, while the implementing files do not have the prototype.
|
||||
|
||||
Move these prototypes into afs_prototypes.h so that the prototypes are
|
||||
available to both the caller and the implementation.
|
||||
|
||||
Because the file holding the implementation does not have a prototypes,
|
||||
afs_xioctl() is being flagged when building against a Linux 6.8 kernel
|
||||
(which sets the -Wmissing-declarations and -Wmissing-prototypes compiler
|
||||
flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a Linux kernel with CONFIG_WERROR=y, the build
|
||||
fails.
|
||||
|
||||
Note that the function afs_xioctl() has platform specific
|
||||
implementations.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15643
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 575d986aa6c18ac27ea42fb66ae8b8cb0e27fe6c)
|
||||
|
||||
Change-Id: If746111fdcf6a00459f524711623d322d5fc7942
|
||||
---
|
||||
|
||||
diff --git a/src/afs/FBSD/osi_vfsops.c b/src/afs/FBSD/osi_vfsops.c
|
||||
index 6044bbe..8a979db 100644
|
||||
--- a/src/afs/FBSD/osi_vfsops.c
|
||||
+++ b/src/afs/FBSD/osi_vfsops.c
|
||||
@@ -18,7 +18,6 @@
|
||||
int afs_pbuf_freecnt = -1;
|
||||
|
||||
extern int Afs_xsetgroups();
|
||||
-extern int afs_xioctl();
|
||||
|
||||
static struct syscall_helper_data afs_syscalls[] = {
|
||||
{
|
||||
diff --git a/src/afs/HPUX/osi_vfsops.c b/src/afs/HPUX/osi_vfsops.c
|
||||
index 0ddc227..46faca7 100644
|
||||
--- a/src/afs/HPUX/osi_vfsops.c
|
||||
+++ b/src/afs/HPUX/osi_vfsops.c
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
afsc_link()
|
||||
{
|
||||
- extern int Afs_syscall(), afs_xioctl(), Afs_xsetgroups();
|
||||
+ extern int Afs_syscall(), Afs_xsetgroups();
|
||||
|
||||
/* For now nothing special is required during AFS initialization. */
|
||||
AFS_STATCNT(afsc_link);
|
||||
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||
index 08fccb1..8aeeafa 100644
|
||||
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||
@@ -613,10 +613,6 @@
|
||||
}
|
||||
|
||||
|
||||
-/* in afs_pioctl.c */
|
||||
-extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com,
|
||||
- unsigned long arg);
|
||||
-
|
||||
static long afs_unlocked_xioctl(struct file *fp, unsigned int com,
|
||||
unsigned long arg) {
|
||||
return afs_xioctl(FILE_INODE(fp), fp, com, arg);
|
||||
diff --git a/src/afs/NBSD/osi_kmod.c b/src/afs/NBSD/osi_kmod.c
|
||||
index f658565..eefaf56 100644
|
||||
--- a/src/afs/NBSD/osi_kmod.c
|
||||
+++ b/src/afs/NBSD/osi_kmod.c
|
||||
@@ -44,7 +44,6 @@
|
||||
#include "afs/afsincludes.h" /* Afs-based standard headers */
|
||||
|
||||
extern int afs3_syscall(struct lwp *, const void *, register_t *);
|
||||
-extern int afs_xioctl(struct lwp *, const void *, register_t *);
|
||||
extern int Afs_xsetgroups(struct lwp *, const void *, register_t *);
|
||||
|
||||
#if !defined(AFS_NBSD60_ENV)
|
||||
diff --git a/src/afs/NBSD/osi_vfsops.c b/src/afs/NBSD/osi_vfsops.c
|
||||
index 7679ff1..5032a1d 100644
|
||||
--- a/src/afs/NBSD/osi_vfsops.c
|
||||
+++ b/src/afs/NBSD/osi_vfsops.c
|
||||
@@ -110,7 +110,6 @@
|
||||
#ifndef AFS_NBSD60_ENV
|
||||
extern int sys_lkmnosys(struct lwp *, const void *, register_t *);
|
||||
extern int afs3_syscall(struct lwp *, const void *, register_t *);
|
||||
-extern int afs_xioctl(struct lwp *, const void *, register_t *);
|
||||
extern int Afs_xsetgroups(struct lwp *, const void *, register_t *);
|
||||
static int afs_badcall(struct lwp *, const void *, register_t *);
|
||||
|
||||
diff --git a/src/afs/OBSD/osi_vfsops.c b/src/afs/OBSD/osi_vfsops.c
|
||||
index 830906c..e772926 100644
|
||||
--- a/src/afs/OBSD/osi_vfsops.c
|
||||
+++ b/src/afs/OBSD/osi_vfsops.c
|
||||
@@ -108,7 +108,7 @@
|
||||
/* from /usr/src/sys/kern/vfs_subr.c */
|
||||
extern void insmntque(struct vnode *, struct mount *);
|
||||
|
||||
-extern int sys_lkmnosys(), afs_xioctl(), Afs_xsetgroups();
|
||||
+extern int sys_lkmnosys(), Afs_xsetgroups();
|
||||
|
||||
static int lkmid = -1;
|
||||
static int afs_badcall(struct proc *p, void *xx, register_t * yy);
|
||||
diff --git a/src/afs/SOLARIS/osi_vfsops.c b/src/afs/SOLARIS/osi_vfsops.c
|
||||
index c6c9ddf..f3f9bd3 100644
|
||||
--- a/src/afs/SOLARIS/osi_vfsops.c
|
||||
+++ b/src/afs/SOLARIS/osi_vfsops.c
|
||||
@@ -389,7 +389,6 @@
|
||||
afsinit(struct vfssw *vfsswp, int fstype)
|
||||
#endif
|
||||
{
|
||||
- extern int afs_xioctl();
|
||||
extern int afs_xsetgroups();
|
||||
|
||||
AFS_STATCNT(afsinit);
|
||||
diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h
|
||||
index 9b3b1af..d7894dd 100644
|
||||
--- a/src/afs/afs_prototypes.h
|
||||
+++ b/src/afs/afs_prototypes.h
|
||||
@@ -812,6 +812,23 @@
|
||||
extern int HandleIoctl(struct vcache *avc, afs_int32 acom,
|
||||
struct afs_ioctl *adata);
|
||||
|
||||
+#if defined(AFS_SUN5_ENV)
|
||||
+struct afs_ioctl_sys;
|
||||
+extern int afs_xioctl(struct afs_ioctl_sys *uap, rval_t *rvp);
|
||||
+#elif defined(AFS_LINUX_ENV)
|
||||
+extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com, unsigned long arg);
|
||||
+#elif defined(AFS_DAWRIN_ENV) & !defined(AFS_DARWIN80)
|
||||
+extern int afs_xioctl(afs_proc_t *p, struct ioctl_args *uap, register_t *retval);
|
||||
+#elif defined(AFS_FBSD_ENV)
|
||||
+extern int afs_xioctl(struct thread *td, struct ioctl_args *uap, register_t *retval);
|
||||
+#elif defined(AFS_NBSD_ENV)
|
||||
+extern int afs_xioctl(afs_proc_t *p, const struct sys_ioctl_args *uap, register_t *retval);
|
||||
+#elif defined(AFS_XBSD_ENV)
|
||||
+extern int afs_xioctl(afs_proc_t *p, const struct ioctl_args *uap, register_t *retval);
|
||||
+#elif defined(UKERNEL)
|
||||
+extern int afs_xioctl(void);
|
||||
+#endif
|
||||
+
|
||||
|
||||
/* afs_segments.c */
|
||||
extern int afs_StoreAllSegments(struct vcache *avc,
|
67
e0f425a.diff
Normal file
67
e0f425a.diff
Normal file
@ -0,0 +1,67 @@
|
||||
From e0f425a3d8bccb48a69f27dff209e32cf05f4305 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Fri, 12 Jan 2024 08:56:31 -0700
|
||||
Subject: [PATCH] afs: Remove DFlushDCache()
|
||||
|
||||
The function DFlushDcache() is not referenced anywhere within the
|
||||
source tree.
|
||||
|
||||
Remove the function DFlushDCache().
|
||||
|
||||
The commit: 'disconnected-shadow-directory-fixes-20090121' (4045f3d535)
|
||||
removed the code reference to DFlushDCache() and the commit:
|
||||
"dir: Prototype and function name cleanup" (5ad1e6cb90) removed the
|
||||
function prototype. The function was introduced in the commit:
|
||||
"disconnected-flush-before-shadowing-20090119" (e1cc987ea5).
|
||||
|
||||
This function is flagged due to a missing prototype when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
"Makefile.extrawarn: turn on missing-prototypes globally" (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15615
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 432ac5810e51bb5bb2cf1df0bfebc64d1c4d7a39)
|
||||
|
||||
Change-Id: Ib8ab79c76c633632215e02235f47fdb1d744e721
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_buffer.c b/src/afs/afs_buffer.c
|
||||
index 5552d1c..9538c68 100644
|
||||
--- a/src/afs/afs_buffer.c
|
||||
+++ b/src/afs/afs_buffer.c
|
||||
@@ -516,31 +516,6 @@
|
||||
afs_CFileClose(tfile);
|
||||
}
|
||||
|
||||
-void
|
||||
-DFlushDCache(struct dcache *adc)
|
||||
-{
|
||||
- int i;
|
||||
- struct buffer *tb;
|
||||
-
|
||||
- ObtainReadLock(&afs_bufferLock);
|
||||
-
|
||||
- for (i = 0; i <= PHPAGEMASK; i++)
|
||||
- for (tb = phTable[pHash(adc->index, i)]; tb; tb = tb->hashNext)
|
||||
- if (tb->fid == adc->index) {
|
||||
- ObtainWriteLock(&tb->lock, 701);
|
||||
- tb->lockers++;
|
||||
- ReleaseReadLock(&afs_bufferLock);
|
||||
- if (tb->dirty) {
|
||||
- DFlushBuffer(tb);
|
||||
- }
|
||||
- tb->lockers--;
|
||||
- ReleaseWriteLock(&tb->lock);
|
||||
- ObtainReadLock(&afs_bufferLock);
|
||||
- }
|
||||
-
|
||||
- ReleaseReadLock(&afs_bufferLock);
|
||||
-}
|
||||
-
|
||||
int
|
||||
DFlush(void)
|
||||
{
|
473
e157f8f.diff
Normal file
473
e157f8f.diff
Normal file
@ -0,0 +1,473 @@
|
||||
From e157f8f39bd367151f5a9264c7d4ce8bcbed08fb Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Thu, 29 Feb 2024 17:53:31 -0700
|
||||
Subject: [PATCH] afs: Add static attribute to internal functions
|
||||
|
||||
When building against a Linux 6.8 kernel, functions that are missing
|
||||
prototypes or declarations are flagged.
|
||||
|
||||
We can add the static attribute to functions that are not referenced
|
||||
outside of the file that implements them to avoid having these functions
|
||||
flagged by the compiler.
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
There are no functional changes in this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15625
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit efee796f28b53bf3ffc03186f81790c36c23c94c)
|
||||
|
||||
Change-Id: I0d923a65731f825d6c190056b0ccc3d362236706
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c
|
||||
index e8c2980..cb91ecb 100644
|
||||
--- a/src/afs/LINUX/osi_file.c
|
||||
+++ b/src/afs/LINUX/osi_file.c
|
||||
@@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
/* Old export ops: decode_fh will call back here. Accept any dentry it suggests */
|
||||
-int
|
||||
+static int
|
||||
afs_fh_acceptable(void *context, struct dentry *dp)
|
||||
{
|
||||
return 1;
|
||||
diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c
|
||||
index fdc347d..30ac048 100644
|
||||
--- a/src/afs/LINUX/osi_module.c
|
||||
+++ b/src/afs/LINUX/osi_module.c
|
||||
@@ -64,7 +64,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-int __init
|
||||
+static int __init
|
||||
afs_init(void)
|
||||
{
|
||||
int err;
|
||||
@@ -114,7 +114,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void __exit
|
||||
+static void __exit
|
||||
afs_cleanup(void)
|
||||
{
|
||||
afs_shutdown_pagecopy();
|
||||
diff --git a/src/afs/LINUX/osi_pag_module.c b/src/afs/LINUX/osi_pag_module.c
|
||||
index e832c5a..24b938f 100644
|
||||
--- a/src/afs/LINUX/osi_pag_module.c
|
||||
+++ b/src/afs/LINUX/osi_pag_module.c
|
||||
@@ -58,7 +58,7 @@
|
||||
struct user_namespace *afs_ns;
|
||||
#endif
|
||||
|
||||
-int __init
|
||||
+static int __init
|
||||
afspag_init(void)
|
||||
{
|
||||
#if !defined(EXPORTED_PROC_ROOT_FS)
|
||||
@@ -90,7 +90,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void __exit
|
||||
+static void __exit
|
||||
afspag_cleanup(void)
|
||||
{
|
||||
#if !defined(EXPORTED_PROC_ROOT_FS)
|
||||
diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c
|
||||
index ba78bce..4ac63b1 100644
|
||||
--- a/src/afs/afs_call.c
|
||||
+++ b/src/afs/afs_call.c
|
||||
@@ -267,7 +267,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
|
||||
long parm6)
|
||||
{
|
||||
@@ -436,7 +436,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
# if defined(AFS_LINUX_ENV) && !defined(INIT_WORK_HAS_DATA)
|
||||
afsd_launcher(struct work_struct *work)
|
||||
# else
|
||||
@@ -457,7 +457,7 @@
|
||||
# endif /* !HAVE_LINUX_KTHREAD_RUN */
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
|
||||
long parm6)
|
||||
{
|
||||
diff --git a/src/afs/afs_disconnected.c b/src/afs/afs_disconnected.c
|
||||
index 1aaabd9..03ff90f 100644
|
||||
--- a/src/afs/afs_disconnected.c
|
||||
+++ b/src/afs/afs_disconnected.c
|
||||
@@ -102,7 +102,7 @@
|
||||
*
|
||||
* \return Mask of operations.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_GenStoreStatus(struct vcache *avc, struct AFSStoreStatus *astat)
|
||||
{
|
||||
if (!avc || !astat || !avc->f.ddirty_flags)
|
||||
@@ -157,7 +157,7 @@
|
||||
*
|
||||
* \return 0 on success, -1 on failure
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_GetParentDirFid(struct vcache *avc, struct VenusFid *afid)
|
||||
{
|
||||
struct dcache *tdc;
|
||||
@@ -234,7 +234,7 @@
|
||||
* \param deleted Has this file been deleted? If yes, use the shadow
|
||||
* dir for looking up the name.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_GetVnodeName(struct vcache *avc, struct VenusFid *afid, char *aname,
|
||||
int deleted)
|
||||
{
|
||||
@@ -358,7 +358,7 @@
|
||||
*
|
||||
* \note afs_DDirtyVCListLock must be write locked.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_CheckDeletedChildren(struct vcache *avc)
|
||||
{
|
||||
struct dcache *tdc;
|
||||
@@ -452,7 +452,7 @@
|
||||
* \param old_fid The current dir's fid.
|
||||
* \param new_fid The new dir's fid.
|
||||
*/
|
||||
-void
|
||||
+static void
|
||||
afs_FixChildrenFids(struct VenusFid *old_fid, struct VenusFid *new_fid)
|
||||
{
|
||||
struct dcache *tdc;
|
||||
@@ -499,7 +499,7 @@
|
||||
* be deferred to later in the resync process
|
||||
*/
|
||||
|
||||
-int
|
||||
+static int
|
||||
afs_GetParentVCache(struct vcache *avc, int deleted, struct VenusFid *afid,
|
||||
char *aname, struct vcache **adp)
|
||||
{
|
||||
@@ -548,7 +548,7 @@
|
||||
* - Get the new name from the current dir.
|
||||
* - Old dir fid and new dir fid are collected along the way.
|
||||
* */
|
||||
-int
|
||||
+static int
|
||||
afs_ProcessOpRename(struct vcache *avc, struct vrequest *areq)
|
||||
{
|
||||
struct VenusFid old_pdir_fid, new_pdir_fid;
|
||||
@@ -651,7 +651,7 @@
|
||||
* - Handle errors.
|
||||
* - Reorder vhash and dcaches in their hashes, using the newly acquired fid.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_ProcessOpCreate(struct vcache *avc, struct vrequest *areq,
|
||||
afs_ucred_t *acred)
|
||||
{
|
||||
@@ -921,7 +921,7 @@
|
||||
*
|
||||
* \note avc must be write locked.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_ProcessOpRemove(struct vcache *avc, struct vrequest *areq)
|
||||
{
|
||||
char *tname = NULL;
|
||||
@@ -1022,7 +1022,7 @@
|
||||
*
|
||||
* \return 0 for success. On failure, other error codes.
|
||||
*/
|
||||
-int
|
||||
+static int
|
||||
afs_SendChanges(struct vcache *avc, struct vrequest *areq)
|
||||
{
|
||||
struct afs_conn *tc;
|
||||
diff --git a/src/afs/afs_fetchstore.c b/src/afs/afs_fetchstore.c
|
||||
index 63b370d..97d0671 100644
|
||||
--- a/src/afs/afs_fetchstore.c
|
||||
+++ b/src/afs/afs_fetchstore.c
|
||||
@@ -77,14 +77,14 @@
|
||||
|
||||
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeUfsPrepare(void *r, afs_uint32 size, afs_uint32 *tlen)
|
||||
{
|
||||
*tlen = (size > AFS_LRALLOCSIZ ? AFS_LRALLOCSIZ : size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeMemPrepare(void *r, afs_uint32 size, afs_uint32 *tlen)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -105,7 +105,7 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeUfsRead(void *r, struct osi_file *tfile, afs_uint32 offset,
|
||||
afs_uint32 tlen, afs_uint32 *bytesread)
|
||||
{
|
||||
@@ -126,7 +126,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeMemRead(void *r, struct osi_file *tfile, afs_uint32 offset,
|
||||
afs_uint32 tlen, afs_uint32 *bytesread)
|
||||
{
|
||||
@@ -142,7 +142,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeMemWrite(void *r, afs_uint32 l, afs_uint32 *byteswritten)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -159,7 +159,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeUfsWrite(void *r, afs_uint32 l, afs_uint32 *byteswritten)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -179,7 +179,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storePadd(void *rock, afs_uint32 size)
|
||||
{
|
||||
afs_int32 code = 0;
|
||||
@@ -203,7 +203,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeStatus(void *rock)
|
||||
{
|
||||
struct rxfs_storeVariables *v = (struct rxfs_storeVariables *)rock;
|
||||
@@ -213,7 +213,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeClose(void *r, struct AFSFetchStatus *OutStatus, int *doProcessFS)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -236,7 +236,7 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeDestroy(void **r, afs_int32 code)
|
||||
{
|
||||
struct rxfs_storeVariables *v = (struct rxfs_storeVariables *)*r;
|
||||
@@ -255,7 +255,7 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
afs_GenericStoreProc(struct storeOps *ops, void *rock,
|
||||
struct dcache *tdc, int *shouldwake,
|
||||
afs_size_t *bytesXferred)
|
||||
@@ -353,7 +353,7 @@
|
||||
#endif
|
||||
};
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_storeInit(struct vcache *avc, struct afs_conn *tc,
|
||||
struct rx_connection *rxconn, afs_size_t base,
|
||||
afs_size_t bytes, afs_size_t length,
|
||||
@@ -437,7 +437,7 @@
|
||||
* \param ops pointer to the block of storeOps to be used for this operation
|
||||
* \param rock pointer to the opaque protocol-specific data of this operation
|
||||
*/
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
afs_CacheStoreDCaches(struct vcache *avc, struct dcache **dclist,
|
||||
afs_size_t bytes, afs_hyper_t *anewDV, int *doProcessFS,
|
||||
struct AFSFetchStatus *OutStatus, afs_uint32 nchunks,
|
||||
@@ -720,7 +720,7 @@
|
||||
afs_int32 iovmax;
|
||||
};
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchUfsRead(void *r, afs_uint32 size, afs_uint32 *bytesread)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -738,7 +738,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchMemRead(void *r, afs_uint32 tlen, afs_uint32 *bytesread)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -755,7 +755,7 @@
|
||||
}
|
||||
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchMemWrite(void *r, struct osi_file *fP, afs_uint32 offset,
|
||||
afs_uint32 tlen, afs_uint32 *byteswritten)
|
||||
{
|
||||
@@ -771,7 +771,7 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchUfsWrite(void *r, struct osi_file *fP, afs_uint32 offset,
|
||||
afs_uint32 tlen, afs_uint32 *byteswritten)
|
||||
{
|
||||
@@ -787,7 +787,7 @@
|
||||
}
|
||||
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchClose(void *r, struct vcache *avc, struct dcache * adc,
|
||||
struct afs_FetchOutput *o)
|
||||
{
|
||||
@@ -814,7 +814,7 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchDestroy(void **r, afs_int32 code)
|
||||
{
|
||||
struct rxfs_fetchVariables *v = (struct rxfs_fetchVariables *)*r;
|
||||
@@ -833,7 +833,7 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchMore(void *r, afs_int32 *length, afs_uint32 *moredata)
|
||||
{
|
||||
afs_int32 code;
|
||||
@@ -882,7 +882,7 @@
|
||||
rxfs_fetchDestroy
|
||||
};
|
||||
|
||||
-afs_int32
|
||||
+static afs_int32
|
||||
rxfs_fetchInit(struct afs_conn *tc, struct rx_connection *rxconn,
|
||||
struct vcache *avc, afs_offs_t base,
|
||||
afs_uint32 size, afs_int32 *alength, struct dcache *adc,
|
||||
diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c
|
||||
index 42b4a0c..08a1660 100644
|
||||
--- a/src/afs/afs_icl.c
|
||||
+++ b/src/afs/afs_icl.c
|
||||
@@ -34,7 +34,7 @@
|
||||
int afs_icl_inited = 0;
|
||||
|
||||
/* init function, called once, under afs_icl_lock */
|
||||
-int
|
||||
+static int
|
||||
afs_icl_Init(void)
|
||||
{
|
||||
afs_icl_inited = 1;
|
||||
@@ -539,7 +539,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
-void
|
||||
+static void
|
||||
afs_icl_AppendOne(struct afs_icl_log *logp, int type, long parm)
|
||||
{
|
||||
if (type) {
|
||||
diff --git a/src/afs/afs_pag_cred.c b/src/afs/afs_pag_cred.c
|
||||
index 3dce854..e77cf8a 100644
|
||||
--- a/src/afs/afs_pag_cred.c
|
||||
+++ b/src/afs/afs_pag_cred.c
|
||||
@@ -32,7 +32,7 @@
|
||||
static struct afspag_cell *primary_cell = 0;
|
||||
|
||||
|
||||
-struct afspag_cell *
|
||||
+static struct afspag_cell *
|
||||
afspag_GetCell(char *acell)
|
||||
{
|
||||
struct afspag_cell *tcell;
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
|
||||
-struct afspag_cell *
|
||||
+static struct afspag_cell *
|
||||
afspag_GetPrimaryCell(void)
|
||||
{
|
||||
struct afspag_cell *tcell;
|
||||
diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c
|
||||
index 3674eff..9d2d93c 100644
|
||||
--- a/src/afs/afs_server.c
|
||||
+++ b/src/afs/afs_server.c
|
||||
@@ -556,7 +556,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
CkSrv_GetCaps(int nconns, struct rx_connection **rxconns,
|
||||
struct afs_conn **conns)
|
||||
{
|
||||
diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c
|
||||
index e72b45e..f500b65 100644
|
||||
--- a/src/afs/afs_vcache.c
|
||||
+++ b/src/afs/afs_vcache.c
|
||||
@@ -727,7 +727,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-void
|
||||
+static void
|
||||
afs_PostPopulateVCache(struct vcache *avc, struct VenusFid *afid, int seq)
|
||||
{
|
||||
/*
|
65
e428053.diff
Normal file
65
e428053.diff
Normal file
@ -0,0 +1,65 @@
|
||||
From e428053b5bc1250fdcc3ed8ac52ee798d96ad284 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Tue, 05 Mar 2024 07:40:08 -0700
|
||||
Subject: [PATCH] rxgen: Declare generated PKG_OpCodeStats()
|
||||
|
||||
The function {PKG}_OpCodeStats() is generated by rxgen, however a
|
||||
prototype for the function is not generated.
|
||||
|
||||
The functions h_ProcMainBody_setup() and h_HeadofOldStyleProc_setup()
|
||||
in rpc_parse.c emit prototypes for {PKG}_ExecuteRequest() and
|
||||
{PKG}_TranslateOpCode(), but do not emit a prototype for
|
||||
{PKG}_OpCodeStats().
|
||||
|
||||
Update rxgen to emit a function prototype for {PKG}_OpCodeStats() in the
|
||||
generated header file.
|
||||
|
||||
Use a variable to point to "PackagePrefix[PackageIndex]" in
|
||||
h_ProcMainBody_setup to improve readability.
|
||||
|
||||
{PKG}_OpCodeStats(), specifically RXSTATS_OpCodeStats(), is flagged due
|
||||
to a missing prototype when building against a Linux 6.8 kernel (which
|
||||
sets the -Wmissing-declarations and -Wmissing-prototypes compiler flags
|
||||
as default). Linux 6.8 commit: 'Makefile.extrawarn: turn on
|
||||
missing-prototypes globally' (0fcb70851f). When building against a
|
||||
kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15631
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 26bb4d143b31ba027cf2721ac731df67a174c43b)
|
||||
|
||||
Change-Id: I9072d22d142b5b7a2f59b0cfc4026066ef1d9501
|
||||
---
|
||||
|
||||
diff --git a/src/rxgen/rpc_parse.c b/src/rxgen/rpc_parse.c
|
||||
index 59854f4..e648a66 100644
|
||||
--- a/src/rxgen/rpc_parse.c
|
||||
+++ b/src/rxgen/rpc_parse.c
|
||||
@@ -2148,10 +2148,14 @@
|
||||
static void
|
||||
h_ProcMainBody_setup(void)
|
||||
{
|
||||
+ char *pprefix = PackagePrefix[PackageIndex];
|
||||
f_print(fout,"\nextern int %s%sExecuteRequest(struct rx_call *);\n",
|
||||
- prefix, PackagePrefix[PackageIndex]);
|
||||
+ prefix, pprefix);
|
||||
f_print(fout,"extern char * %s%sTranslateOpCode(int op);\n", prefix,
|
||||
- PackagePrefix[PackageIndex]);
|
||||
+ pprefix);
|
||||
+ f_print(fout,"extern struct %s%sstats *%s%sOpCodeStats(int op);\n",
|
||||
+ prefix, pprefix,
|
||||
+ prefix, pprefix);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2165,6 +2169,8 @@
|
||||
f_print(fout,"\nextern int %sOpCodeIndex(int op);\n", PackagePrefix[PackageIndex]);
|
||||
f_print(fout, "extern char * %s%sTranslateOpCode(int op);\n",
|
||||
prefix, pprefix);
|
||||
+ f_print(fout, "extern struct %s%sstats *%s%sOpCodeStats(int op);\n",
|
||||
+ prefix, pprefix, prefix, pprefix);
|
||||
}
|
||||
|
||||
void
|
107
ef7b8c5.diff
Normal file
107
ef7b8c5.diff
Normal file
@ -0,0 +1,107 @@
|
||||
From ef7b8c578790d84c89f09c3236f1718725770e75 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Wed, 07 Feb 2024 14:51:23 -0700
|
||||
Subject: [PATCH] cf: Add function prototypes for linux conftest
|
||||
|
||||
The Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f)
|
||||
|
||||
added the compiler flags -Wmissing-declarations and -Wmissing-prototypes
|
||||
as defaults for all kernel modules builds. This change causes configure
|
||||
to fail for various Linux kernel tests.
|
||||
|
||||
Update the template used to create the conftest.c file to provide a
|
||||
function declaration for conftest().
|
||||
|
||||
Use a 'static' attribute when defining functions used within tests.
|
||||
|
||||
Note: 2 configure tests (LINUX_INIT_WORK_AS_DATA and
|
||||
LINUX_IOP_CREATE_TAKES_MODE_T) defined nested functions. Relocate the
|
||||
nested functions to outside the body of conftest() to avoid compiler
|
||||
errors due to nested function definitions.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15614
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 1440843b80e28db908bd8c264b8adbfb2c95b4d9)
|
||||
|
||||
Change-Id: I38acb7b0cb08dec8e9bca5f3792fbf981884a74c
|
||||
Reviewed-on: https://gerrit.openafs.org/15683
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
|
||||
index 7bb5a67..010a446 100644
|
||||
--- a/src/cf/linux-test1.m4
|
||||
+++ b/src/cf/linux-test1.m4
|
||||
@@ -16,7 +16,7 @@
|
||||
/* end confdefs.h */
|
||||
#include <linux/module.h>
|
||||
$1
|
||||
-
|
||||
+void conftest(void);
|
||||
void conftest(void)
|
||||
{
|
||||
$2
|
||||
@@ -201,7 +201,7 @@
|
||||
CPPFLAGS="$CPPFLAGS -Werror"
|
||||
AC_TRY_KBUILD(
|
||||
[$4
|
||||
- $5 op($6) { return ($5)0; };],
|
||||
+ static $5 op($6) { return ($5)0; };],
|
||||
[static struct $1 ops; ops.$2 = op;],
|
||||
AS_VAR_SET([ac_linux_operation], [yes]),
|
||||
AS_VAR_SET([ac_linux_operation], [no]))
|
||||
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
|
||||
index 3596b6a..7889c90 100644
|
||||
--- a/src/cf/linux-test4.m4
|
||||
+++ b/src/cf/linux-test4.m4
|
||||
@@ -400,9 +400,9 @@
|
||||
AC_CHECK_LINUX_BUILD([whether INIT_WORK has a _data argument],
|
||||
[ac_cv_linux_init_work_has_data],
|
||||
[#include <linux/kernel.h>
|
||||
-#include <linux/workqueue.h>],
|
||||
-[
|
||||
-void f(struct work_struct *w) {}
|
||||
+#include <linux/workqueue.h>
|
||||
+static void f(struct work_struct *w) {}],
|
||||
+[
|
||||
struct work_struct *w;
|
||||
int *i;
|
||||
INIT_WORK(w,f,i);],
|
||||
@@ -493,7 +493,7 @@
|
||||
AC_CHECK_LINUX_BUILD([whether kmem_cache_create constructor takes a void pointer],
|
||||
[ac_cv_linux_kmem_cache_create_ctor_takes_void],
|
||||
[#include <linux/slab.h>
|
||||
- void _ctor(void *v) { };],
|
||||
+ static void _ctor(void *v) { };],
|
||||
[kmem_cache_create(NULL, 0, 0, 0, _ctor);],
|
||||
[KMEM_CACHE_CTOR_TAKES_VOID],
|
||||
[define if kmem_cache_create constructor takes a single void ptr],
|
||||
@@ -667,7 +667,7 @@
|
||||
AC_CHECK_LINUX_BUILD([whether 4.11+ inode.i_op->getattr takes a struct path argument],
|
||||
[ac_cv_linux_iop_getattr_takes_path_struct],
|
||||
[#include <linux/fs.h>
|
||||
- int _getattr(const struct path *path, struct kstat *stat, u32 request_mask,
|
||||
+ static int _getattr(const struct path *path, struct kstat *stat, u32 request_mask,
|
||||
unsigned int sync_mode) {return 0;};
|
||||
struct inode_operations _i_ops;],
|
||||
[_i_ops.getattr = _getattr;],
|
||||
@@ -692,10 +692,10 @@
|
||||
AC_DEFUN([LINUX_IOP_CREATE_TAKES_UMODE_T], [
|
||||
AC_CHECK_LINUX_BUILD([whether inode.i_op->create takes a umode_t argument],
|
||||
[ac_cv_linux_iop_create_takes_umode_t],
|
||||
- [#include <linux/fs.h>],
|
||||
+ [#include <linux/fs.h>
|
||||
+ static int _create(struct inode *i, struct dentry *d, umode_t m, struct nameidata *n)
|
||||
+ {return 0;};],
|
||||
[static struct inode_operations _i_ops;
|
||||
- int _create(struct inode *i, struct dentry *d, umode_t m, struct nameidata *n)
|
||||
- {return 0;};
|
||||
_i_ops.create = _create;],
|
||||
[IOP_CREATE_TAKES_UMODE_T],
|
||||
[define if inode.i_op->create takes a umode_t argument],
|
78
f5bafb0.diff
Normal file
78
f5bafb0.diff
Normal file
@ -0,0 +1,78 @@
|
||||
From f5bafb0680a063d710b6e5e8ccf833f1dd371896 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Wed, 07 Feb 2024 19:34:29 -0700
|
||||
Subject: [PATCH] rx: Add function prototypes to rx_prototypes.h
|
||||
|
||||
The prototype for rxk_NewSocketHost() is not in a header file, but is
|
||||
defined in the referencing .c file. The ARCH/rx_knet.c files that
|
||||
implement rxk_NewSocketHost() do not have a prototype (but when the
|
||||
rx_kcommon.c implementation is used it does have a prototype, since
|
||||
rx_kcommon.c is the "referencing .c file").
|
||||
|
||||
Add the prototype for rxk_NewSocketHost() to rx_prototypes.h and
|
||||
remove the prototype from rx_kcommon.c
|
||||
|
||||
The prototypes for the functions rx_DebugOnOff() and rx_StatsOnOff()
|
||||
are defined within rx_prototypes.h, but are within a preprocessor
|
||||
conditional for AFS_NT40_ENV, however the implementation for these
|
||||
2 functions do not have the preprocessor conditional.
|
||||
|
||||
Rearrange the prototypes for rx_DebugOnOff() and rx_StatsOnOff() so they
|
||||
are outside the AFS_NT40_ENV preprocessor conditional.
|
||||
|
||||
These functions are flagged due to missing prototypes when building
|
||||
against a Linux 6.8 kernel (which sets the -Wmissing-declarations and
|
||||
-Wmissing-prototypes compiler flags as default). Linux 6.8 commit:
|
||||
'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f).
|
||||
|
||||
When building against a kernel with CONFIG_WERROR=y, the build fails.
|
||||
|
||||
There are no functional changes in this commit.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15624
|
||||
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
|
||||
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 8528c36b96fe2935f42188caabf4feed0d5dbcbd)
|
||||
|
||||
Change-Id: Ieae8be7f89f5c675c6580d8cfb02ea77ce4088f7
|
||||
---
|
||||
|
||||
diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c
|
||||
index b6a069c..c90df3d 100644
|
||||
--- a/src/rx/rx_kcommon.c
|
||||
+++ b/src/rx/rx_kcommon.c
|
||||
@@ -33,7 +33,6 @@
|
||||
int (*rxk_GetPacketProc) (struct rx_packet **ahandle, int asize);
|
||||
#endif
|
||||
|
||||
-osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport);
|
||||
extern struct interfaceAddr afs_cb_interface;
|
||||
|
||||
rxk_ports_t rxk_ports;
|
||||
diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h
|
||||
index 87a1049..6e1ae56 100644
|
||||
--- a/src/rx/rx_prototypes.h
|
||||
+++ b/src/rx/rx_prototypes.h
|
||||
@@ -24,9 +24,10 @@
|
||||
|
||||
extern int rx_Init(u_int port);
|
||||
extern int rx_InitHost(u_int host, u_int port);
|
||||
-#ifdef AFS_NT40_ENV
|
||||
+
|
||||
extern void rx_DebugOnOff(int on);
|
||||
extern void rx_StatsOnOff(int on);
|
||||
+#ifdef AFS_NT40_ENV
|
||||
extern void rx_StartClientThread(void);
|
||||
#endif
|
||||
extern void rx_StartServer(int donateMe);
|
||||
@@ -332,6 +333,8 @@
|
||||
extern void rxk_init(void);
|
||||
# endif
|
||||
|
||||
+extern osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport);
|
||||
+
|
||||
/* UKERNEL/rx_knet.c */
|
||||
# ifdef UKERNEL
|
||||
extern void afs_rxevent_daemon(void);
|
35
fca6fd9.diff
Normal file
35
fca6fd9.diff
Normal file
@ -0,0 +1,35 @@
|
||||
From fca6fd911e493a344c040a95ea4ab820e2828802 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Deason <adeason@sinenomine.net>
|
||||
Date: Thu, 28 Jun 2018 12:50:52 -0500
|
||||
Subject: [PATCH] afs: Make afs_AllocDCache static
|
||||
|
||||
Nothing using afs_AllocDCache outside of afs_dcache.c. Declare the
|
||||
function static, to ensure that nobody else uses it, and to maybe
|
||||
allow for more compiler optimization.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/13226
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit 4ab70de9641807bd06056f0c1ac79550453b9574)
|
||||
|
||||
Change-Id: I6fd9e31c4b2e862174402f731a77c91599893223
|
||||
Reviewed-on: https://gerrit.openafs.org/15679
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
---
|
||||
|
||||
diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c
|
||||
index 3572f2f..46d0bdb 100644
|
||||
--- a/src/afs/afs_dcache.c
|
||||
+++ b/src/afs/afs_dcache.c
|
||||
@@ -1674,7 +1674,7 @@
|
||||
*
|
||||
* \return The new dcache.
|
||||
*/
|
||||
-struct dcache *
|
||||
+static struct dcache *
|
||||
afs_AllocDCache(struct vcache *avc, afs_int32 chunk, afs_int32 lock,
|
||||
struct VenusFid *ashFid)
|
||||
{
|
3
openafs-1.8.11-doc.tar.bz2
Normal file
3
openafs-1.8.11-doc.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3ac6ab3f9d93d55de17757903b0493fc9020f1e0402ea319e61208b3900b607c
|
||||
size 3779721
|
1
openafs-1.8.11-doc.tar.bz2.md5
Normal file
1
openafs-1.8.11-doc.tar.bz2.md5
Normal file
@ -0,0 +1 @@
|
||||
174eef8826e76cc5cc952185659e59d3 ../1.8.11/openafs-1.8.11-doc.tar.bz2
|
1
openafs-1.8.11-doc.tar.bz2.sha256
Normal file
1
openafs-1.8.11-doc.tar.bz2.sha256
Normal file
@ -0,0 +1 @@
|
||||
3ac6ab3f9d93d55de17757903b0493fc9020f1e0402ea319e61208b3900b607c openafs-1.8.11-doc.tar.bz2
|
3
openafs-1.8.11-src.tar.bz2
Normal file
3
openafs-1.8.11-src.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2efb4710996b7d23198b53c56295a8f9e24e8a555317c5fc63b8125a3714ecd
|
||||
size 15042304
|
1
openafs-1.8.11-src.tar.bz2.md5
Normal file
1
openafs-1.8.11-src.tar.bz2.md5
Normal file
@ -0,0 +1 @@
|
||||
0739265979a6a9ea4309c610222cff35 ../1.8.11/openafs-1.8.11-src.tar.bz2
|
1
openafs-1.8.11-src.tar.bz2.sha256
Normal file
1
openafs-1.8.11-src.tar.bz2.sha256
Normal file
@ -0,0 +1 @@
|
||||
e2efb4710996b7d23198b53c56295a8f9e24e8a555317c5fc63b8125a3714ecd openafs-1.8.11-src.tar.bz2
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db72ffc092f562d3c3d500b0d9f8541df5c3f83a4d80b32a242773cbfda5b040
|
||||
size 3807798
|
@ -1 +0,0 @@
|
||||
fbb93c3e4e580271d7f134ced201576e ../1.8.11pre1/openafs-1.8.11pre1-doc.tar.bz2
|
@ -1 +0,0 @@
|
||||
db72ffc092f562d3c3d500b0d9f8541df5c3f83a4d80b32a242773cbfda5b040 openafs-1.8.11pre1-doc.tar.bz2
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dfdb4bcd79e060180ebfd127d0447eceb716be0fbe07712ee7f9ac1904b42c82
|
||||
size 15042093
|
@ -1 +0,0 @@
|
||||
89602a759c60b491863c0e4c8545b2ea ../1.8.11pre1/openafs-1.8.11pre1-src.tar.bz2
|
@ -1 +0,0 @@
|
||||
dfdb4bcd79e060180ebfd127d0447eceb716be0fbe07712ee7f9ac1904b42c82 openafs-1.8.11pre1-src.tar.bz2
|
@ -15,7 +15,6 @@ ExecStartPost=/usr/bin/fs setcrypt $CRYPT
|
||||
ExecStop=/usr/bin/umount /afs
|
||||
ExecStop=/usr/sbin/afsd -shutdown
|
||||
ExecStop=/sbin/rmmod libafs
|
||||
KillMode=none
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target remote-fs.target
|
||||
|
@ -1,3 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 18 09:16:44 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
||||
|
||||
- update to openafs-1.8.11
|
||||
- apply upstream patches for kernel 6.8
|
||||
* 056a7a8.diff
|
||||
* 05ac614.diff
|
||||
* 073adec.diff
|
||||
* 0d9f6cf.diff
|
||||
* 0e983a9.diff
|
||||
* 112fb94.diff
|
||||
* 1e1bf8e.diff
|
||||
* 2056ce8.diff
|
||||
* 5312d06.diff
|
||||
* 67e48c8.diff
|
||||
* 6b20756.diff
|
||||
* 743d72f.diff
|
||||
* 7cae97b.diff
|
||||
* 81b910a.diff
|
||||
* 87ab04a.diff
|
||||
* 9f052c1.diff
|
||||
* a14a9ad.diff
|
||||
* a87845d.diff
|
||||
* aae8b00.diff
|
||||
* b77b304.diff
|
||||
* d1c89ac.diff
|
||||
* d9f3a2c.diff
|
||||
* db91384.diff
|
||||
* dffd0e1.diff
|
||||
* e0f425a.diff
|
||||
* e157f8f.diff
|
||||
* e428053.diff
|
||||
* ef7b8c5.diff
|
||||
* f5bafb0.diff
|
||||
* fca6fd9.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 26 12:45:02 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
66
openafs.spec
66
openafs.spec
@ -57,11 +57,11 @@
|
||||
|
||||
# used for %setup only
|
||||
# leave upstream tar-balls untouched for integrity checks.
|
||||
%define upstream_version 1.8.11pre1
|
||||
%define upstream_version 1.8.11
|
||||
|
||||
Name: openafs
|
||||
|
||||
Version: 1.8.11~pre1
|
||||
Version: 1.8.11
|
||||
Release: 0
|
||||
Summary: OpenAFS Distributed File System
|
||||
License: IPL-1.0
|
||||
@ -103,7 +103,37 @@ Source58: openafs.cacheinfo
|
||||
Source98: kmp_only.files
|
||||
Source99: openafs.changes
|
||||
|
||||
# PATCH-FIX-UPSTREAM fix build with kernel 6.5
|
||||
# PATCH-FIX-UPSTREAM fix build with kernel 6.8
|
||||
Patch1: ef7b8c5.diff
|
||||
Patch2: e0f425a.diff
|
||||
Patch3: 9f052c1.diff
|
||||
Patch4: 073adec.diff
|
||||
Patch5: a87845d.diff
|
||||
Patch6: aae8b00.diff
|
||||
Patch7: 5312d06.diff
|
||||
Patch8: 056a7a8.diff
|
||||
Patch9: db91384.diff
|
||||
Patch10: 67e48c8.diff
|
||||
Patch11: 112fb94.diff
|
||||
Patch12: 87ab04a.diff
|
||||
Patch13: 0d9f6cf.diff
|
||||
Patch14: dffd0e1.diff
|
||||
Patch15: f5bafb0.diff
|
||||
Patch16: 6b20756.diff
|
||||
Patch17: 05ac614.diff
|
||||
Patch18: 743d72f.diff
|
||||
Patch19: e157f8f.diff
|
||||
Patch20: 2056ce8.diff
|
||||
Patch21: d1c89ac.diff
|
||||
Patch22: d9f3a2c.diff
|
||||
Patch23: 7cae97b.diff
|
||||
Patch24: 81b910a.diff
|
||||
Patch25: 1e1bf8e.diff
|
||||
Patch26: a14a9ad.diff
|
||||
Patch27: b77b304.diff
|
||||
Patch28: fca6fd9.diff
|
||||
Patch29: e428053.diff
|
||||
|
||||
# PATCH-HANDLE-BACKPORTS
|
||||
# some kernel-features from 6.5 are apparently in 6.4
|
||||
Patch99: handle_backports.diff
|
||||
@ -321,6 +351,36 @@ done
|
||||
%patch -P 99 -p1
|
||||
%endif
|
||||
|
||||
%patch -P 1 -p1
|
||||
%patch -P 2 -p1
|
||||
%patch -P 3 -p1
|
||||
%patch -P 4 -p1
|
||||
%patch -P 5 -p1
|
||||
%patch -P 6 -p1
|
||||
%patch -P 7 -p1
|
||||
%patch -P 8 -p1
|
||||
%patch -P 9 -p1
|
||||
%patch -P 10 -p1
|
||||
%patch -P 11 -p1
|
||||
%patch -P 12 -p1
|
||||
%patch -P 13 -p1
|
||||
%patch -P 14 -p1
|
||||
%patch -P 15 -p1
|
||||
%patch -P 16 -p1
|
||||
%patch -P 17 -p1
|
||||
%patch -P 18 -p1
|
||||
%patch -P 19 -p1
|
||||
%patch -P 20 -p1
|
||||
%patch -P 21 -p1
|
||||
%patch -P 22 -p1
|
||||
%patch -P 23 -p1
|
||||
%patch -P 24 -p1
|
||||
%patch -P 25 -p1
|
||||
%patch -P 26 -p1
|
||||
%patch -P 27 -p1
|
||||
%patch -P 28 -p1
|
||||
%patch -P 29 -p1
|
||||
|
||||
./regen.sh
|
||||
|
||||
%build
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# startup options for the openAFS client.
|
||||
# startup options for the openAFS FUSE client.
|
||||
# see man afsd for details
|
||||
|
||||
AFSD_ARGS="-fakestat -memcache -blocks 102400 -dynroot -afsdb"
|
||||
|
Loading…
Reference in New Issue
Block a user