Go to file
Michael Meffie 9c0db059b6 vol: convert vnode macros to inline functions
Convert the vnode macros to inline functions to fix integer overflows
for very large vnode numbers (and generally improve the code robustness
and readability).

The macro version of vnodeIndexOffset() will evaluate to an incorrect
offset for very large vnode numbers due to 32-bit integer overflow. The
vnode index file will then be corrupted when writing to the incorrect
offset.

In code paths where the vnode number incorrectly defined as a signed
32-bit integer, this change prevents vnodeIndexOffset() from evaluating
to a negative result when a vnode number is larger than 2^31.

Thanks to Mark Vitale for reporting and providing analysis.

Change-Id: Ia6e0f2d2f97fa1091e0b5a4029d40098692ee681
Reviewed-on: https://gerrit.openafs.org/12397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2016-12-25 17:43:47 -05:00
build-tools regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00
doc doc: add the PtLog man page 2016-12-22 17:21:50 -05:00
src vol: convert vnode macros to inline functions 2016-12-25 17:43:47 -05:00
tests opr: Make opr_jhash_opaque consistent with opr_jhash 2016-12-22 15:59:31 -05:00
.gitignore git: add a mailmap file 2016-09-25 21:05:23 -04:00
.mailmap git: add a mailmap file 2016-09-25 21:05:23 -04:00
.splintrc start-splint-support-20030528 2003-05-28 19:18:08 +00:00
acinclude.m4 macos: add support for MacOS 10.12 2016-10-27 19:56:09 -04:00
CODING CODING: one-line if statements should not have braces 2016-09-11 18:45:00 -04:00
configure-libafs.ac Make OpenAFS 1.8.0pre1 2016-12-07 23:01:51 -05:00
configure.ac Make OpenAFS 1.8.0pre1 2016-12-07 23:01:51 -05:00
CONTRIBUTING openafs: add a contributor code of conduct 2015-09-18 20:38:28 -04:00
INSTALL Document minimum supported compiler versions 2016-08-03 11:13:48 -04:00
libafsdep Move build support files into build-tools 2010-07-14 20:40:36 -07:00
LICENSE readme: move the LICENSE file to the top level directory 2015-08-17 22:10:05 -04:00
Makefile-libafs.in Fix libafs_tree's cross-architecture support 2010-05-24 20:28:41 -07:00
Makefile.in macos: use pkgbuild to build the package on 10.10/10.11 2016-07-17 13:44:48 -04:00
NEWS Update NEWS for 1.8 2016-12-07 23:01:01 -05:00
NTMakefile build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
README Tweak grammar in README 2015-12-28 19:32:17 -05:00
README-WINDOWS Update windows build documentation 2013-07-02 15:14:09 -07:00
regen.sh regen.sh: Use libtoolize -i, and .gitignore generated build-tools 2016-11-06 00:36:18 -04:00

AFS is a distributed file system that enables users to share and
access all of the files stored in a network of computers as easily as
they access the files stored on their local machines. The file system is
called distributed for this exact reason: files can reside on many
different machines, but are available to users on every machine.

OpenAFS 1.0 was originally released by IBM under the terms of the
IBM Public License 1.0 (IPL10).  For details on IPL10 see the LICENSE
file in this directory.  The current OpenAFS distribution is licensed
under a combination of the IPL10 and many other licenses as granted by
the relevant copyright holders.  The LICENSE file in this directory
contains more details, thought it is not a comprehensive statement.

See INSTALL for information about building and installing OpenAFS
on various platforms.

See CODING for developer information and guidelines.

See NEWS for recent changes to OpenAFS.