Ben Huntsman a2ab598bae AIX: AFS_SMALLOCSIZ too small on newer OS releases
Addresses a situation where a write in AFS space can cause a kernel
panic.  In src/afs/afs_osi_uio.c in the function afsio_partialcopy:

    size_t space_len = sizeof(struct uio) +
                       sizeof(struct iovec) * AFS_MAXIOVCNT;

    /* Allocate a block that can contain both the UIO and the iovec */
    space = osi_AllocSmallSpace(space_len);

On newer AIX systems (since at least 6.1), space_len is larger than
AFS_SMALLOCSIZ.  When osi_AllocSmallSpace is called, the following
test in src/afs/afs_osi_alloc.c causes a kernel panic:

    if (size > AFS_SMALLOCSIZ)
        osi_Panic("osi_AllocSmallS: size=%d\n", (int)size);

This is due to the following definition in src/config/afs_args.h:

/*
 * Note that the AFS_*ALLOCSIZ values should be multiples of sizeof(void*) to
 * accomodate pointer alignment.
 */
/* Used in rx.c as well as afs directory. */
/* XXX Because of rxkad_cprivate... XXX */

All the supported AIX platforms define AFS_AIX32_ENV in
src/config/param.rs_aixXX.h, where XX is the AIX version.  Therefore,
all the AIX platforms end up with AFS_SMALLOCSIZ = 152 bytes instead
of 256.  To resolve this, we will modify the preprocessor test to use
the second case for AIX versions greater than 6.1.  This issue may be
present on earlier releases of AIX as well, but AIX 5.3 and older
test systems were not available at this time.

Also, a spelling error in the comment was fixed.

Reviewed-on: https://gerrit.openafs.org/15418
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 8a2d4faa73d0f2e03a4016d7f84c5d5437040cec)

Change-Id: I5a2fc4ad1a829f1ee30387da20ce477c84fa020f
Reviewed-on: https://gerrit.openafs.org/15424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ben Huntsman <ben@huntsmans.net>
Tested-by: Ben Huntsman <ben@huntsmans.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
2023-05-25 10:35:41 -04:00
2018-02-09 21:48:12 -05:00
2016-09-25 21:05:23 -04:00
2003-05-28 19:18:08 +00:00
2022-12-15 15:10:23 -05:00
2022-12-15 15:10:23 -05:00
2023-04-13 16:58:38 -04:00
2022-12-15 15:10:23 -05:00
2020-01-25 15:53:31 -05:00
2015-12-28 19:32:17 -05: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.

Description
No description provided
Readme Multiple Licenses 164 MiB
Languages
C 72.2%
C++ 20.1%
Makefile 1.4%
Perl 1.2%
Rich Text Format 1%
Other 3.7%