No description
Find a file
Masahiro Yamada 339148f786 modpost: fix tee MODULE_DEVICE_TABLE built on big-endian host
[ Upstream commit 7f54e00e58 ]

When MODULE_DEVICE_TABLE(tee, ) is built on a host with a different
endianness from the target architecture, it results in an incorrect
MODULE_ALIAS().

For example, see a case where drivers/char/hw_random/optee-rng.c
is built as a module for ARM little-endian.

If you build it on a little-endian host, you will get the correct
MODULE_ALIAS:

    $ grep MODULE_ALIAS drivers/char/hw_random/optee-rng.mod.c
    MODULE_ALIAS("tee:ab7a617c-b8e7-4d8f-8301-d09b61036b64*");

However, if you build it on a big-endian host, you will get a wrong
MODULE_ALIAS:

    $ grep MODULE_ALIAS drivers/char/hw_random/optee-rng.mod.c
    MODULE_ALIAS("tee:646b0361-9bd0-0183-8f4d-e7b87c617aab*");

The same problem also occurs when you enable CONFIG_CPU_BIG_ENDIAN,
and build it on a little-endian host.

This issue has been unnoticed because the ARM kernel is configured for
little-endian by default, and most likely built on a little-endian host
(cross-build on x86 or native-build on ARM).

The uuid field must not be reversed because uuid_t is an array of __u8.

Fixes: 0fc1db9d10 ("tee: add bus driver framework for TEE based devices")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:12 +01:00
arch powerpc: Only define __parse_fpscr() when required 2023-11-20 11:52:12 +01:00
block blk-throttle: check for overflow in calculate_bytes_allowed 2023-11-02 09:35:29 +01:00
certs
crypto crypto: lrw,xts - Replace strlcpy with strscpy 2023-09-23 11:11:01 +02:00
Documentation dt-bindings: mfd: mt6397: Split out compatible for MediaTek MT6366 PMIC 2023-11-20 11:52:08 +01:00
drivers interconnect: qcom: sm8350: Set ACV enable_mask 2023-11-20 11:52:12 +01:00
fs f2fs: fix to initialize map.m_pblk in f2fs_precache_extents() 2023-11-20 11:52:10 +01:00
include filemap: add filemap_get_folios_tag() 2023-11-20 11:52:09 +01:00
init sched/psi: Select KERNFS as needed 2023-09-13 09:42:28 +02:00
io_uring io_uring/kbuf: Allow the full buffer id space for provided buffers 2023-11-20 11:52:00 +01:00
ipc
kernel livepatch: Fix missing newline character in klp_resolve_symbols() 2023-11-20 11:52:10 +01:00
lib kunit: Fix missed memory release in kunit_free_suite_set() 2023-11-20 11:52:02 +01:00
LICENSES
mm filemap: add filemap_get_folios_tag() 2023-11-20 11:52:09 +01:00
net ipv6: avoid atomic fragment on GSO packets 2023-11-20 11:51:55 +01:00
rust rust: allocator: Prevent mis-aligned allocation 2023-08-11 12:08:18 +02:00
samples fprobe: Pass entry_data to handlers 2023-10-25 12:03:12 +02:00
scripts modpost: fix tee MODULE_DEVICE_TABLE built on big-endian host 2023-11-20 11:52:12 +01:00
security apparmor: fix invalid reference on profile->disconnected 2023-11-20 11:52:09 +01:00
sound ASoC: ams-delta.c: use component after check 2023-11-20 11:52:08 +01:00
tools tools: iio: iio_generic_buffer ensure alignment 2023-11-20 11:52:10 +01:00
usr
virt kvm/vfio: ensure kvg instance stays around in kvm_vfio_group_add() 2023-09-13 09:42:46 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS devlink: move code to a dedicated directory 2023-08-30 16:11:00 +02:00
Makefile Linux 6.1.62 2023-11-08 14:11:05 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.