Commit Graph

270 Commits

Author SHA1 Message Date
Ben Kaduk
5e8c4b7c8a FBSD: allow exclusion of kernel symbols
Gerrit/5503 added support for kernel module symbols in the
bsd.kmod.mk world; however, the inclusion of symbols is conditoinal
on the DEBUG_FLAGS make variable being *set*, as opposed to nonempty.
So we must use an intermediate variable to store the AC_SUBST
result and conditionalize assignment to DEBUG_FLAGS on whether
or not it is empty.

Change-Id: I7f86fd08d6dcf1ac7116680db98db13f5f31be7b
Reviewed-on: http://gerrit.openafs.org/5507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-28 07:01:32 -07:00
Ben Kaduk
3e191dfd99 FBSD: bsd.kmod.mk fallout for debug symbols
Now that we no longer control the installation of libafs.ko,
debug symbols are always getting stripped.
If the user requested kernel debug symbols, define DEBUG_FLAGS
for the libafs build and install, so that bsd.kmod.mk will
install the .symbols file alongside the kernel module.

Change-Id: I0e7f3736666c96c6aaed18c0add98dea37349b83
Reviewed-on: http://gerrit.openafs.org/5503
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-25 07:27:24 -07:00
Simon Wilkinson
136704fa64 Darwin: Actually stop the kernel build
At the moment, all of the kernel build lines end with "; true", which
means that the build will always continue, regardless of whether
creating an individual object file succeeds or not. The 'true' is there
to gobble up the name of the source file which the common build
infrastructure adds to the end of the command line.

Instead of using '; true', use '&& true', so that if one of the C
compiler commands, or the lipo, fails, we get told about it, before
we try to link the missing objects.

Change-Id: I11c14e6aa12188e3de044f900b3df8c8ffe5df13
Reviewed-on: http://gerrit.openafs.org/5391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
2011-09-11 05:41:14 -07:00
Derrick Brashear
85f917d076 macos: update 32 bit kernel build flags
this is what the current xcode uses. do the same.

Change-Id: I3ea2f3df6e0f39aafb421f6b0854af5d85659742
Reviewed-on: http://gerrit.openafs.org/5205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
2011-09-02 05:48:12 -07:00
Ben Kaduk
beac254406 FBSD: in libafs, define LIBAFSNONFS
Running 'make dest' will fail without this variable defined.

Change-Id: I7f82cb3aeae8585c68ee60b005f4ba32d44e2104
Reviewed-on: http://gerrit.openafs.org/5058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-22 05:30:48 -07:00
Ben Kaduk
79aedab16c FBSD: update to using bsd.kmod.mk
We have for a long time had a cobbled-together kernel module build
system that essentially copied build arguments from a kernel build
in an ad hoc fashion, with lots of conditionals on architecture
and OS version.  (We got it wrong, several times, too.)
Instead, use the supported mechanism for building kernel modules,
which allows us to remove a lot of code from the Makefile and gives
us some measure of future-proofing.

FIXES 127578

Change-Id: Ibccea4507f57660becb4fb39a57b50c15ea4cb07
Reviewed-on: http://gerrit.openafs.org/5042
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-18 09:40:57 -07:00
Ben Kaduk
1ec64ba50e libafs: switch to hardcoded source names with CRULE
Most of the userspace tree uses AFS_CCRULE for how to compile
things.  We cannot use this directly for libafs, since in the
general case kernel and userland code may need to be treated
with an entirely different compiler and compiler options.
Switching libafs fully to a (e.g.) LIBAFS_CCRULE would be a substantial
amount of work, and require a lot of testing.  However, we can
stop passing -c $? (the out-of-date sources) in CRULE_{NO,}OPT
and add the source file after each invocation of the CRULEs,
an incremental step towards LIBAFS_CCRULE.
This has the extra advantage of not causing issues when integrating
with kernel module build systems that automatically add dependencies
to all object file targets. (In such cases, $? expands to multiple files
and 'gcc -o foo.o -c' bails out.)

Most of this change was automatically generated from the following
awk script:
==========
/[a-zA-Z_0-9].o:/ {path=$2;}
/^      \$\(CRULE_/ {print $0,path;}
!/^     \$\(CRULE_/ {print;}
==========

Change-Id: I22b8eeaee730feb37b2527d44d6548e7b13b9a0a
Reviewed-on: http://gerrit.openafs.org/5040
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-18 09:40:40 -07:00
Andrew Deason
e4c2810f41 Remove support for Solaris pre-8
Remove support for all Solaris and SunOS platforms prior to Solaris 8,
since Solaris 7 reached end-of-life in August of 2008. Remove all
non-documentation references to sunx86_57 and earlier, sun4x_57 and
earlier, and AFS_SUN57_ENV and earlier.

References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where
appropriate, and AFS_SUN5_ENV now implies Solaris 8.
AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV.

Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3
Reviewed-on: http://gerrit.openafs.org/4888
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-06-30 07:27:39 -07:00
Simon Wilkinson
f314dae7fd Irix: Add a simple osi_ReadRandom implementation
Add an implementation of osi_ReadRandom for Irix, which just panics
(Irix has no source of cryptographically safe entropy in the kernel).
Whilst hcrypto requires an implementation of osi_ReadRandom, nothing
in the current kernel module will cause it to be called, so this
panic should never be reached.

Change-Id: I7aa52f445182f8e660586241304a7379770afcaa
Reviewed-on: http://gerrit.openafs.org/4575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-27 10:33:56 -07:00
Simon Wilkinson
353857e768 Irix: Supress some more warnings in kernel builds
Suppress the following warnings in kernel builds:
 *) The function "blah" was declared but never referenced (1174)
 *) The indicated trailing comma is non-standard (1201)
 *) The parameter "blah" was never referenced (3201)
 *) implicit conversion of a 64-bit integral type to a smaller
    integral type (3968)

Change-Id: If6cf21f287b5aefa06daaa2807e05a84e391fa95
Reviewed-on: http://gerrit.openafs.org/4419
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-04 06:53:43 -07:00
Derrick Brashear
f41ee7d172 macos next support
first brush at supporting next macos. totally not lion about it.

Change-Id: I4d2e05f68266ea82de710717c5340f16425f897e
Reviewed-on: http://gerrit.openafs.org/4290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-03-24 09:19:47 -07:00
Derrick Brashear
4397159a1c arm darwin update
some stuff that got lost from the last batch

Change-Id: Id892a8fce7c90a07c359d77282c557a0a9b41cd2
Reviewed-on: http://gerrit.openafs.org/4064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-02-27 01:31:34 -08:00
Andrew Deason
cfb5424768 HPUX: Fix osi_debug.c includes
osi_debug.c was trying to include fcrypt.h and private_data.h. But the
former is in the rx subdirectory, and the latter is in src/rxkad. So,
specify a more complete path for fcrypt.h, and put src/rxkad in the
include list for osi_debug.c so we can build again.

Change-Id: I5754f56354f40bd3697ac286cb0820041fda0b00
Reviewed-on: http://gerrit.openafs.org/4024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-21 09:11:25 -08:00
Simon Wilkinson
687fe37614 rfc3961: Add a kernel rfc3961 implementation
Add the necessary mechanisms to build Heimdal's libkrb5/crypto_*.c in
the kernel. This provides the kernel module with a RFC3961
implementation.

In theory this could also be used to provide a RFC3961 implementation
on top of an EVP-based crypto library in userspace, but at the moment
we're just using Heimdal directly for this.

Change-Id: Ie57391da0dabd2dca8b305e23f0c0faa056a4675
Reviewed-on: http://gerrit.openafs.org/3948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 08:47:35 -08:00
Simon Wilkinson
465321e3f4 hcrypto: Add hcrypto EVP support to the Unix CM
This commit adds the files which are necessary to support hcrypto's
EVP interface to the Unix cache manager build. Only a small number
of EVP ciphers and hashes are currently supported -
    * aes_128_cbc
    * aes_256_cbc
    * sha1

Note that the EVP interface is the only supported mechanism to use
the AES cipher - directly calling the underlying crypto functions
is not recommended and may break at any time.

Change-Id: I662073e578b29db1707c6b6433209e75e4db455d
Reviewed-on: http://gerrit.openafs.org/3945
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 08:46:46 -08:00
Simon Wilkinson
b4350fab31 Unix CM: Add osi_crypto crypto interface
Add a new osi file to the cache manager. This file includes functions
which interface hcrypto with the kernel's own cryptography library.

At the moment, the only such function is osi_readRandom which returns
a block of random data from the kernel's PRNG.

Change-Id: Ib728f5bb638ef634efe4822da24bb7cca723983f
Reviewed-on: http://gerrit.openafs.org/3944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-02-16 08:45:56 -08:00
Simon Wilkinson
c0254b5652 Unix CM: Move kernel crypto include files
Move the crypto include files which are used for kernel builds into
the hcrypto directory where they logically belong.

Change-Id: Ic904e63e48d09e6a2049f4e1c4433980ecf0fa1e
Reviewed-on: http://gerrit.openafs.org/3767
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-31 09:45:09 -08:00
Antoine Verheijen
42c5806599 OpenBSD: Eliminate complaint about built-in malloc.
With OpenBSD 4.8, OpenBSD now uses gcc 4. With its new
defaults, the OpenAFS compile of the kernel module now
complains incessantly about the conflict between the
built-in malloc versus the kernel version (which has
extra parameters). Therefore, set -fno-builtin-malloc
when compiling the kernel module to remove the noise
since the differences can't be reconciled otherwise.

Change-Id: I7e28e6275ca90f73a8d1f65d82f1ccf2cc3a0ead
Reviewed-on: http://gerrit.openafs.org/3751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-24 09:39:34 -08:00
Antoine Verheijen
6d8e3392b7 OpenBSD: Install no-NFS version of libafs
The build process for OpenBSD builds the no-NFS version of
the kernel module but, at install time, the NFS version is
subseuquently built and installed while the no-NFS version
is ignored. The NFS version does not load and is not needed
in OpenBSD so this patch makes sure that the no-NFS version
is installed and used.

Change-Id: I1d07334121911c22aea1f6d157f34e1b40e5b780
Reviewed-on: http://gerrit.openafs.org/3684
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-01-19 13:41:23 -08:00
Andrew Deason
4e00fc6f0e Add ioctl-based AFS calls for Solaris 11
Switch from using syscall-based AFS calls to ioctl-based AFS calls,
since syscall 65 was repurposed in some kernels in Solaris 11 and
OpenSolaris. Update the provided afs init script to accomodate the
additional steps needing for starting the AFS client.

Partially based off of some work by Derrick Brashear.

Change-Id: If694af8ac576856fed113851f1be4154b4d970d3
Reviewed-on: http://gerrit.openafs.org/3498
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-12-13 11:12:58 -08:00
Antoine Verheijen
ba63d22bfb OpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs
When building libafs, the make file variable COMMON_INCLUDE is
assigned a value in two places: Makefile.common.in and
MakefileProto.OBSD.in. The assignment in the latter place is both
wrong and unnecessary. Remove it.

Change-Id: Ie322f01b023898d4f246243ee3d196aa714147df
Reviewed-on: http://gerrit.openafs.org/3430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-12-03 11:28:11 -08:00
Ben Kaduk
a4e4ed9de9 Catch up on FBSD releases
Add param.foo.h and sysname entries for the past and forthcoming
FreeBSD 7.2, 7.3, 7.4, and 8.2 releases.  Also update the
MakefileProto.FBSD.ins that need touching, simplifying the libuafs
one in the process.

Change-Id: I6a7ff217572daac96f6fa6eb104eb7b1305c5ff6
Reviewed-on: http://gerrit.openafs.org/3389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-27 07:42:33 -08:00
Simon Wilkinson
df05b71d9b Use hcrypto for kernel md5
Use the hcrypto code for kernel md5 too.

Change-Id: I84663a5e29ef8ce4cb0f20be0604198c13b72c43
Reviewed-on: http://gerrit.openafs.org/2578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-19 05:08:11 -08:00
Simon Wilkinson
6ab0529a70 auth: Use Kernel XDR for kernel tokens
For consistency, we should use a version of token.xdr.c built with
the -k flag when we build it into our kernel modules.

Change-Id: I08e7a1966664141af6c4ed160d3fb860eb5821bd
Reviewed-on: http://gerrit.openafs.org/3202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:32:54 -07:00
Derrick Brashear
4346144b84 add rxstats to kernel
add split out rxstats module to kernel

Change-Id: Ibdc721f19a63c58604a56b0099d0c52161d3b00c
Reviewed-on: http://gerrit.openafs.org/2885
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-02 10:06:36 -07:00
Matt Smith
18b932f29f Updates to the Cache Manager to include NetBSD5 support
LKM currently builds and will mount when forced with the entry point
manually defined. Contents of /afs can be discovered, but when listing
the directory, the system call will not return.

Change-Id: I68ba1897b56613bd4ebbe331eea3140c6a963a7d
Reviewed-on: http://gerrit.openafs.org/2767
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:46:52 -07:00
Simon Wilkinson
f3f108f4c7 rx: Add struct rx_identity
Add the rx_identity structure which can be used by rx security
layers to store and return identity information to applications.

A number of helper functions for manipulating rx_identity structures
are also provided.

Change-Id: I64ae2b62a4bc8a401c1ac877f4662c66a39247f8
Reviewed-on: http://gerrit.openafs.org/2827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:29:59 -07:00
Simon Wilkinson
571aac176e rx: Add an opaque type
Add a type to RX to hold counted data chunks, and some helper
functions to assist callers with using that type.

Change-Id: Ia81ceea50e43f6fba101122a085f84776dbf3807
Reviewed-on: http://gerrit.openafs.org/2826
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-09-23 02:27:58 -07:00
Matt Benjamin
239a62034b DFBSD update dfbsd userland
Add new sysnames.  Fix some userland header inclusions,
defend against kernel-mode ioctl interpretation when
building UKERNEL.  Add fragments missing from DFBSD
MakefileProto template.

Change-Id: I56659bfe43dc24ef8a158aaf486c9a6f23643002
Reviewed-on: http://gerrit.openafs.org/2619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-29 17:22:40 -07:00
Simon Wilkinson
2221b61eff Add new SetTokenEx pioctl
This change implements the new, XDR based, SetTokenEx pioctl. This
pioctl permits sending multiple tokens, of multiple types, into the
kernel in a single pioctl call. This patch provides a kernel
implementation of the pioctl, and a new library function
ktc_SetTokenEx, which will use either the new pioctl, or fall back
to the old one should SetTokenEx not be available.

Change-Id: Id1e2903e078c549f5675e3d2ecdf53a9bb33f5e9
Reviewed-on: http://gerrit.openafs.org/2582
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-26 09:29:09 -07:00
Simon Wilkinson
adf2e6e827 Unix CM: Generalise token storage
This generalises token storage in the Unix CM, so that it isn't
rxkad specific. We add a new, dynamically allocated, list of tokens
hanging off each unixuser structure. Each token is expressed as
a discrimated union keyed on the security class of that token,
with the token's details contained within that Union.

All token handling is performed through a set of functions in
afs_token.c - token access is modified to use this interface
throughout the rest of the code.

Change-Id: I939f3a611bb6e991e1e0d075ced0a59fc6f57693
Reviewed-on: http://gerrit.openafs.org/2580
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-26 09:16:33 -07:00
Andrew Deason
e75eb34b9a SOLARIS: do not ignore libafs build failures
Change-Id: Ic5bc6cefd616736d81807bf6ac6d0226fcdb3df2
Reviewed-on: http://gerrit.openafs.org/2459
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-21 11:30:22 -07:00
Marc Dionne
aeba16157e afspag version of rx_knet.o
in order to correctly generate KBUILD_MODNAME, each object
file needs to be built only once. in this case it matters because the
pr_debug macro, called as a result of including errqueue.h, needs it
and things which depend on it, and when it's built into 2 .kos,
the wrong thing happens.

Change-Id: I85be7a3322fd179ef75fe14a90c9e7592e542ed1
Reviewed-on: http://gerrit.openafs.org/2435
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-07-14 19:48:33 -07:00
Ben Kaduk
3f5144b3ed Disable red zones for amd64 FBSD kernel code
The kernel has been compiled with -mno-red-zone since at least
FreeBSD 5.0; when we compile libafs.ko with red zones enabled
and interact with the red-zone-less kernel, we get occasional
stack corruption, which manifests itself in a variety of
unpleasant ways.
The flags we pass to gcc for our module build currently differ
substantially from those used during a kernel build (or modules
built with the kernel); I hope to transition to a module build
process involving bsd.kmod.mk in the relatively near future.

Change-Id: I406e264c1f96e1d893b9d12b561f48a3cbfdf57c
Reviewed-on: http://gerrit.openafs.org/2297
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-06-30 09:26:07 -07:00
Ben Kaduk
ed2f4f8d3d Kill FBSD4X with fire
We haven't even pretended to work on the 4.X series for quite some
time, and keeping this code around just makes things (slightly)
harder to read.
AFS_FBSD_ENV is now equivalent to AFS_FBSD50_ENV (though the
latter should not be used).
Leave the fbsd_4 sysnames in afs_sysnames.h for archival purposes.

Change-Id: Ibebda92967ca26c3dd4bf0b2cc6a66ae3a94d0ff
Reviewed-on: http://gerrit.openafs.org/1968
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-05-17 05:36:29 -07:00
Ben Kaduk
de68cdef9e Add entries for FBSD 8.1 and 9.0
Though neither have been released, yet, RELENG_8 and HEAD are
starting to get changes that we need to conditionalize on.

Change-Id: Ia3af3c38abe4d0d01e0cef974771b45a97d3d9aa
Reviewed-on: http://gerrit.openafs.org/1691
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-05-06 20:41:24 -07:00
Simon Wilkinson
9be76c0d31 Refactor afs_NewVCache
afs_NewVCache was a twisty turny maze of #ifdefs and duplicated code.
This makes a number of sweeping changes to simplify this code, and to
move platform specific elements out into their own directories.

*) ShakeLooseVCaches is refactored so that the same code can be used
   both for platforms that support dynamic vcaches, and those which
   don't.
*) afs_NewVCache, ShakeLooseVCaches, and afs_AllocVCache are all
   modified to remove platform specific code, and to call platform
   specific functions.
*) A new platform file 'osi_vcache.c' is created to hold a number of
   platform specific vcache operations:
   *) osi_TryEvictVCache handles the decision of whether a vcache can
      be evicted or not, and does so if required
   *) osi_NewVnode allocates a new vnode
   *) osi_PrePopulateVCache does the necessary population of the
      vcache, before it's threaded onto the VLRUQ and associated hash
      tables.
   *) osi_AttachVnode handles attaching an OS vnode to our vcache,
      where that is necessary
   *) osi_PostPopulateVCache handles the vcache population that must
      occur after we're on the VLRUQ and have a vnode attached.

Change-Id: I368e5fb500d012b44141aa8f8cf0516e63e58f57
Reviewed-on: http://gerrit.openafs.org/1881
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-05-03 17:11:20 -07:00
Matt Benjmain
94c15f62d3 netbsd: rebase cm at NetBSD 4.0
Rebases the NetBSD client port at OpenBSD, which was originally
based on an original NetBSD client port by John Kohl.  The
platforms remain closely connected.

At latest milestone, the port builds as a NetBSD LKM, which was
loadable and can mount /afs (but much work remains past this
point).

Change-Id: I1381a60078794da03a82e7bf6e78127da82d61ee
Change-Id: I8e07e82796f6981c99d22ff50dd5b284aad88a9f
Reviewed-on: http://gerrit.openafs.org/1874
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-04-28 13:47:20 -07:00
Simon Wilkinson
fbbfb51e7d Move rxkad/domestic/* into rxkad/ directory proper
Historically, the fcrypt code lived in its own directory, named
'domestic', so that ACLs could be used to prevent nasty foreigners
from getting access to it. Now that those days are gone, having the
domestic directory just complicates builds. Remove it, and reunite
fcrypt with the rest of the tree.

Change-Id: I2d1f66463121bbb391260b613913d76c27931429
Reviewed-on: http://gerrit.openafs.org/1836
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 20:55:03 -07:00
Simon Wilkinson
0d7197f925 Linux: Remove prototype warning inhibition
The Linux kernel builds used to add -Wno-strict-prototypes to the
CFLAGS. Now that we've got prototypes for pretty much everything,
remove this line so we can see any real warnings that might occur.

Change-Id: I71b97bd3d19259f6ec6a55cfe095f5f4bf1ab78f
Reviewed-on: http://gerrit.openafs.org/1830
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-25 19:05:19 -07:00
Matt Smith
b28cdd0a0e Fix problems from afs_osi_gcpags reorganization
Corrections to mistakes made during the reorganization
of afs_osi_gcpags.c to per-OS directories. Includes fixes to
LINUX24 and whitespace corrections.

Change-Id: Ie9d1637b00dacc0f58e90df0e4fb2505a571bc1b
Reviewed-on: http://gerrit.openafs.org/1737
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-10 10:54:41 -07:00
Matt Smith
6de3486c2c Move contents of afs_osi_gcpags to per-OS files
Moved the relevant chunks from src/afs/afs_osi_gcpags.c
to osi_gcpags.c located in each of the OS subdirectories.
Also updated libafs and libuafs to reflect these changes.

Change-Id: I537d92952718ef3b3bb0583daf7993288716652c
Reviewed-on: http://gerrit.openafs.org/1727
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-04-09 13:32:57 -07:00
Simon Wilkinson
000c665881 Unix CM: Add xdrmem and xdrlen to kernel builds
Add the new xdrmem and xdrlen XDR sources to kernel space. Make some
changes to the xdrmem header file to permit it to build in kernel space.

Change-Id: I2ab32f67287df28d4ffded651d3d49d1211dd40e
Reviewed-on: http://gerrit.openafs.org/1328
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-02-15 17:42:02 -08:00
Simon Wilkinson
cad1df43d8 Darwin: Stop CM builds when errors occur
Make the kernel module build on Mac OS stop when errors are
encountered, instead of just ploughing on regardless

Change-Id: I489357c04cb7c78663f593af2c2adbc50ebfffff
Reviewed-on: http://gerrit.openafs.org/1203
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-02-02 06:01:42 -08:00
Derrick Brashear
cc47e76591 create debugging kext package for MacOS
this creates and installs a debugging kext package for macos. it also
always installs the decode-panic script (which can be used even without
the debug kext)

Change-Id: Iff03de66cd3df2690f03333e6629d21660364cd1
Reviewed-on: http://gerrit.openafs.org/1120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-01-17 08:15:59 -08:00
Simon Wilkinson
34ffc9cd7d Linux: Use splice to speed up cache storeback
This patch adds a new cache store function for Linux, which uses
splice() and direct access to the page cache, rather than doing
data copies to a temporary buffer between rx and afs. It removes
one copy, and some context switching, from the write codepath.

One side-effect here is that it will delay storebehinds from
returning control to the user. Instead of returning once the first
4k has been successfully transfered, we will wait until a cache
chunk has been transmitted. This is currently unavoidable, as we
can't take the GLOCK within a splice actor.

Change-Id: I5b0284d67febccf099710589908fad18b808332c
Reviewed-on: http://gerrit.openafs.org/903
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-12-10 11:45:36 -08:00
Derrick Brashear
b7cc8bf285 create LINUX24 directory
shadow src/afs/LINUX into .../LINUX24, removing 2.6 code from it
same for rx/LINUX

cheat and simply modify MKAFS_OSTYPE in MakefileProto.LINUX.in

Reviewed-on: http://gerrit.openafs.org/565
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:17:49 -07:00
Simon Wilkinson
af9c9d905a Add support for background page copies
LICENSE BSD

This patch adds support for backgrounding the page copies which are
caused by a call to readpages() In theory, this should improve the
throughput of the AFS kernel module as it permits processes to start
work whilst data is still being read into the page cache for later
pages.

Reviewed-on: http://gerrit.openafs.org/537
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:13:04 -07:00
Claudio Bisegni
dffd78ccb0 Fixed the tokens update and update .gitignore for MacOSX packaging file
Fixed the tokens update on preference pane if operation is made with NSStatusItem. 
Has been updated the src/packaging/MacOS/.gitingore for CellServDB file and src/libafs/.gitignore has been added afs.x86_darwin_100.plist.

Reviewed-on: http://gerrit.openafs.org/372
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-08-28 13:05:50 -07:00
Derrick Brashear
e26235ed3e macos 10.5 doesn't support compiler kext flag
-kext was added in later xcodes; it's safer to just assume we don't
have it.

Reviewed-on: http://gerrit.openafs.org/365
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-27 22:03:10 -07:00