Package: openafs / 1.6.20-2+deb9u2

Metadata

Package Version Patches format
openafs 1.6.20-2+deb9u2 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0003 Add dummy exit command for afsd to do nothing.patch | (download)

src/afsd/afsd.c | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 add dummy -exit command for afsd to do nothing


LINUX split dentry eviction from osi_TryEvictVCache.patch | (download)

src/afs/LINUX/osi_vcache.c | 103 57 + 46 - 0 !
1 file changed, 57 insertions(+), 46 deletions(-)

 linux: split dentry eviction from osi_tryevictvcache

To make osi_TryEvictVCache clearer, and to prepare for a future change
in dentry eviction, split the dentry eviction logic into its own routine
osi_TryEvictDentries.

Reformat src afs LINUX osi_vcache.c.patch | (download)

src/afs/LINUX/osi_vcache.c | 23 14 + 9 - 0 !
1 file changed, 14 insertions(+), 9 deletions(-)

 reformat src/afs/linux/osi_vcache.c

Apply the GNU indent options from CODING, with manual adjustments
to leave jump labels in column zero.

Also rename and mark static a function-local helper function.

Reviewed-on: https://gerrit.openafs.org/12422
LINUX do not use d_invalidate to evict dentries.patch | (download)

src/afs/LINUX/osi_vcache.c | 8 8 + 0 - 0 !
1 file changed, 8 insertions(+)

 linux: do not use d_invalidate to evict dentries

When working within the AFS filespace, commands which access large
numbers of OpenAFS files (e.g., git operations and builds) may result in
active files (e.g., the current working directory) being evicted from the
dentry cache.  One symptom of this is the following message upon return
to the shell prompt:

"fatal: unable to get current working directory: No such file or
directory"

Starting with Linux 3.18, d_invalidate returns void because it always
succeeds.  Commit a42f01d5ebb13da575b3123800ee6990743155ab adapted
OpenAFS to cope with the new return type, but not with the changed
semantics of d_invalidate.  Because d_invalidate can no longer fail with
-EBUSY when invoked on an in-use dentry. OpenAFS must no longer trust it
to preserve in-use dentries.

Modify the dentry eviction code to use a method (d_prune_aliases) that
does not evict in-use dentries.

Reviewed-on: https://gerrit.openafs.org/12363
afs shake harder in shake loose vcaches.patch | (download)

src/afs/DARWIN/osi_vcache.c | 5 1 + 4 - 0 !
src/afs/afs_vcache.c | 14 13 + 1 - 0 !
2 files changed, 14 insertions(+), 5 deletions(-)

 afs: shake harder in shake-loose-vcaches

Linux based cache managers will allocate vcaches on demand and
deallocate batches of vcaches in the background. This feature is called
dynamic vcaches.

Vcaches to be deallocated are found by traversing the vcache LRU list
(VLRU) from the oldest vcache to the newest. Up to a target number of
vcaches are attempted to be evicted.  The afs_xvcache lock protecting
the VLRU may be dropped and re-acquired while attempting to evict a
vcache. When this happens, it is possible the VLRU may have changed, so
the traversal of the VLRU is restarted.  This restarting of the VLRU
transversal is limited to 100 iterations to avoid looping indefinitely.

Vcaches which are busy cannot be evicted and remain in the VLRU. When a
busy cache was not evicted and the afs_xvache lock was dropped, the VLRU
traversal is restarted from the end of the VLRU. When the busy vcache is
encountered on the retry, it will trigger additional retries until the
loop limit is reached, at which point the target number of vcaches will
not be deallocated.

This can leave a very large number of unbusy vcaches which are never
deallocated.  On a busy machine, tens of millions of unused vcaches can
remain in memory. When the busy vcache at the end of the VLRU is finally
evicted, the log jam is broken, and the background deamon will hold the
afs_xvcache lock for an excessively long time, hanging the system.

Fix this by moving busy vcaches to the head of the VLRU before
restarting the VLRU traversal. These busy vcaches will be skipped when
retrying the VLRU traversal, allowing the cache manager to make progress
deallocating vcaches down to the target level.

This was already done on the mac osx platform while attempting to evict
vcaches. Move the code to move busy vcaches to the head of the VLRU up
the the platform agnostic caller.

Thanks to Andrew Deason for the initial version of this patch.

Reviewed-on: https://gerrit.openafs.org/11654
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Linux 4.9 deal with demise of GROUP_AT.patch | (download)

acinclude.m4 | 1 1 + 0 - 0 !
src/afs/LINUX/osi_machdep.h | 5 5 + 0 - 0 !
2 files changed, 6 insertions(+)

 linux 4.9: deal with demise of group_at

Linux commit 81243eacfa40 "cred: simpler, 1D supplementary groups"
refactors the group_info struct, removing some members (which OpenAFS
references only through the GROUP_AT macro) and adding a gid member.
The GROUP_AT macro is also removed from the tree.

Add an autoconfigure test for the new group_info member gid and define a
replacement GROUP_AT macro to do the right thing under the new regime.

Linux 4.9 inode_operation rename now takes flags.patch | (download)

acinclude.m4 | 6 6 + 0 - 0 !
src/afs/LINUX/osi_vnodeops.c | 11 10 + 1 - 0 !
2 files changed, 16 insertions(+), 1 deletion(-)

 linux 4.9: inode_operation rename now takes flags

In Linux 3.15 commit 520c8b16505236fc82daa352e6c5e73cd9870cff,
inode_operation rename2() was added.  It takes the same arguments as
rename(), with an added flags argument supporting the following values:

RENAME_NOREPLACE: if "new" name exists, fail with -EEXIST.  Without
this flag, the default behavior is to replace the "new" existing file.

RENAME_EXCHANGE: exchange source and target; both must exist.

OpenAFS never implemented a .rename2() routine because it was optional
when introduced at Linux v3.15.

In Linux 4.9-rc1 the following commits remove the last in-tree uses of
.rename() and converts .rename2() to .rename().
aadfa8019e81 vfs: add note about i_op->rename changes to porting
2773bf00aeb9 fs: rename "rename2" i_op to "rename"
18fc84dafaac vfs: remove unused i_op->rename
1cd66c93ba8c fs: make remaining filesystems use .rename2
e0e0be8a8355 libfs: support RENAME_NOREPLACE in simple_rename()
f03b8ad8d386 fs: support RENAME_NOREPLACE for local filesystems

With these changes, it is now mandatory for OpenAFS afs_linux_rename()
to accept a 5th flag argument.

Add an autoconfig test to determine the signature of .rename().  Use this
information to implement afs_linux_rename() with the appropriate number
of arguments.  Implement "toleration support" for the flags option by
treating a zero flag as a normal rename; if any flags are specified,
return -EINVAL to indicate the OpenAFS filesystem does not yet support
any flags.

Linux 4.9 inode_change_ok becomes setattr_prepare.patch | (download)

acinclude.m4 | 3 3 + 0 - 0 !
src/afs/LINUX/osi_file.c | 4 4 + 0 - 0 !
2 files changed, 7 insertions(+)

 linux 4.9: inode_change_ok() becomes setattr_prepare()

Linux commit 31051c85b5e2 "fs: Give dentry to inode_change_ok() instead
of inode" renames and modifies inode_change_ok(inode, attrs) to
setattr_prepare(dentry, attrs).

Modify OpenAFS to cope.

AFS_component_version_number.c Respect SOURCE_DATE_E.patch | (download)

src/config/Makefile.version-NOCML.in | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 [patch] afs_component_version_number.c: respect source_date_epoch if
 set

This enables better build reproducibility.

https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal

0010 OPENAFS SA 2017 001 rx Sanity check received MTU and.patch | (download)

src/rx/rx.c | 16 16 + 0 - 0 !
1 file changed, 16 insertions(+)

 openafs-sa-2017-001: rx: sanity-check received mtu and twind values

Rather than blindly trusting the values received in the
(unauthenticated) ack packet trailer, apply some minmial sanity checks
to received values.  natMTU and regular MTU values are subject to
Rx minmium/maximum packet sizes, and the transmit window cannot drop
below one without risk of deadlock.

The maxDgramPackets value that can also be present in the trailer
already has sufficient sanity checking.

Extremely low MTU values (less than 28 == RX_HEADER_SIZE) can cause us
to set a negative "maximum usable data" size that gets used as an
(unsigned) packet length for subsequent allocation and computation,
triggering an assertion when the connection is used to transmit data.

FIXES 134450

(cherry picked from commit 894555f93a2571146cb9ca07140eb98c7a424b01)
(cherry picked from commit eae2575dc738bd69bb6a0a84f87f02f5cf2b4eb9)

openafs sa 2018 001 stable16.patch | (download)

Makefile.in | 2 1 + 1 - 0 !
doc/man-pages/pod8/backup.pod | 12 12 + 0 - 0 !
doc/man-pages/pod8/butc.pod | 31 29 + 2 - 0 !
src/audit/audit.c | 191 191 + 0 - 0 !
src/audit/audit.h | 21 21 + 0 - 0 !
src/bucoord/bucoord_internal.h | 2 2 + 0 - 0 !
src/bucoord/dump.c | 34 30 + 4 - 0 !
src/bucoord/main.c | 5 4 + 1 - 0 !
src/butc/Makefile.in | 1 1 + 0 - 0 !
src/butc/butc_prototypes.h | 5 5 + 0 - 0 !
src/butc/tcmain.c | 97 79 + 18 - 0 !
src/butc/tcprocs.c | 148 136 + 12 - 0 !
src/butc/tcstatus.c | 57 55 + 2 - 0 !
13 files changed, 566 insertions(+), 40 deletions(-)

 openafs-sa-2018-001 - volume-level data replacement via unauthenticated butc connections
openafs sa 2018 002 stable16.patch | (download)

src/afs/afs_callback.c | 2 2 + 0 - 0 !
src/budb/procs.c | 1 1 + 0 - 0 !
src/butc/tcprocs.c | 3 3 + 0 - 0 !
src/butc/tcstatus.c | 4 2 + 2 - 0 !
src/kauth/kaprocs.c | 1 1 + 0 - 0 !
src/ptserver/ptprocs.c | 4 2 + 2 - 0 !
src/ubik/vote.c | 1 1 + 0 - 0 !
src/volser/volprocs.c | 3 3 + 0 - 0 !
8 files changed, 15 insertions(+), 4 deletions(-)

 openafs-sa-2018-002 - information leakage from uninitialized rpc output variables
openafs sa 2018 003 stable16.patch | (download)

src/budb/budb.rg | 2 1 + 1 - 0 !
src/rxgen/rpc_parse.c | 5 4 + 1 - 0 !
src/vlserver/vldbint.xg | 7 6 + 1 - 0 !
src/volser/volint.xg | 15 8 + 7 - 0 !
4 files changed, 19 insertions(+), 10 deletions(-)

 openafs-sa-2018-003 - denial of service due to excess resource consumption