History log of /linux-master/arch/sparc/include/uapi/asm/stat.h
Revision Date Author Comments
# 3cbcff69 01-Jun-2022 Masahiro Yamada <masahiroy@kernel.org>

sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h

Commit 31a088b664d6 ("sparc: add asm/stat.h to UAPI compile-test
coverage") converted as follows:

uid_t --> __kernel_uid_t
gid_t --> __kernel_gid_t

It changed the field widths of struct stat because Sparc uses 16-bits for
___kernel_{uid,gid}_t as in arch/sparc/include/uapi/asm/posix_types.h.

The safe replacements across all architectures are:

uid_t --> __kernel_uid32_t
gid_t --> __kernel_gid32_t

as defined in include/linux/types.h.

A similar issue was reported for the android binder. [1]

[1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/

Fixes: 31a088b664d6 ("sparc: add asm/stat.h to UAPI compile-test coverage")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 31a088b6 04-Apr-2022 Masahiro Yamada <masahiroy@kernel.org>

sparc: add asm/stat.h to UAPI compile-test coverage

asm/stat.h is currently excluded from the UAPI compile-test for
ARCH=sparc because of the errors like follows:

In file included from <command-line>:
./usr/include/asm/stat.h:11:2: error: unknown type name 'ino_t'
11 | ino_t st_ino;
| ^~~~~
HDRTEST usr/include/asm/param.h
./usr/include/asm/stat.h:12:2: error: unknown type name 'mode_t'
12 | mode_t st_mode;
| ^~~~~~
./usr/include/asm/stat.h:14:2: error: unknown type name 'uid_t'
14 | uid_t st_uid;
| ^~~~~
./usr/include/asm/stat.h:15:2: error: unknown type name 'gid_t'
15 | gid_t st_gid;
| ^~~~~

The errors can be fixed by prefixing the types with __kernel_.

Then, remove the no-header-test entry from user/include/Makefile.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>


# 1bf883c1 05-Nov-2019 Arnd Bergmann <arnd@arndb.de>

y2038: stat: avoid 'time_t' in 'struct stat'

The time_t definition may differ between user space and kernel space,
so replace time_t with an unambiguous 'long' for the mips and sparc.

The same structures also contain 'off_t', which has the same problem,
so replace that as well on those two architectures and powerpc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>


# 6f52b16c 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

License cleanup: add SPDX license identifier to uapi header files with no license

Many user space API headers are missing licensing information, which
makes it hard for compliance tools to determine the correct license.

By default are files without license information under the default
license of the kernel, which is GPLV2. Marking them GPLV2 would exclude
them from being included in non GPLV2 code, which is obviously not
intended. The user space API headers fall under the syscall exception
which is in the kernels COPYING file:

NOTE! This copyright does *not* cover user programs that use kernel
services by normal system calls - this is merely considered normal use
of the kernel, and does *not* fall under the heading of "derived work".

otherwise syscall usage would not be possible.

Update the files which contain no license information with an SPDX
license identifier. The chosen identifier is 'GPL-2.0 WITH
Linux-syscall-note' which is the officially assigned identifier for the
Linux syscall exception. SPDX license identifiers are a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne. See the previous patch in this series for the
methodology of how this patch was researched.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9ef595d8 10-Mar-2016 Joe Perches <joe@perches.com>

sparc: Convert naked unsigned uses to unsigned int

Use the more normal kernel definition/declaration style.

Done via:

$ git ls-files arch/sparc | \
xargs ./scripts/checkpatch.pl -f --fix-inplace --types=unspecified_int

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 54579826 09-Oct-2012 David Howells <dhowells@redhat.com>

UAPI: (Scripted) Disintegrate arch/sparc/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>