Commit Graph

7883 Commits

Author SHA1 Message Date
Bruce Ashfield
a05382452c This is the 6.6.94 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhUEMcACgkQONu9yGCS
 aT75FBAAwHcFDbYcu9KnmDUiHkBpaw0ajUvl4hh8ps1b9XixMYzAoTwGsvVIXQdn
 hLB57s0kOtFL8168UwXBdplACvkvXnVN0xif7TtVRUyWea1fHK7r0rQ1I1NPciqD
 qzlsBOVoKdZ4yaQRivBDXOIRmzItdNCv04z32GtrQCJHBu6O53pQzuNUuc3izYeE
 AgxhtgQWClrA5sAPjcq9T2yCQH0WmS0LeTAIRGzT1X+JHts3iMhZLw2KdfD7p3td
 pJMATuwQXH757QRmhe2sTgQXbEbVnHaPsxiTwzOrJJMdueNuUzQkgA4uzT6JvGCw
 QdoGJep8fnMsWA4qATHBem5Lu8OTMd/ZP6Lugh6HXxVXlWgdefSFQFnExqjqbNMi
 LEVWkyhRy22C5FN/rJltxh+cvlXYlztQaMdEyixQqwKz1tjWIv+3/qkIEt/b+zQx
 9Bt54G48+e+EIYqrv1rCpht/F3v9ScBvqllSMCx1pgPdT6FYhv/Mu0SE3VsuVosT
 0bMbeIyu9McYKCRL+PoKrVL5iXfuC8mXK1E/CILtwux7r7lVlkj5+fO8yyXvhrSd
 qjaqePiAIu8XWWc1vy8OW9XqGeVqwxyxz4YJCI8jOK1gSPZtWhH0RA/Qo2rXdPFU
 iv/W/AIRcyNpK1+0ep6H7UrT4VQ3rTGQN3NV5GJlW+sOiA8+VUI=
 =19eQ
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.94' into v6.6/standard/base

This is the 6.6.94 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhUEMcACgkQONu9yGCS
# aT75FBAAwHcFDbYcu9KnmDUiHkBpaw0ajUvl4hh8ps1b9XixMYzAoTwGsvVIXQdn
# hLB57s0kOtFL8168UwXBdplACvkvXnVN0xif7TtVRUyWea1fHK7r0rQ1I1NPciqD
# qzlsBOVoKdZ4yaQRivBDXOIRmzItdNCv04z32GtrQCJHBu6O53pQzuNUuc3izYeE
# AgxhtgQWClrA5sAPjcq9T2yCQH0WmS0LeTAIRGzT1X+JHts3iMhZLw2KdfD7p3td
# pJMATuwQXH757QRmhe2sTgQXbEbVnHaPsxiTwzOrJJMdueNuUzQkgA4uzT6JvGCw
# QdoGJep8fnMsWA4qATHBem5Lu8OTMd/ZP6Lugh6HXxVXlWgdefSFQFnExqjqbNMi
# LEVWkyhRy22C5FN/rJltxh+cvlXYlztQaMdEyixQqwKz1tjWIv+3/qkIEt/b+zQx
# 9Bt54G48+e+EIYqrv1rCpht/F3v9ScBvqllSMCx1pgPdT6FYhv/Mu0SE3VsuVosT
# 0bMbeIyu9McYKCRL+PoKrVL5iXfuC8mXK1E/CILtwux7r7lVlkj5+fO8yyXvhrSd
# qjaqePiAIu8XWWc1vy8OW9XqGeVqwxyxz4YJCI8jOK1gSPZtWhH0RA/Qo2rXdPFU
# iv/W/AIRcyNpK1+0ep6H7UrT4VQ3rTGQN3NV5GJlW+sOiA8+VUI=
# =19eQ
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 19 Jun 2025 09:29:43 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-06-25 17:33:50 -04:00
Nathan Chancellor
b0630d1845 kbuild: Disable -Wdefault-const-init-unsafe
commit d0afcfeb9e3810ec89d1ffde1a0e36621bb75dca upstream.

A new on by default warning in clang [1] aims to flags instances where
const variables without static or thread local storage or const members
in aggregate types are not initialized because it can lead to an
indeterminate value. This is quite noisy for the kernel due to
instances originating from header files such as:

  drivers/gpu/drm/i915/gt/intel_ring.h:62:2: error: default initialization of an object of type 'typeof (ring->size)' (aka 'const unsigned int') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
     62 |         typecheck(typeof(ring->size), next);
        |         ^
  include/linux/typecheck.h:10:9: note: expanded from macro 'typecheck'
     10 | ({      type __dummy; \
        |              ^

  include/net/ip.h:478:14: error: default initialization of an object of type 'typeof (rt->dst.expires)' (aka 'const unsigned long') leaves the object uninitialized [-Werror,-Wdefault-const-init-var-unsafe]
    478 |                 if (mtu && time_before(jiffies, rt->dst.expires))
        |                            ^
  include/linux/jiffies.h:138:26: note: expanded from macro 'time_before'
    138 | #define time_before(a,b)        time_after(b,a)
        |                                 ^
  include/linux/jiffies.h:128:3: note: expanded from macro 'time_after'
    128 |         (typecheck(unsigned long, a) && \
        |          ^
  include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
     11 |         typeof(x) __dummy2; \
        |                   ^

  include/linux/list.h:409:27: warning: default initialization of an object of type 'union (unnamed union at include/linux/list.h:409:27)' with const member leaves the object uninitialized [-Wdefault-const-init-field-unsafe]
    409 |         struct list_head *next = smp_load_acquire(&head->next);
        |                                  ^
  include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
    176 | #define smp_load_acquire(p) __smp_load_acquire(p)
        |                             ^
  arch/arm64/include/asm/barrier.h:164:59: note: expanded from macro '__smp_load_acquire'
    164 |         union { __unqual_scalar_typeof(*p) __val; char __c[1]; } __u;   \
        |                                                                  ^
  include/linux/list.h:409:27: note: member '__val' declared 'const' here

  crypto/scatterwalk.c:66:22: error: default initialization of an object of type 'struct scatter_walk' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
     66 |         struct scatter_walk walk;
        |                             ^
  include/crypto/algapi.h:112:15: note: member 'addr' declared 'const' here
    112 |                 void *const addr;
        |                             ^

  fs/hugetlbfs/inode.c:733:24: error: default initialization of an object of type 'struct vm_area_struct' with const member leaves the object uninitialized [-Werror,-Wdefault-const-init-field-unsafe]
    733 |         struct vm_area_struct pseudo_vma;
        |                               ^
  include/linux/mm_types.h:803:20: note: member 'vm_flags' declared 'const' here
    803 |                 const vm_flags_t vm_flags;
        |                                  ^

Silencing the instances from typecheck.h is difficult because '= {}' is
not available in older but supported compilers and '= {0}' would cause
warnings about a literal 0 being treated as NULL. While it might be
possible to come up with a local hack to silence the warning for
clang-21+, it may not be worth it since -Wuninitialized will still
trigger if an uninitialized const variable is actually used.

In all audited cases of the "field" variant of the warning, the members
are either not used in the particular call path, modified through other
means such as memset() / memcpy() because the containing object is not
const, or are within a union with other non-const members.

Since this warning does not appear to have a high signal to noise ratio,
just disable it.

Cc: stable@vger.kernel.org
Link: 576161cb60 [1]
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/CA+G9fYuNjKcxFKS_MKPRuga32XbndkLGcY-PVuoSwzv6VWbY=w@mail.gmail.com/
Reported-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2088
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-19 15:28:45 +02:00
Kees Cook
655d3c6f8c randstruct: gcc-plugin: Fix attribute addition
[ Upstream commit f39f18f3c3531aa802b58a20d39d96e82eb96c14 ]

Based on changes in the 2021 public version of the randstruct
out-of-tree GCC plugin[1], more carefully update the attributes on
resulting decls, to avoid tripping checks in GCC 15's
comptypes_check_enum_int() when it has been configured with
"--enable-checking=misc":

arch/arm64/kernel/kexec_image.c:132:14: internal compiler error: in comptypes_check_enum_int, at c/c-typeck.cc:1519
  132 | const struct kexec_file_ops kexec_image_ops = {
      |              ^~~~~~~~~~~~~~
 internal_error(char const*, ...), at gcc/gcc/diagnostic-global-context.cc:517
 fancy_abort(char const*, int, char const*), at gcc/gcc/diagnostic.cc:1803
 comptypes_check_enum_int(tree_node*, tree_node*, bool*), at gcc/gcc/c/c-typeck.cc:1519
 ...

Link: https://archive.org/download/grsecurity/grsecurity-3.1-5.10.41-202105280954.patch.gz [1]
Reported-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Closes: https://github.com/KSPP/linux/issues/367
Closes: https://lore.kernel.org/lkml/20250530000646.104457-1-thiago.bauermann@linaro.org/
Reported-by: Ingo Saitz <ingo@hannover.ccc.de>
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104745
Fixes: 313dd1b629 ("gcc-plugins: Add the randstruct plugin")
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Link: https://lore.kernel.org/r/20250530221824.work.623-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:28:25 +02:00
Kees Cook
c64a16344c randstruct: gcc-plugin: Remove bogus void member
[ Upstream commit e136a4062174a9a8d1c1447ca040ea81accfa6a8 ]

When building the randomized replacement tree of struct members, the
randstruct GCC plugin would insert, as the first member, a 0-sized void
member. This appears as though it was done to catch non-designated
("unnamed") static initializers, which wouldn't be stable since they
depend on the original struct layout order.

This was accomplished by having the side-effect of the "void member"
tripping an assert in GCC internals (count_type_elements) if the member
list ever needed to be counted (e.g. for figuring out the order of members
during a non-designated initialization), which would catch impossible type
(void) in the struct:

security/landlock/fs.c: In function ‘hook_file_ioctl_common’:
security/landlock/fs.c:1745:61: internal compiler error: in count_type_elements, at expr.cc:7075
 1745 |                         .u.op = &(struct lsm_ioctlop_audit) {
      |                                                             ^

static HOST_WIDE_INT
count_type_elements (const_tree type, bool for_ctor_p)
{
  switch (TREE_CODE (type))
...
    case VOID_TYPE:
    default:
      gcc_unreachable ();
    }
}

However this is a redundant safety measure since randstruct uses the
__designated_initializer attribute both internally and within the
__randomized_layout attribute macro so that this would be enforced
by the compiler directly even when randstruct was not enabled (via
-Wdesignated-init).

A recent change in Landlock ended up tripping the same member counting
routine when using a full-struct copy initializer as part of an anonymous
initializer. This, however, is a false positive as the initializer is
copying between identical structs (and hence identical layouts). The
"path" member is "struct path", a randomized struct, and is being copied
to from another "struct path", the "f_path" member:

        landlock_log_denial(landlock_cred(file->f_cred), &(struct landlock_request) {
                .type = LANDLOCK_REQUEST_FS_ACCESS,
                .audit = {
                        .type = LSM_AUDIT_DATA_IOCTL_OP,
                        .u.op = &(struct lsm_ioctlop_audit) {
                                .path = file->f_path,
                                .cmd = cmd,
                        },
                },
	...

As can be seen with the coming randstruct KUnit test, there appears to
be no behavioral problems with this kind of initialization when the void
member is removed from the randstruct GCC plugin, so remove it.

Reported-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Closes: https://lore.kernel.org/lkml/Z_PRaKx7q70MKgCA@gallifrey/
Reported-by: Mark Brown <broonie@kernel.org>
Closes: https://lore.kernel.org/lkml/20250407-kbuild-disable-gcc-plugins-v1-1-5d46ae583f5e@kernel.org/
Reported-by: WangYuli <wangyuli@uniontech.com>
Closes: https://lore.kernel.org/lkml/337D5D4887277B27+3c677db3-a8b9-47f0-93a4-7809355f1381@uniontech.com/
Fixes: 313dd1b629 ("gcc-plugins: Add the randstruct plugin")
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:28:25 +02:00
Bruce Ashfield
dbc2820565 This is the 6.6.93 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhAPzsACgkQONu9yGCS
 aT6KiRAAmIFMQ4HtiUZLJEF9r2rn/J+swHSF+a137JEYe4EKnNgPtKYkMAi8OZN1
 x1OT+CKRP6mQpMD044tXp/Fxoq7AF2zJXa962AfeQID7SrNgIwm6U7KFtGVo4ERs
 y1XU011QbjcY8twOYzmZQviIGKD3oOoj4vxO4h6R9t+ZBzSCzfYEd+6yq/tvMb7M
 vjdc7PCAVt9w9ytXLOYDHVwGJ3dMK92h7OTOaKHxf9XGGcIbvdkqqypqV6wuKjh2
 YGsZYivp+GQWAWnoVsX5Q8o77TZ8cwnZLEos8v55HzZ/eFBlQgkzaIfW//QwXXyM
 czlv7YadC0D7mWptJ16niIJHdxsODhbtvdZHC/zQ4/kc9WnizKjoBHJsbe6zlyFf
 fDGs7HgzSYAMbktoilbhb5m1bb4HjyyUwUC8KujlYTFgo7GscQAYt5eSDa40AfKy
 cG4jOOhNkt9nSGtI7YggwEH8rFf1O2tWnheXPyVL5b0RRVNeSD1y+mypShI7fLUj
 nkQbgWZwtlhibjw/dUyIN986Mbp7YoHmRVFc0b6NpZG6Kokjl3QSwffEUlMf4iPP
 wLiqkEOPWZ56YL9JbNb+q9SNY/MDL/CaTnQJv7XAjjJ0D69ct7ecbfxTre7LyMFd
 Rg+6wrzx1nsj4ObXcmiI1O0bN3GTJWqPyM6UaoL/0dPUtVxocIo=
 =0aL2
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.93' into v6.6/standard/base

This is the 6.6.93 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmhAPzsACgkQONu9yGCS
# aT6KiRAAmIFMQ4HtiUZLJEF9r2rn/J+swHSF+a137JEYe4EKnNgPtKYkMAi8OZN1
# x1OT+CKRP6mQpMD044tXp/Fxoq7AF2zJXa962AfeQID7SrNgIwm6U7KFtGVo4ERs
# y1XU011QbjcY8twOYzmZQviIGKD3oOoj4vxO4h6R9t+ZBzSCzfYEd+6yq/tvMb7M
# vjdc7PCAVt9w9ytXLOYDHVwGJ3dMK92h7OTOaKHxf9XGGcIbvdkqqypqV6wuKjh2
# YGsZYivp+GQWAWnoVsX5Q8o77TZ8cwnZLEos8v55HzZ/eFBlQgkzaIfW//QwXXyM
# czlv7YadC0D7mWptJ16niIJHdxsODhbtvdZHC/zQ4/kc9WnizKjoBHJsbe6zlyFf
# fDGs7HgzSYAMbktoilbhb5m1bb4HjyyUwUC8KujlYTFgo7GscQAYt5eSDa40AfKy
# cG4jOOhNkt9nSGtI7YggwEH8rFf1O2tWnheXPyVL5b0RRVNeSD1y+mypShI7fLUj
# nkQbgWZwtlhibjw/dUyIN986Mbp7YoHmRVFc0b6NpZG6Kokjl3QSwffEUlMf4iPP
# wLiqkEOPWZ56YL9JbNb+q9SNY/MDL/CaTnQJv7XAjjJ0D69ct7ecbfxTre7LyMFd
# Rg+6wrzx1nsj4ObXcmiI1O0bN3GTJWqPyM6UaoL/0dPUtVxocIo=
# =0aL2
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 04 Jun 2025 08:42:35 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-06-06 10:24:55 -04:00
Seyediman Seyedarab
3edb08b6c2 kbuild: fix argument parsing in scripts/config
[ Upstream commit f757f6011c92b5a01db742c39149bed9e526478f ]

The script previously assumed --file was always the first argument,
which caused issues when it appeared later. This patch updates the
parsing logic to scan all arguments to find --file, sets the config
file correctly, and resets the argument list with the remaining
commands.

It also fixes --refresh to respect --file by passing KCONFIG_CONFIG=$FN
to make oldconfig.

Signed-off-by: Seyediman Seyedarab <imandevel@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:41:58 +02:00
Daniel Gomez
a6f24a41ef kconfig: merge_config: use an empty file as initfile
[ Upstream commit a26fe287eed112b4e21e854f173c8918a6a8596d ]

The scripts/kconfig/merge_config.sh script requires an existing
$INITFILE (or the $1 argument) as a base file for merging Kconfig
fragments. However, an empty $INITFILE can serve as an initial starting
point, later referenced by the KCONFIG_ALLCONFIG Makefile variable
if -m is not used. This variable can point to any configuration file
containing preset config symbols (the merged output) as stated in
Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will
contain just the merge output requiring the user to run make (i.e.
KCONFIG_ALLCONFIG=<$INITFILE> make <allnoconfig/alldefconfig> or make
olddefconfig).

Instead of failing when `$INITFILE` is missing, create an empty file and
use it as the starting point for merges.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:41:53 +02:00
Bruce Ashfield
26ad3d3b17 This is the 6.6.89 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgUXsEACgkQONu9yGCS
 aT6/cA//Q0kwvXRkxVZzT1EO5jgC5hd84aheArdZ9zAz28EQ9tGL3Afchx7GpbGs
 DkmXAYKlRuBQJlO74ihDzpbgjSKMLKuPiH2FJF+8P5I3PPc0FLxQSPI2bDK7/oOE
 5KnSXSW2sY8r63f6ZjeBFt3ubBa+SuNHTG1VAmSr3zGzKDttChgkt4cQFw7VAFH+
 zgyQ/f9JVy6SZW+J7dHki48fuPbSlC+1xEocD1pBDGLG2IMUmSziCood9/E+wPPD
 i9CbfeBIVm0VHcb7C8KVj+hNuuQ7XF4Zq3oLhKME1boXf0E4sHDoLRRh25RPJg1j
 mZyOyyWyc2BfwXD/4ZyLgKIzgUMWQKDXh+7bQIqEgRAr2L7/siUUSSP4b5puA5TL
 BguHsPuBnAbqzAPHgXxg5X938gvvaiok0Z36QorfKx2/9hiygI6rZTGsoQ+7u8+H
 8hpx8b58X1sysdi2yKFCfGAp1XxXy3FA/1EAJwNNFoy/FGB4Ucp5ezunuo8EkQjA
 gB3H2iywB8sSpMzbx2cDzZXH4ANvo1M8vMn/FnSpgkc1wa3P+pO4/ptShI4NU1xn
 tnj29ycd/44+FHqO/8CaRCjAyv+VS/nTuauIOo89qQuV3D4Ht8O9bzA9Mbo0Z+fg
 LuUFexDkq10mtpHiCqw5SmCmZJAdiO2r1hMVTolVlEUwYUB4YpM=
 =a9Qr
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.89' into v6.6/standard/base

This is the 6.6.89 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgUXsEACgkQONu9yGCS
# aT6/cA//Q0kwvXRkxVZzT1EO5jgC5hd84aheArdZ9zAz28EQ9tGL3Afchx7GpbGs
# DkmXAYKlRuBQJlO74ihDzpbgjSKMLKuPiH2FJF+8P5I3PPc0FLxQSPI2bDK7/oOE
# 5KnSXSW2sY8r63f6ZjeBFt3ubBa+SuNHTG1VAmSr3zGzKDttChgkt4cQFw7VAFH+
# zgyQ/f9JVy6SZW+J7dHki48fuPbSlC+1xEocD1pBDGLG2IMUmSziCood9/E+wPPD
# i9CbfeBIVm0VHcb7C8KVj+hNuuQ7XF4Zq3oLhKME1boXf0E4sHDoLRRh25RPJg1j
# mZyOyyWyc2BfwXD/4ZyLgKIzgUMWQKDXh+7bQIqEgRAr2L7/siUUSSP4b5puA5TL
# BguHsPuBnAbqzAPHgXxg5X938gvvaiok0Z36QorfKx2/9hiygI6rZTGsoQ+7u8+H
# 8hpx8b58X1sysdi2yKFCfGAp1XxXy3FA/1EAJwNNFoy/FGB4Ucp5ezunuo8EkQjA
# gB3H2iywB8sSpMzbx2cDzZXH4ANvo1M8vMn/FnSpgkc1wa3P+pO4/ptShI4NU1xn
# tnj29ycd/44+FHqO/8CaRCjAyv+VS/nTuauIOo89qQuV3D4Ht8O9bzA9Mbo0Z+fg
# LuUFexDkq10mtpHiCqw5SmCmZJAdiO2r1hMVTolVlEUwYUB4YpM=
# =a9Qr
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 02 May 2025 01:57:21 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-06 10:49:40 -04:00
Josh Poimboeuf
20bab4eb1c objtool: Silence more KCOV warnings, part 2
commit 55c78035a1a8dfb05f1472018ce2a651701adb7d upstream.

Similar to GCOV, KCOV can leave behind dead code and undefined behavior.
Warnings related to those should be ignored.

The previous commit:

  6b023c784204 ("objtool: Silence more KCOV warnings")

... only did so for CONFIG_CGOV_KERNEL.  Also do it for CONFIG_KCOV, but
for real this time.

Fixes the following warning:

  vmlinux.o: warning: objtool: synaptics_report_mt_data: unexpected end of section .text.synaptics_report_mt_data

Fixes: 6b023c784204 ("objtool: Silence more KCOV warnings")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/a44ba16e194bcbc52c1cef3d3cd9051a62622723.1743481539.git.jpoimboe@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202503282236.UhfRsF3B-lkp@intel.com/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-02 07:51:04 +02:00
Bruce Ashfield
358824da80 This is the 6.6.88 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgLS+0ACgkQONu9yGCS
 aT5GJQ/+JU0J6HlJ3KaE/fmJpjqAozEzmkRdojDKeEoyNk4OzgCeuggCf47Lyxqy
 +fjNUSIy/6zNjkrwoAf474U5KKVADNulFi51UmUUDr33/NJwiO2BhbHnAeu2cj8X
 LmTkJOZQbewIwRHBMOGi8jPIj7RAiwCXoucmF7/gqZawUpIs0/62fmi8BwsnRDGz
 MXqUNcPGkGud7JL25ox8UAd0e0rTutC5put2srFCHIjXiV+jN2JlBTZmbrSEkJKb
 PNRTMkRkiPo9t/9Z6n7OpPbiRKhy25HvYru5lEgWRROPzoU5pETqcBl9ZU4b2wQa
 e/geiLQFEC5yXl7cYV2kvDKu7zHCukmZOzgdGHr9SDChayGWP675+xN3fl7ORkWb
 F5jNutxGNgAbPbYo7Y1IMAa1Iob1rQRKwIdumNxGakzDfnNGXkBIbkAvk7O+fRcH
 74R/WE23QG0Un5eVvD1dvauv5O6s+3A8sgwpNYX/PuwBEmnhjdA1h+4Bza9TOLk4
 Qpu5s7YFKtYz4sLXaN7B83IMlhwwH/ZwZ04KDnwcMZuUHQV6GxtGrh5wXUZyWfBZ
 tBCMMfxcLVRVE3HcH0AL8e3AMq8Rj+0qqDOCfI43MRqFGuBRrYG+9OXB8ePl3UKS
 oPJy38r0PNTMRw863sft/zxEymglQjtrR2LfhmzzztAZ/WuptMU=
 =jyNe
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.88' into v6.6/standard/base

This is the 6.6.88 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmgLS+0ACgkQONu9yGCS
# aT5GJQ/+JU0J6HlJ3KaE/fmJpjqAozEzmkRdojDKeEoyNk4OzgCeuggCf47Lyxqy
# +fjNUSIy/6zNjkrwoAf474U5KKVADNulFi51UmUUDr33/NJwiO2BhbHnAeu2cj8X
# LmTkJOZQbewIwRHBMOGi8jPIj7RAiwCXoucmF7/gqZawUpIs0/62fmi8BwsnRDGz
# MXqUNcPGkGud7JL25ox8UAd0e0rTutC5put2srFCHIjXiV+jN2JlBTZmbrSEkJKb
# PNRTMkRkiPo9t/9Z6n7OpPbiRKhy25HvYru5lEgWRROPzoU5pETqcBl9ZU4b2wQa
# e/geiLQFEC5yXl7cYV2kvDKu7zHCukmZOzgdGHr9SDChayGWP675+xN3fl7ORkWb
# F5jNutxGNgAbPbYo7Y1IMAa1Iob1rQRKwIdumNxGakzDfnNGXkBIbkAvk7O+fRcH
# 74R/WE23QG0Un5eVvD1dvauv5O6s+3A8sgwpNYX/PuwBEmnhjdA1h+4Bza9TOLk4
# Qpu5s7YFKtYz4sLXaN7B83IMlhwwH/ZwZ04KDnwcMZuUHQV6GxtGrh5wXUZyWfBZ
# tBCMMfxcLVRVE3HcH0AL8e3AMq8Rj+0qqDOCfI43MRqFGuBRrYG+9OXB8ePl3UKS
# oPJy38r0PNTMRw863sft/zxEymglQjtrR2LfhmzzztAZ/WuptMU=
# =jyNe
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 25 Apr 2025 04:46:37 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-05-01 22:32:26 -04:00
Jan Stancek
2eb70f54ad sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3
commit 558bdc45df upstream.

ENGINE API has been deprecated since OpenSSL version 3.0 [1].
Distros have started dropping support from headers and in future
it will likely disappear also from library.

It has been superseded by the PROVIDER API, so use it instead
for OPENSSL MAJOR >= 3.

[1] https://github.com/openssl/openssl/blob/master/README-ENGINES.md

[jarkko: fixed up alignment issues reported by checkpatch.pl --strict]

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:45:58 +02:00
Jan Stancek
f8dafdafdd sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
commit 467d60eddf upstream.

ERR_get_error_line() is deprecated since OpenSSL 3.0.

Use ERR_peek_error_line() instead, and combine display_openssl_errors()
and drain_openssl_errors() to a single function where parameter decides
if it should consume errors silently.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:45:58 +02:00
Jan Stancek
1e2d849efc sign-file,extract-cert: move common SSL helper functions to a header
commit 300e6d4116 upstream.

Couple error handling helpers are repeated in both tools, so
move them to a common header.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-25 10:45:57 +02:00
Bruce Ashfield
c2cf29e216 This is the 6.6.87 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmf3u68ACgkQONu9yGCS
 aT5zLhAAuAIUwHVswG7JD5srS2FUxZ7CZvICembX0aJVL7ZR1P8OaCWRCiofHw++
 bxb0TOI7dHyf7hNbr9cF6h5bCUAWQwJyhyTS18bQZSLgm5KVpzph2I68wXyn1lio
 IDvS95pnV2wlUFf5cwBOIGKH5iLbV4bzmDFPovy3XXiKTO5h/pW52y92wYpy4L84
 XndqbYR7XTKDXH3TcSQ9Aom4MBDQ8zju4IBAwY4OmYn3DlNkA9vznROqTh1MkAhs
 /+7iHWhGd8Qd/VJUx7g0ejCKE0GvqKRw9SYkgk4k6ZEsBV63j0ZED6mOeSoMa+95
 eCgDxgl3I1PUzvQx5nrmNi86daZR1NJKXnDJ3EgLdxYvgBlt9+fZBJ3NJyNgXbVG
 Wm1ylBj303nhXkm24ZCZEIvDKwGGPYWc1r5O4t10TTVbnb0mfAomLC7hzn2x5Jer
 uc8p0sQhDD5RRCV0MHwEDWcIVlgiTO+GrxhTvP6yItm+8Z0p7XM8db2DxjASUnrt
 UkI4KQJLEIWTRA4RUwEDylYfxVJKPtlJ1KXVLE5qtNlKQuJeTNBWO8rG31/JyuBl
 l7Fkp15gP7PHbOy43Xlw4Il3dfVpMMEkktDvKYRX2Wt1XV8benlUt7fl4don4g/k
 f/O1NsanM9zN2Y+ZQ4J2rmSL5i/QC5fx/XkF9zrVfPGxFjVULfo=
 =rFzj
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.87' into v6.6/standard/base

This is the 6.6.87 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmf3u68ACgkQONu9yGCS
# aT5zLhAAuAIUwHVswG7JD5srS2FUxZ7CZvICembX0aJVL7ZR1P8OaCWRCiofHw++
# bxb0TOI7dHyf7hNbr9cF6h5bCUAWQwJyhyTS18bQZSLgm5KVpzph2I68wXyn1lio
# IDvS95pnV2wlUFf5cwBOIGKH5iLbV4bzmDFPovy3XXiKTO5h/pW52y92wYpy4L84
# XndqbYR7XTKDXH3TcSQ9Aom4MBDQ8zju4IBAwY4OmYn3DlNkA9vznROqTh1MkAhs
# /+7iHWhGd8Qd/VJUx7g0ejCKE0GvqKRw9SYkgk4k6ZEsBV63j0ZED6mOeSoMa+95
# eCgDxgl3I1PUzvQx5nrmNi86daZR1NJKXnDJ3EgLdxYvgBlt9+fZBJ3NJyNgXbVG
# Wm1ylBj303nhXkm24ZCZEIvDKwGGPYWc1r5O4t10TTVbnb0mfAomLC7hzn2x5Jer
# uc8p0sQhDD5RRCV0MHwEDWcIVlgiTO+GrxhTvP6yItm+8Z0p7XM8db2DxjASUnrt
# UkI4KQJLEIWTRA4RUwEDylYfxVJKPtlJ1KXVLE5qtNlKQuJeTNBWO8rG31/JyuBl
# l7Fkp15gP7PHbOy43Xlw4Il3dfVpMMEkktDvKYRX2Wt1XV8benlUt7fl4don4g/k
# f/O1NsanM9zN2Y+ZQ4J2rmSL5i/QC5fx/XkF9zrVfPGxFjVULfo=
# =rFzj
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 10 Apr 2025 08:38:07 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-04-13 23:19:39 -04:00
Tim Schumacher
06ca76e7e3 selinux: Chain up tool resolving errors in install_policy.sh
[ Upstream commit 6ae0042f4d3f331e841495eb0a3d51598e593ec2 ]

Subshell evaluations are not exempt from errexit, so if a command is
not available, `which` will fail and exit the script as a whole.
This causes the helpful error messages to not be printed if they are
tacked on using a `$?` comparison.

Resolve the issue by using chains of logical operators, which are not
subject to the effects of errexit.

Fixes: e37c1877ba ("scripts/selinux: modernize mdp")
Signed-off-by: Tim Schumacher <tim.schumacher1@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:37:26 +02:00
Bruce Ashfield
8dd317512c This is the 6.6.84 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmffFS0ACgkQONu9yGCS
 aT53cw/+ND0RyKjVr11YxrMGR7mtAUVMUzE4bcJWGgl7M/BF+2bTWcic5n648P9O
 y/hr24jUDpK8kVRvsxlScyPX59drz9f+wDu1nC3oGTFRu2Cs4SG2KGAJoXt0NWLc
 oWZ4PskH9YxCK1bjHqSOgVC1+mUqrCASgp7bS1Y4Xd6mUPVN5A3nkq4AUaAq5NJP
 3VNLKJLNEgusjFxZKYQX4f7I6f5PPYaEONxXje+mGYduGOjV7kePa6cyzZDWxger
 ZKLyvG/FIDDIIi6wd0x0aOTR2318HfDkz4xfNaw58II61XukSRrZ1PoO+4Jo6l26
 aAbY4Cdv0QhCvmI4AqRGZcSTrNFZoroAwHbUjzjkX5DEMF0UoqqKJb8QFQB/HtC5
 fKzXMyRcztB2kFldOQgZszHzHzwkzvJuSIQgBNYkQ6Kj2yvnydsDUKSJJIY4NNz/
 Ii3q4lflFAYmJUNfzM7lofMXAAiwXKumnTsUZ1AYbWKfciJveX+QO2mqFmDM0Vdr
 PdyoO5X7iZkDF0B+GKScUryStI3mBnqCk6XVBIsN+ucobus2EdDVxCsNObEel7v9
 nNRqU16+0OhWP9MNyg6sL64Kwb1VrNoUOaspL7cn01v+Iw18i3qiXblNdwpWHvO3
 Y0HNwdPIltaPj5qubkAoS6L2DFNzfa7oVgFZafNbLq80YWeQqPQ=
 =i2jc
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.84' into v6.6/standard/base

This is the 6.6.84 stable release

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmffFS0ACgkQONu9yGCS
# aT53cw/+ND0RyKjVr11YxrMGR7mtAUVMUzE4bcJWGgl7M/BF+2bTWcic5n648P9O
# y/hr24jUDpK8kVRvsxlScyPX59drz9f+wDu1nC3oGTFRu2Cs4SG2KGAJoXt0NWLc
# oWZ4PskH9YxCK1bjHqSOgVC1+mUqrCASgp7bS1Y4Xd6mUPVN5A3nkq4AUaAq5NJP
# 3VNLKJLNEgusjFxZKYQX4f7I6f5PPYaEONxXje+mGYduGOjV7kePa6cyzZDWxger
# ZKLyvG/FIDDIIi6wd0x0aOTR2318HfDkz4xfNaw58II61XukSRrZ1PoO+4Jo6l26
# aAbY4Cdv0QhCvmI4AqRGZcSTrNFZoroAwHbUjzjkX5DEMF0UoqqKJb8QFQB/HtC5
# fKzXMyRcztB2kFldOQgZszHzHzwkzvJuSIQgBNYkQ6Kj2yvnydsDUKSJJIY4NNz/
# Ii3q4lflFAYmJUNfzM7lofMXAAiwXKumnTsUZ1AYbWKfciJveX+QO2mqFmDM0Vdr
# PdyoO5X7iZkDF0B+GKScUryStI3mBnqCk6XVBIsN+ucobus2EdDVxCsNObEel7v9
# nNRqU16+0OhWP9MNyg6sL64Kwb1VrNoUOaspL7cn01v+Iw18i3qiXblNdwpWHvO3
# Y0HNwdPIltaPj5qubkAoS6L2DFNzfa7oVgFZafNbLq80YWeQqPQ=
# =i2jc
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 22 Mar 2025 03:53:17 PM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key

# Conflicts:
#	mm/mmap.c
2025-03-25 14:25:39 -04:00
Tamir Duberstein
d3f9fdc298 scripts: generate_rust_analyzer: add missing macros deps
[ Upstream commit 2e0f91aba507a3cb59f7a12fc3ea2b7d4d6675b7 ]

The macros crate has depended on std and proc_macro since its
introduction in commit 1fbde52bde ("rust: add `macros` crate"). These
dependencies were omitted from commit 8c4555ccc5 ("scripts: add
`generate_rust_analyzer.py`") resulting in missing go-to-definition and
autocomplete, and false-positive warnings emitted from rust-analyzer
such as:

  [{
  	"resource": "/Users/tamird/src/linux/rust/macros/module.rs",
  	"owner": "_generated_diagnostic_collection_name_#1",
  	"code": {
  		"value": "non_snake_case",
  		"target": {
  			"$mid": 1,
  			"path": "/rustc/",
  			"scheme": "https",
  			"authority": "doc.rust-lang.org",
  			"query": "search=non_snake_case"
  		}
  	},
  	"severity": 4,
  	"message": "Variable `None` should have snake_case name, e.g. `none`",
  	"source": "rust-analyzer",
  	"startLineNumber": 123,
  	"startColumn": 17,
  	"endLineNumber": 123,
  	"endColumn": 21
  }]

Add the missing dependencies to improve the developer experience.

  [ Fiona had a different approach (thanks!) at:

        https://lore.kernel.org/rust-for-linux/20241205115438.234221-1-me@kloenk.dev/

    But Tamir and Fiona agreed to this one. - Miguel ]

Fixes: 8c4555ccc5 ("scripts: add `generate_rust_analyzer.py`")
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Diagnosed-by: Chayim Refael Friedman <chayimfr@gmail.com>
Link: https://github.com/rust-lang/rust-analyzer/issues/17759#issuecomment-2646328275
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250210-rust-analyzer-macros-core-dep-v3-1-45eb4836f218@gmail.com
[ Removed `return`. Changed tag name. Added Link. Slightly
  reworded. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-03-22 12:50:48 -07:00
Bruce Ashfield
bff737d93e This is the 6.6.78 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmey9hUACgkQONu9yGCS
 aT7Ecw//Ts3+DVyM1iMAUj6zZHQ7+UVqRxvVQ0yJwe1gzECrasxhu+ack0MDuRXb
 RTOHzrVkpHrOZ58T0kkkp4DVea4bq8kpq9wnnOxpta4SzQYuwxuypxw9ZML2u8kR
 A77akcb4MPBpeTwlLUTEX1K2CrF+Wfz9ZGauJRTmrnWogJe1hZWTxr3tc9TqGeMA
 tk93g9kWy7hxxubPJpAUbNVmWbpm/TfZuMAEyktpNf8E0DLukHjr0If85t3BC0KZ
 kxLSCN05ZmWoZVQjmaerS8pXFvwj08OeRbUtW+b4oaraUV7vsrwxW/WcOqb6vIBn
 AEohV3w7CpFj0moRPXJO+UuxmP5TrSCIGUaEGjnrMCPJfjxwnmFYaf+9DYi3bR4H
 U8UyU55PhGTWlWg238Qp64KsDn41M/rlNKOiPEGq08+1Qnhoj4LWfFFHzLhO8y4R
 xLfsOzu6cHgEUnMKPTV6TnkWSCEL9t51wgzsqa7iKdO7kyAL1YCb4+LkskJAqUzW
 t3i8Sw8nygE7cKQ5eHzG6CClKEfgxtMGiR63gan9npEUgcFbzoVP0uz9RYz7+0Vz
 5oE2ZSGXSoiJNWhdjJVrr1gqg/TwrzmVjsmUEnf4uTDABh9GXL+g+UZHGSMvvvYi
 T8gUY4aFwXO5fGKN1RW8RXJSbJr4nKYde2s/h4ZT1EwRVdj5Zcc=
 =+i1A
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.78' into v6.6/standard/base

This is the 6.6.78 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmey9hUACgkQONu9yGCS
# aT7Ecw//Ts3+DVyM1iMAUj6zZHQ7+UVqRxvVQ0yJwe1gzECrasxhu+ack0MDuRXb
# RTOHzrVkpHrOZ58T0kkkp4DVea4bq8kpq9wnnOxpta4SzQYuwxuypxw9ZML2u8kR
# A77akcb4MPBpeTwlLUTEX1K2CrF+Wfz9ZGauJRTmrnWogJe1hZWTxr3tc9TqGeMA
# tk93g9kWy7hxxubPJpAUbNVmWbpm/TfZuMAEyktpNf8E0DLukHjr0If85t3BC0KZ
# kxLSCN05ZmWoZVQjmaerS8pXFvwj08OeRbUtW+b4oaraUV7vsrwxW/WcOqb6vIBn
# AEohV3w7CpFj0moRPXJO+UuxmP5TrSCIGUaEGjnrMCPJfjxwnmFYaf+9DYi3bR4H
# U8UyU55PhGTWlWg238Qp64KsDn41M/rlNKOiPEGq08+1Qnhoj4LWfFFHzLhO8y4R
# xLfsOzu6cHgEUnMKPTV6TnkWSCEL9t51wgzsqa7iKdO7kyAL1YCb4+LkskJAqUzW
# t3i8Sw8nygE7cKQ5eHzG6CClKEfgxtMGiR63gan9npEUgcFbzoVP0uz9RYz7+0Vz
# 5oE2ZSGXSoiJNWhdjJVrr1gqg/TwrzmVjsmUEnf4uTDABh9GXL+g+UZHGSMvvvYi
# T8gUY4aFwXO5fGKN1RW8RXJSbJr4nKYde2s/h4ZT1EwRVdj5Zcc=
# =+i1A
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 17 Feb 2025 03:40:53 AM EST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-02-19 12:41:15 -05:00
Jan Kiszka
d86c6f8097 scripts/gdb: fix aarch64 userspace detection in get_current_task
commit 4ebc417ef9cb34010a71270421fe320ec5d88aa2 upstream.

At least recent gdb releases (seen with 14.2) return SP_EL0 as signed long
which lets the right-shift always return 0.

Link: https://lkml.kernel.org/r/dcd2fabc-9131-4b48-8419-6444e2d67454@siemens.com
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-17 09:40:39 +01:00
Nathan Chancellor
3ae5615f48 kbuild: Move -Wenum-enum-conversion to W=2
commit 8f6629c004b193d23612641c3607e785819e97ab upstream.

-Wenum-enum-conversion was strengthened in clang-19 to warn for C, which
caused the kernel to move it to W=1 in commit 75b5ab134b ("kbuild:
Move -Wenum-{compare-conditional,enum-conversion} into W=1") because
there were numerous instances that would break builds with -Werror.
Unfortunately, this is not a full solution, as more and more developers,
subsystems, and distributors are building with W=1 as well, so they
continue to see the numerous instances of this warning.

Since the move to W=1, there have not been many new instances that have
appeared through various build reports and the ones that have appeared
seem to be following similar existing patterns, suggesting that most
instances of this warning will not be real issues. The only alternatives
for silencing this warning are adding casts (which is generally seen as
an ugly practice) or refactoring the enums to macro defines or a unified
enum (which may be undesirable because of type safety in other parts of
the code).

Move the warning to W=2, where warnings that occur frequently but may be
relevant should reside.

Cc: stable@vger.kernel.org
Fixes: 75b5ab134b ("kbuild: Move -Wenum-{compare-conditional,enum-conversion} into W=1")
Link: https://lore.kernel.org/ZwRA9SOcOjjLJcpi@google.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-17 09:40:27 +01:00
Bruce Ashfield
2801232971 This is the 6.6.76 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmenG4MACgkQONu9yGCS
 aT7jYw/+Nu+U/Ii6iYcptW59GF1p6w5vnUUF/i/n+/yXXGPMp9FC6ipbNKLPLeyI
 6/EuKQiyKSCwnNd6tkbq8N4nTPNawYO+za9qCrVjaOkHpREPGB81FN/xfs+jQuGI
 2uuk341fID9s4/pKJGOtDNN0S60+cK+k4sGVedDxT465VwSKedAPezyIF4Y5QgkV
 G2Aj1+fRHtNxXa4ne9UxlPB7o7ccSDJIf6GFIHUL0E72XCnB8l+e9fgbDanqQ0Y9
 7gXiVrm2I+uU7TQmDHwjc+UlM+8dYRU2xn/tA9cWw3mtlYFIChZ6py30tsfU4NKy
 ex6PwNI8o2Pd+xO3po41T4BuCID1ZHWv14HTYtlkznMBIrRe5shMMZAfy7RxLLUD
 UyGY/yDpXnhsCc4OW6fiwPKsn8WmBy+a/X4N7H+CDwpDt2r8XrDmNnCjA1eRLwI4
 TK2U7A6EPNzOg1QsZR4rMPOwN998culZCISewjW68N3le5N+PZP6Cp7+dEKiyc3e
 LJG/HlsKbe+WfPVfAiX+S5mGE2lzRIFV6l70cWRYJajs+o3a70Z4d+mUn1tYLBx1
 2Jh7KmBWgyZeli63vyUFXEz64OBwpEYzckMxmV2v/QiyKq/S5B0xlGg117gk4l4A
 hZU0cU+HR0W/Q4ujpcV/kqjAPWngcpWJKngkYQz2uVDAkRiELZA=
 =BbLu
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.76' into v6.6/standard/base

This is the 6.6.76 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmenG4MACgkQONu9yGCS
# aT7jYw/+Nu+U/Ii6iYcptW59GF1p6w5vnUUF/i/n+/yXXGPMp9FC6ipbNKLPLeyI
# 6/EuKQiyKSCwnNd6tkbq8N4nTPNawYO+za9qCrVjaOkHpREPGB81FN/xfs+jQuGI
# 2uuk341fID9s4/pKJGOtDNN0S60+cK+k4sGVedDxT465VwSKedAPezyIF4Y5QgkV
# G2Aj1+fRHtNxXa4ne9UxlPB7o7ccSDJIf6GFIHUL0E72XCnB8l+e9fgbDanqQ0Y9
# 7gXiVrm2I+uU7TQmDHwjc+UlM+8dYRU2xn/tA9cWw3mtlYFIChZ6py30tsfU4NKy
# ex6PwNI8o2Pd+xO3po41T4BuCID1ZHWv14HTYtlkznMBIrRe5shMMZAfy7RxLLUD
# UyGY/yDpXnhsCc4OW6fiwPKsn8WmBy+a/X4N7H+CDwpDt2r8XrDmNnCjA1eRLwI4
# TK2U7A6EPNzOg1QsZR4rMPOwN998culZCISewjW68N3le5N+PZP6Cp7+dEKiyc3e
# LJG/HlsKbe+WfPVfAiX+S5mGE2lzRIFV6l70cWRYJajs+o3a70Z4d+mUn1tYLBx1
# 2Jh7KmBWgyZeli63vyUFXEz64OBwpEYzckMxmV2v/QiyKq/S5B0xlGg117gk4l4A
# hZU0cU+HR0W/Q4ujpcV/kqjAPWngcpWJKngkYQz2uVDAkRiELZA=
# =BbLu
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 08 Feb 2025 03:53:23 AM EST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-02-14 14:22:57 -05:00
Parth Pancholi
cbfb30ae17 kbuild: switch from lz4c to lz4 for compression
commit e397a603e49cc7c7c113fad9f55a09637f290c34 upstream.

Replace lz4c with lz4 for kernel image compression.
Although lz4 and lz4c are functionally similar, lz4c has been deprecated
upstream since 2018. Since as early as Ubuntu 16.04 and Fedora 25, lz4
and lz4c have been packaged together, making it safe to update the
requirement from lz4c to lz4.

Consequently, some distributions and build systems, such as OpenEmbedded,
have fully transitioned to using lz4. OpenEmbedded core adopted this
change in commit fe167e082cbd ("bitbake.conf: require lz4 instead of
lz4c"), causing compatibility issues when building the mainline kernel
in the latest OpenEmbedded environment, as seen in the errors below.

This change also updates the LZ4 compression commands to make it backward
compatible by replacing stdin and stdout with the '-' option, due to some
unclear reason, the stdout keyword does not work for lz4 and '-' works for
both. In addition, this modifies the legacy '-c1' with '-9' which is also
compatible with both. This fixes the mainline kernel build failures with
the latest master OpenEmbedded builds associated with the mentioned
compatibility issues.

LZ4     arch/arm/boot/compressed/piggy_data
/bin/sh: 1: lz4c: not found
...
...
ERROR: oe_runmake failed

Link: https://github.com/lz4/lz4/pull/553
Suggested-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-08 09:52:35 +01:00
Masahiro Yamada
29f5ee6c97 kconfig: fix memory leak in sym_warn_unmet_dep()
[ Upstream commit a409fc1463d664002ea9bf700ae4674df03de111 ]

The string allocated in sym_warn_unmet_dep() is never freed, leading
to a memory leak when an unmet dependency is detected.

Fixes: f8f69dc0b4 ("kconfig: make unmet dependency warnings readable")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:34 +01:00
Sergey Senozhatsky
582e70f1ed kconfig: WERROR unmet symbol dependency
[ Upstream commit 15d3f7664d ]

When KCONFIG_WERROR env variable is set treat unmet direct
symbol dependency as a terminal condition (error).

Suggested-by: Stefan Reinauer <reinauer@google.com>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:34 +01:00
Masahiro Yamada
487852a55a kconfig: deduplicate code in conf_read_simple()
[ Upstream commit d854b4b21d ]

Kconfig accepts both "# CONFIG_FOO is not set" and "CONFIG_FOO=n" as
a valid input, but conf_read_simple() duplicates similar code to handle
them. Factor out the common code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:34 +01:00
Masahiro Yamada
94d9ee3b85 kconfig: remove unused code for S_DEF_AUTO in conf_read_simple()
[ Upstream commit 92d4fe0a48 ]

The 'else' arm here is unreachable in practical use cases.

include/config/auto.conf does not include "# CONFIG_... is not set"
line unless it is manually hacked.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:34 +01:00
Masahiro Yamada
26341c1bb7 kconfig: require a space after '#' for valid input
[ Upstream commit 4d137ab010 ]

Currently, when an input line starts with '#', (line + 2) is passed to
memcmp() without checking line[1].

It means that line[1] can be any arbitrary character. For example,
"#KCONFIG_FOO is not set" is accepted as valid input, functioning the
same as "# CONFIG_FOO is not set".

More importantly, this can potentially lead to a buffer overrun if
line[1] == '\0'. It occurs if the input only contains '#', as
(line + 2) points to an uninitialized buffer.

Check line[1], and skip the line if it is not a space.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: a409fc1463d6 ("kconfig: fix memory leak in sym_warn_unmet_dep()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:34 +01:00
Masahiro Yamada
13dc6f1692 kconfig: fix file name in warnings when loading KCONFIG_DEFCONFIG_LIST
[ Upstream commit a314f52a0210730d0d556de76bb7388e76d4597d ]

Most 'make *config' commands use .config as the base configuration file.

When .config does not exist, Kconfig tries to load a file listed in
KCONFIG_DEFCONFIG_LIST instead.

However, since commit b75b0a819a ("kconfig: change defconfig_list
option to environment variable"), warning messages have displayed an
incorrect file name in such cases.

Below is a demonstration using Debian Trixie. While loading
/boot/config-6.12.9-amd64, the warning messages incorrectly show .config
as the file name.

With this commit, the correct file name is displayed in warnings.

[Before]

  $ rm -f .config
  $ make config
  #
  # using defaults found in /boot/config-6.12.9-amd64
  #
  .config:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT
  .config:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC

[After]

  $ rm -f .config
  $ make config
  #
  # using defaults found in /boot/config-6.12.9-amd64
  #
  /boot/config-6.12.9-amd64:6804:warning: symbol value 'm' invalid for FB_BACKLIGHT
  /boot/config-6.12.9-amd64:9895:warning: symbol value 'm' invalid for ANDROID_BINDER_IPC

Fixes: b75b0a819a ("kconfig: change defconfig_list option to environment variable")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:33 +01:00
Masahiro Yamada
4517f37bf5 genksyms: fix memory leak when the same symbol is read from *.symref file
[ Upstream commit be2fa44b5180a1f021efb40c55fdf63c249c3209 ]

When a symbol that is already registered is read again from *.symref
file, __add_symbol() removes the previous one from the hash table without
freeing it.

[Test Case]

  $ cat foo.c
  #include <linux/export.h>
  void foo(void);
  void foo(void) {}
  EXPORT_SYMBOL(foo);

  $ cat foo.symref
  foo void foo ( void )
  foo void foo ( void )

When a symbol is removed from the hash table, it must be freed along
with its ->name and ->defn members. However, sym->name cannot be freed
because it is sometimes shared with node->string, but not always. If
sym->name and node->string share the same memory, free(sym->name) could
lead to a double-free bug.

To resolve this issue, always assign a strdup'ed string to sym->name.

Fixes: 64e6c1e123 ("genksyms: track symbol checksum changes")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:32 +01:00
Masahiro Yamada
9dc841e89a genksyms: fix memory leak when the same symbol is added from source
[ Upstream commit 45c9c4101d3d2fdfa00852274bbebba65fcc3cf2 ]

When a symbol that is already registered is added again, __add_symbol()
returns without freeing the symbol definition, making it unreachable.

The following test cases demonstrate different memory leak points.

[Test Case 1]

Forward declaration with exactly the same definition

  $ cat foo.c
  #include <linux/export.h>
  void foo(void);
  void foo(void) {}
  EXPORT_SYMBOL(foo);

[Test Case 2]

Forward declaration with a different definition (e.g. attribute)

  $ cat foo.c
  #include <linux/export.h>
  void foo(void);
  __attribute__((__section__(".ref.text"))) void foo(void) {}
  EXPORT_SYMBOL(foo);

[Test Case 3]

Preserving an overridden symbol (compile with KBUILD_PRESERVE=1)

  $ cat foo.c
  #include <linux/export.h>
  void foo(void);
  void foo(void) { }
  EXPORT_SYMBOL(foo);

  $ cat foo.symref
  override foo void foo ( int )

The memory leaks in Test Case 1 and 2 have existed since the introduction
of genksyms into the kernel tree. [1]

The memory leak in Test Case 3 was introduced by commit 5dae9a550a
("genksyms: allow to ignore symbol checksum changes").

When multiple init_declarators are reduced to an init_declarator_list,
the decl_spec must be duplicated. Otherwise, the following Test Case 4
would result in a double-free bug.

[Test Case 4]

  $ cat foo.c
  #include <linux/export.h>

  extern int foo, bar;

  int foo, bar;
  EXPORT_SYMBOL(foo);

In this case, 'foo' and 'bar' share the same decl_spec, 'int'. It must
be unshared before being passed to add_symbol().

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=46bd1da672d66ccd8a639d3c1f8a166048cca608

Fixes: 5dae9a550a ("genksyms: allow to ignore symbol checksum changes")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-02-08 09:52:32 +01:00
Bruce Ashfield
2666266f60 This is the 6.6.70 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmd/wdQACgkQONu9yGCS
 aT4NgxAAkMrNwZMihq/JZqh3KAvK7a6eLcy3kKvBXk5XHXRNf3lwdc5MAxHi37iS
 6xtMJ8RLN9H87xL38PECU1e+Dgt5gVURaGYvxmX+p4VCeoVK9znCRLinD7LPQw1C
 zWFS3ohBgLssLV7rfE7jQbIh4Eo/yyOI8JEj2/jtM6ttNwfEv5z3Nb9YfGfVUB00
 5/sT6CVPnG6wEXsK0Ajj8fg7pBk7aLPRD0382VtLAaNA06Mn9GuQ5ftUu6/4YYRe
 GZ3ACIaJxRhG/Rmt+/RmrOvd9FysNG8dT1Ur07TSuTGNbOOz/U7zNowdb1ZgKUJF
 hMyNgMbQSrX/5WOwgeDHJKPCMHfagWVScqzvHIAJyNjSHHkRFR8jSnmRYxQEr7u/
 wgwZfh/NTG9cvUoMVsoWoADVmhlefkFi86cEOOeaFCwkiiOOFXQi8OCHc5mq2l3O
 6VSEFZC1wLlnG2DpF63Pz4L7PXWKczD7Sum69hP2fVbWPVolD9COGHJrj4vooO1M
 hRiFjZOb9nVRqeIsFgasCvoqh5ry3LQWwonSrbyUKm7uX7hByhrlrftIJy4UV3Ew
 ZMfE5lBMYFHcsfNJT3xyKZjpLpf8s5BXTI7kMkwn0w7qnug5p7a5wK1ZnJwP6vqf
 Jpxkmf7QnhRhXPkU2uxwO8waHd8tgI8FAdx7YgOlB3A64hzqVho=
 =oGs9
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.70' into v6.6/standard/base

This is the 6.6.70 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmd/wdQACgkQONu9yGCS
# aT4NgxAAkMrNwZMihq/JZqh3KAvK7a6eLcy3kKvBXk5XHXRNf3lwdc5MAxHi37iS
# 6xtMJ8RLN9H87xL38PECU1e+Dgt5gVURaGYvxmX+p4VCeoVK9znCRLinD7LPQw1C
# zWFS3ohBgLssLV7rfE7jQbIh4Eo/yyOI8JEj2/jtM6ttNwfEv5z3Nb9YfGfVUB00
# 5/sT6CVPnG6wEXsK0Ajj8fg7pBk7aLPRD0382VtLAaNA06Mn9GuQ5ftUu6/4YYRe
# GZ3ACIaJxRhG/Rmt+/RmrOvd9FysNG8dT1Ur07TSuTGNbOOz/U7zNowdb1ZgKUJF
# hMyNgMbQSrX/5WOwgeDHJKPCMHfagWVScqzvHIAJyNjSHHkRFR8jSnmRYxQEr7u/
# wgwZfh/NTG9cvUoMVsoWoADVmhlefkFi86cEOOeaFCwkiiOOFXQi8OCHc5mq2l3O
# 6VSEFZC1wLlnG2DpF63Pz4L7PXWKczD7Sum69hP2fVbWPVolD9COGHJrj4vooO1M
# hRiFjZOb9nVRqeIsFgasCvoqh5ry3LQWwonSrbyUKm7uX7hByhrlrftIJy4UV3Ew
# ZMfE5lBMYFHcsfNJT3xyKZjpLpf8s5BXTI7kMkwn0w7qnug5p7a5wK1ZnJwP6vqf
# Jpxkmf7QnhRhXPkU2uxwO8waHd8tgI8FAdx7YgOlB3A64hzqVho=
# =oGs9
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 09 Jan 2025 07:32:20 AM EST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2025-01-13 00:03:46 -05:00
Kuan-Wei Chiu
c9818b61d0 scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity
commit 0210d251162f4033350a94a43f95b1c39ec84a90 upstream.

The orc_sort_cmp() function, used with qsort(), previously violated the
symmetry and transitivity rules required by the C standard.  Specifically,
when both entries are ORC_TYPE_UNDEFINED, it could result in both a < b
and b < a, which breaks the required symmetry and transitivity.  This can
lead to undefined behavior and incorrect sorting results, potentially
causing memory corruption in glibc implementations [1].

Symmetry: If x < y, then y > x.
Transitivity: If x < y and y < z, then x < z.

Fix the comparison logic to return 0 when both entries are
ORC_TYPE_UNDEFINED, ensuring compliance with qsort() requirements.

Link: https://www.qualys.com/2024/01/30/qsort.txt [1]
Link: https://lkml.kernel.org/r/20241226140332.2670689-1-visitorckw@gmail.com
Fixes: 57fa189942 ("scripts/sorttable: Implement build-time ORC unwind table sorting")
Fixes: fb799447ae ("x86,objtool: Split UNWIND_HINT_EMPTY in two")
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: <chuang@cs.nycu.edu.tw>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shile Zhang <shile.zhang@linux.alibaba.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-09 13:32:07 +01:00
Masahiro Yamada
bc6962f2db modpost: fix the missed iteration for the max bit in do_input()
[ Upstream commit bf36b4bf1b9a7a0015610e2f038ee84ddb085de2 ]

This loop should iterate over the range from 'min' to 'max' inclusively.
The last interation is missed.

Fixes: 1d8f430c15 ("[PATCH] Input: add modalias support")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-09 13:32:06 +01:00
Masahiro Yamada
f93e9ae0ba modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
[ Upstream commit 77dc55a978 ]

When building a 64-bit kernel on a 32-bit build host, incorrect
input MODULE_ALIAS() entries may be generated.

For example, when compiling a 64-bit kernel with CONFIG_INPUT_MOUSEDEV=m
on a 64-bit build machine, you will get the correct output:

  $ grep MODULE_ALIAS drivers/input/mousedev.mod.c
  MODULE_ALIAS("input:b*v*p*e*-e*1,*2,*k*110,*r*0,*1,*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*2,*k*r*8,*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*14A,*r*a*0,*1,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*145,*r*a*0,*1,*18,*1C,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*110,*r*a*0,*1,*m*l*s*f*w*");

However, building the same kernel on a 32-bit machine results in
incorrect output:

  $ grep MODULE_ALIAS drivers/input/mousedev.mod.c
  MODULE_ALIAS("input:b*v*p*e*-e*1,*2,*k*110,*130,*r*0,*1,*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*2,*k*r*8,*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*14A,*16A,*r*a*0,*1,*20,*21,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*145,*165,*r*a*0,*1,*18,*1C,*20,*21,*38,*3C,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*3,*k*110,*130,*r*a*0,*1,*20,*21,*m*l*s*f*w*");

A similar issue occurs with CONFIG_INPUT_JOYDEV=m. On a 64-bit build
machine, the output is:

  $ grep MODULE_ALIAS drivers/input/joydev.mod.c
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*0,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*2,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*8,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*6,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*120,*r*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*130,*r*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*2C0,*r*a*m*l*s*f*w*");

However, on a 32-bit machine, the output is incorrect:

  $ grep MODULE_ALIAS drivers/input/joydev.mod.c
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*0,*20,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*2,*22,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*8,*28,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*3,*k*r*a*6,*26,*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*11F,*13F,*r*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*11F,*13F,*r*a*m*l*s*f*w*");
  MODULE_ALIAS("input:b*v*p*e*-e*1,*k*2C0,*2E0,*r*a*m*l*s*f*w*");

When building a 64-bit kernel, BITS_PER_LONG is defined as 64. However,
on a 32-bit build machine, the constant 1L is a signed 32-bit value.
Left-shifting it beyond 32 bits causes wraparound, and shifting by 31
or 63 bits makes it a negative value.

The fix in commit e0e9263271 ("[PATCH] PATCH: 1 line 2.6.18 bugfix:
modpost-64bit-fix.patch") is incorrect; it only addresses cases where
a 64-bit kernel is built on a 64-bit build machine, overlooking cases
on a 32-bit build machine.

Using 1ULL ensures a 64-bit width on both 32-bit and 64-bit machines,
avoiding the wraparound issue.

Fixes: e0e9263271 ("[PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bf36b4bf1b9a ("modpost: fix the missed iteration for the max bit in do_input()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-09 13:32:06 +01:00
Bruce Ashfield
77698884d2 This is the 6.6.66 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmdd1hYACgkQONu9yGCS
 aT5ZrhAAvEKoB+vlaWRhVLMwzzJ0H7V4mFlLnXP4ZfxDxPQGx0rWvsu2VK0CUWZb
 2Dc8sUSedRgNPUEPoRMIj79OXj8UCRdML4IJOTlGy8U3Ex7yuQcucRf/6VCrmErG
 1efXlLVfbiLtL3VKfsUhY6wHyAWqhTuUACj2aRRjTKRfMVJdEWL1Jwth8jx5Wgoy
 wHgwrE3UyCd2e3W1Zsyeye/y7zcviKE9R2Cpjhb5v+PZGKoRi+CH6RfC6hf19wn2
 XnhSwRxS1qVcjqKlCWq4FvTAGLaJcEg93Lk1tAFA8ZqlAi58gnNumd+5HrvFkh+m
 aGxaQsnxEmj2JHTZUG7+wl8MFuVUmsOuaneOyc9GiyLIQOx5Z7D0u2n9DSgX1vW5
 XhGpacuG0q8ixr5feQKzqaYu/bEyAPUhzl5F/BDic3lABfqGgzSPK/moSGfbvdBg
 KLULlsPFz2l42Jw9oHt0aw3aZoeBtzGcLkUVq3g4lJO+oK1pcPOkMNTDxwr2XJgs
 zaWMBMjvU+6kFVufMYC5xE21mjaID7EZm2x/vo7uILgQ6uUyzITVVIlM4vh5q5NJ
 uFWG/IaBY6KitvH+lm7z+SJUEZH84hy2Jf3RZKLkqQTvg7pVSRGM5kAnQSwUxflp
 t64bhh4v6Ot78ow1aGALGUWnSMkAIhOsmHESh7EHklc4C9q11gQ=
 =go7K
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.66' into v6.6/standard/base

This is the 6.6.66 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmdd1hYACgkQONu9yGCS
# aT5ZrhAAvEKoB+vlaWRhVLMwzzJ0H7V4mFlLnXP4ZfxDxPQGx0rWvsu2VK0CUWZb
# 2Dc8sUSedRgNPUEPoRMIj79OXj8UCRdML4IJOTlGy8U3Ex7yuQcucRf/6VCrmErG
# 1efXlLVfbiLtL3VKfsUhY6wHyAWqhTuUACj2aRRjTKRfMVJdEWL1Jwth8jx5Wgoy
# wHgwrE3UyCd2e3W1Zsyeye/y7zcviKE9R2Cpjhb5v+PZGKoRi+CH6RfC6hf19wn2
# XnhSwRxS1qVcjqKlCWq4FvTAGLaJcEg93Lk1tAFA8ZqlAi58gnNumd+5HrvFkh+m
# aGxaQsnxEmj2JHTZUG7+wl8MFuVUmsOuaneOyc9GiyLIQOx5Z7D0u2n9DSgX1vW5
# XhGpacuG0q8ixr5feQKzqaYu/bEyAPUhzl5F/BDic3lABfqGgzSPK/moSGfbvdBg
# KLULlsPFz2l42Jw9oHt0aw3aZoeBtzGcLkUVq3g4lJO+oK1pcPOkMNTDxwr2XJgs
# zaWMBMjvU+6kFVufMYC5xE21mjaID7EZm2x/vo7uILgQ6uUyzITVVIlM4vh5q5NJ
# uFWG/IaBY6KitvH+lm7z+SJUEZH84hy2Jf3RZKLkqQTvg7pVSRGM5kAnQSwUxflp
# t64bhh4v6Ot78ow1aGALGUWnSMkAIhOsmHESh7EHklc4C9q11gQ=
# =go7K
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 14 Dec 2024 02:01:42 PM EST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2024-12-16 17:59:41 -05:00
Rasmus Villemoes
c45cec53ee setlocalversion: work around "git describe" performance
[ Upstream commit 523f3dbc187a9618d4fd80c2b438e4d490705dcd ]

Contrary to expectations, passing a single candidate tag to "git
describe" is slower than not passing any --match options.

  $ time git describe --debug
  ...
  traversed 10619 commits
  ...
  v6.12-rc5-63-g0fc810ae3ae1

  real    0m0.169s

  $ time git describe --match=v6.12-rc5 --debug
  ...
  traversed 1310024 commits
  v6.12-rc5-63-g0fc810ae3ae1

  real    0m1.281s

In fact, the --debug output shows that git traverses all or most of
history. For some repositories and/or git versions, those 1.3s are
actually 10-15 seconds.

This has been acknowledged as a performance bug in git [1], and a fix
is on its way [2]. However, no solution is yet in git.git, and even
when one lands, it will take quite a while before it finds its way to
a release and for $random_kernel_developer to pick that up.

So rewrite the logic to use plumbing commands. For each of the
candidate values of $tag, we ask: (1) is $tag even an annotated
tag? (2) Is it eligible to describe HEAD, i.e. an ancestor of
HEAD? (3) If so, how many commits are in $tag..HEAD?

I have tested that this produces the same output as the current script
for ~700 random commits between v6.9..v6.10. For those 700 commits,
and in my git repo, the 'make -s kernelrelease' command is on average
~4 times faster with this patch applied (geometric mean of ratios).

For the commit mentioned in Josh's original report [3], the
time-consuming part of setlocalversion goes from

$ time git describe --match=v6.12-rc5 c1e939a21e
v6.12-rc5-44-gc1e939a21eb1

real    0m1.210s

to

$ time git rev-list --count --left-right v6.12-rc5..c1e939a21eb1
0       44

real    0m0.037s

[1] https://lore.kernel.org/git/20241101113910.GA2301440@coredump.intra.peff.net/
[2] https://lore.kernel.org/git/20241106192236.GC880133@coredump.intra.peff.net/
[3] https://lore.kernel.org/lkml/309549cafdcfe50c4fceac3263220cc3d8b109b2.1730337435.git.jpoimboe@kernel.org/

Reported-by: Sean Christopherson <seanjc@google.com>
Closes: https://lore.kernel.org/lkml/ZPtlxmdIJXOe0sEy@google.com/
Reported-by: Josh Poimboeuf <jpoimboe@kernel.org>
Closes: https://lore.kernel.org/lkml/309549cafdcfe50c4fceac3263220cc3d8b109b2.1730337435.git.jpoimboe@kernel.org/
Tested-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-14 20:00:17 +01:00
Thomas Gleixner
70d6c1bade modpost: Add .irqentry.text to OTHER_SECTIONS
commit 7912405643a14b527cd4a4f33c1d4392da900888 upstream.

The compiler can fully inline the actual handler function of an interrupt
entry into the .irqentry.text entry point. If such a function contains an
access which has an exception table entry, modpost complains about a
section mismatch:

  WARNING: vmlinux.o(__ex_table+0x447c): Section mismatch in reference ...

  The relocation at __ex_table+0x447c references section ".irqentry.text"
  which is not in the list of authorized sections.

Add .irqentry.text to OTHER_SECTIONS to cure the issue.

Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # needed for linux-5.4-y
Link: https://lore.kernel.org/all/20241128111844.GE10431@google.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-14 19:59:56 +01:00
Bruce Ashfield
6ae9eb480f This is the 6.6.64 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmdWutwACgkQONu9yGCS
 aT7y9Q//RSqaYiLcxjTCR0Dv9+T/9W6PdgWZez/uMesx8otljG0JknVgd4HVrQZ8
 eb5r5mQ8iBYS2iDQZq3CbeNwoU8rVlCQmkMAm+81RAAeT9G6xHqikSz7BtLifGP1
 BpMPTr4Dy7n8H9Dkon/T8S/4Cg3wwCfJTE929LecsDy3ZaFZ8jmGh7cvnMFYaqo3
 gQRWd59h9p4kNlWtFEC4gOczr2zrCiG4vEKwINWQvRBhlpPb0ZtF1KABa525/330
 wV4MkeZea6q4cMH9QwwoxxIQQJ19GUx9doYD9uJ6tD0yaGnAPWsm7prKTW0wVJWa
 QxL+jyFZUUGN56CicI2W/ukJILgJTuTxHATXTjJzxtiiEzcBD5hdB+YZyrxNvy6d
 yCTozue8n0ulrRprlgSPcuyq+gvKlh7zadWNGKd85a3adaHPrho9HVPmphN6VzAt
 UmQvgy44hKOPNd8sOtSat8Y1giQKz4NaZ/2MT8wwCqhUjRHzVNNAz+AcHMSQDRzP
 CTcxEiInuHQyx6SLzaGrJ1sXYMxTtmWs0VbpJvSuF3oDuPudko86NcgLe6FRwYLC
 piegmHgped8MFVQ4fAAA/qXoAqgsZPyCzLsxDU3N64G2YdN7xrk4Lpc67s5UmA08
 SezsKl+hCQ+nTcZBJUpyXpdJN63Juie7idkWCYBKpi0e/vZAP4M=
 =dU5R
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.64' into v6.6/standard/base

This is the 6.6.64 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmdWutwACgkQONu9yGCS
# aT7y9Q//RSqaYiLcxjTCR0Dv9+T/9W6PdgWZez/uMesx8otljG0JknVgd4HVrQZ8
# eb5r5mQ8iBYS2iDQZq3CbeNwoU8rVlCQmkMAm+81RAAeT9G6xHqikSz7BtLifGP1
# BpMPTr4Dy7n8H9Dkon/T8S/4Cg3wwCfJTE929LecsDy3ZaFZ8jmGh7cvnMFYaqo3
# gQRWd59h9p4kNlWtFEC4gOczr2zrCiG4vEKwINWQvRBhlpPb0ZtF1KABa525/330
# wV4MkeZea6q4cMH9QwwoxxIQQJ19GUx9doYD9uJ6tD0yaGnAPWsm7prKTW0wVJWa
# QxL+jyFZUUGN56CicI2W/ukJILgJTuTxHATXTjJzxtiiEzcBD5hdB+YZyrxNvy6d
# yCTozue8n0ulrRprlgSPcuyq+gvKlh7zadWNGKd85a3adaHPrho9HVPmphN6VzAt
# UmQvgy44hKOPNd8sOtSat8Y1giQKz4NaZ/2MT8wwCqhUjRHzVNNAz+AcHMSQDRzP
# CTcxEiInuHQyx6SLzaGrJ1sXYMxTtmWs0VbpJvSuF3oDuPudko86NcgLe6FRwYLC
# piegmHgped8MFVQ4fAAA/qXoAqgsZPyCzLsxDU3N64G2YdN7xrk4Lpc67s5UmA08
# SezsKl+hCQ+nTcZBJUpyXpdJN63Juie7idkWCYBKpi0e/vZAP4M=
# =dU5R
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 09 Dec 2024 04:39:40 AM EST
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2024-12-10 13:45:32 -05:00
Masahiro Yamada
fe44c54772 modpost: remove incorrect code in do_eisa_entry()
[ Upstream commit 0c3e091319e4748cb36ac9a50848903dc6f54054 ]

This function contains multiple bugs after the following commits:

 - ac55182899 ("modpost: i2c aliases need no trailing wildcard")
 - 6543becf26 ("mod/file2alias: make modalias generation safe for cross compiling")

Commit ac55182899 inserted the following code to do_eisa_entry():

    else
            strcat(alias, "*");

This is incorrect because 'alias' is uninitialized. If it is not
NULL-terminated, strcat() could cause a buffer overrun.

Even if 'alias' happens to be zero-filled, it would output:

    MODULE_ALIAS("*");

This would match anything. As a result, the module could be loaded by
any unrelated uevent from an unrelated subsystem.

Commit ac55182899 introduced another bug.            

Prior to that commit, the conditional check was:

    if (eisa->sig[0])

This checked if the first character of eisa_device_id::sig was not '\0'.

However, commit ac55182899 changed it as follows:

    if (sig[0])

sig[0] is NOT the first character of the eisa_device_id::sig. The
type of 'sig' is 'char (*)[8]', meaning that the type of 'sig[0]' is
'char [8]' instead of 'char'. 'sig[0]' and 'symval' refer to the same
address, which never becomes NULL.

The correct conversion would have been:

    if ((*sig)[0])

However, this if-conditional was meaningless because the earlier change
in commit ac551828993e was incorrect.

This commit removes the entire incorrect code, which should never have
been executed.

Fixes: ac55182899 ("modpost: i2c aliases need no trailing wildcard")
Fixes: 6543becf26 ("mod/file2alias: make modalias generation safe for cross compiling")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:59 +01:00
Masahiro Yamada
ab8c357dbf init/modpost: conditionally check section mismatch to __meminit*
[ Upstream commit 73db3abdca ]

This reverts commit eb8f689046 ("Use separate sections for __dev/
_cpu/__mem code/data").

Check section mismatch to __meminit* only when CONFIG_MEMORY_HOTPLUG=n.

With this change, the linker script and modpost become simpler, and we
can get rid of the __ref annotations from the memory hotplug code.

[sfr@canb.auug.org.au: remove MEM_KEEP from arch/powerpc/kernel/vmlinux.lds.S]
  Link: https://lkml.kernel.org/r/20240710093213.2aefb25f@canb.auug.org.au
Link: https://lkml.kernel.org/r/20240706160511.2331061-2-masahiroy@kernel.org
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:59 +01:00
Masahiro Yamada
52197a7c14 modpost: squash ALL_{INIT,EXIT}_TEXT_SECTIONS to ALL_TEXT_SECTIONS
[ Upstream commit 34fcf231dc ]

ALL_INIT_TEXT_SECTIONS and ALL_EXIT_TEXT_SECTIONS are only used in
the macro definition of ALL_TEXT_SECTIONS.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
17f4332ae6 modpost: use ALL_INIT_SECTIONS for the section check from DATA_SECTIONS
[ Upstream commit e578e4e311 ]

ALL_INIT_SECTIONS is defined as follows:

  #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
db081efa9b modpost: disallow the combination of EXPORT_SYMBOL and __meminit*
[ Upstream commit a3df1526da ]

Theoretically, we could export conditionally-discarded code sections,
such as .meminit*, if all the users can become modular under a certain
condition. However, that would be difficult to control and such a tricky
case has never occurred.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
a169a023e0 modpost: remove EXIT_SECTIONS macro
[ Upstream commit 48cd8df7af ]

ALL_EXIT_SECTIONS and EXIT_SECTIONS are the same. Remove the latter.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
2462732f35 modpost: remove MEM_INIT_SECTIONS macro
[ Upstream commit 473a45bb35 ]

ALL_XXXINIT_SECTIONS and MEM_INIT_SECTIONS are the same.
Remove the latter.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
95da0b40fa modpost: disallow *driver to reference .meminit* sections
[ Upstream commit 50cccec15c ]

Drivers must not reference .meminit* sections, which are discarded
when CONFIG_MEMORY_HOTPLUG=n.

The reason for whitelisting "*driver" in the section mismatch check
was to allow drivers to reference symbols annotated as __devinit or
__devexit that existed in the past.

Those annotations were removed by the following commits:

 - 54b956b903 ("Remove __dev* markings from init.h")
 - 92e9e6d1f9 ("modpost.c: Stop checking __dev* section mismatches")

Remove the stale whitelist.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Masahiro Yamada
db5647420f modpost: remove ALL_EXIT_DATA_SECTIONS macro
[ Upstream commit 3ada34b0f6 ]

This is unused.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: bb43a59944f4 ("Rename .data.unlikely to .data..unlikely")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:58 +01:00
Tamir Duberstein
ec3eb00526 checkpatch: always parse orig_commit in fixes tag
[ Upstream commit 2f07b652384969f5d0b317e1daa5f2eb967bc73d ]

Do not require the presence of `$balanced_parens` to get the commit SHA;
this allows a `Fixes: deadbeef` tag to get a correct suggestion rather
than a suggestion containing a reference to HEAD.

Given this patch:

: From: Tamir Duberstein <tamird@gmail.com>
: Subject: Test patch
: Date: Fri, 25 Oct 2024 19:30:51 -0400
:
: This is a test patch.
:
: Fixes: bd17e036b4
: Signed-off-by: Tamir Duberstein <tamird@gmail.com>
: --- /dev/null
: +++ b/new-file
: @@ -0,0 +1 @@
: +Test.

Before:

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: c10a7d25e68f ("Test patch")'

After:

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: bd17e036b4 ("checkpatch: warn for non-standard fixes tag style")'

The prior behavior incorrectly suggested the patch's own SHA and title
line rather than the referenced commit's.  This fixes that.

Ironically this:

Fixes: bd17e036b4 ("checkpatch: warn for non-standard fixes tag style")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Louis Peens <louis.peens@corigine.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Cc: Philippe Schenker <philippe.schenker@toradex.com>
Cc: Simon Horman <horms@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:18 +01:00
Dan Carpenter
f6a2560e14 checkpatch: check for missing Fixes tags
[ Upstream commit d5d6281ae8 ]

This check looks for common words that probably indicate a patch
is a fix.  For now the regex is:

	(?:(?:BUG: K.|UB)SAN: |Call Trace:|stable\@|syzkaller)/)

Why are stable patches encouraged to have a fixes tag?  Some people mark
their stable patches as "# 5.10" etc.  This is useful but a Fixes tag is
still a good idea.  For example, the Fixes tag helps in review.  It
helps people to not cherry-pick buggy patches without also
cherry-picking the fix.

Also if a bug affects the 5.7 kernel some people will round it up to
5.10+ because 5.7 is not supported on kernel.org.  It's possible the Bad
Binder bug was caused by this sort of gap where companies outside of
kernel.org are supporting different kernels from kernel.org.

Should it be counted as a Fix when a patch just silences harmless
WARN_ON() stack trace.  Yes.  Definitely.

Is silencing compiler warnings a fix?  It seems unfair to the original
authors, but we use -Werror now, and warnings break the build so let's
just add Fixes tags.  I tell people that silencing static checker
warnings is not a fix but the rules on this vary by subsystem.

Is fixing a minor LTP issue (Linux Test Project) a fix?  Probably?  It's
hard to know what to do if the LTP test has technically always been
broken.

One clear false positive from this check is when someone updated their
debug output and included before and after Call Traces.  Or when crashes
are introduced deliberately for testing.  In those cases, you should
just ignore checkpatch.

Link: https://lkml.kernel.org/r/ZmhUgZBKeF_8ixA6@moroto
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Sasha Levin <sashal@kernel.org>
Cc: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 2f07b6523849 ("checkpatch: always parse orig_commit in fixes tag")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-09 10:32:18 +01:00
Bruce Ashfield
ffb3af3454 This is the 6.6.55 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmcHpVcACgkQONu9yGCS
 aT5ruxAAiv7pOBKTn4uk6sJ67GjSh7tpjRdwHjekAmxnOX2JdtSDIfaTN1V0pAW9
 8xhbymu9b89iYov+XOV7Gia/1PlR0ZiLjrbKEowCL7cu1pXP1y+iDuAIFdGoe4l8
 3Ajy35xL1xNbHgsuazsz6xAeBSfHYHAXZ8rYdyq37ZTTeDz90U7MVK+eMV7WbYtX
 /xuWFdaGZR79WPV5/TTd5Psw0pMrfrYysn+p6HhOgzWvNjCqcODUMI1leRqK4GT9
 GVEIoCvdsuz3f4C/to1pKgzW61+1oHVlCpdi7Uw6BnCAfILK5ez3b9ISnvY0fQ4Z
 kmhUPA9ZHCYjtBR0E2+KaCmZvZBf/TIP63pd+aD2PRvkMxNgY93ZxyzuJRSVoxMx
 y/vsIXaC0fCO1dGsBz0MvS+gLleLe8DWheNOWIdHxdWBBm3gapzq+PxO4nuVVzZu
 iQGvXyrdLah1ZxnsDa2AE+++97sOJfHVRWxTsouaGa0pGMdr0GUpOp0F3Z3uG3fE
 ATxJ9tSNj9ozZ+3tImoZxNJuyjN9IGPkxqFQLplJpzky0uGlOFBuR9ZMPYGVrMiG
 /GfZfO8TCULo5+Hy8leEuwPu9vCfqk4k96EB5p0zv0tTuuZXyf3NDt4UzQbd/q7R
 RoHZIDgpO+XvUoyMhOkntkT/1MsU04zzSm767IgGJEl44/NEu5Y=
 =YeIl
 -----END PGP SIGNATURE-----

Merge tag 'v6.6.55' into v6.6/standard/base

This is the 6.6.55 stable release

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmcHpVcACgkQONu9yGCS
# aT5ruxAAiv7pOBKTn4uk6sJ67GjSh7tpjRdwHjekAmxnOX2JdtSDIfaTN1V0pAW9
# 8xhbymu9b89iYov+XOV7Gia/1PlR0ZiLjrbKEowCL7cu1pXP1y+iDuAIFdGoe4l8
# 3Ajy35xL1xNbHgsuazsz6xAeBSfHYHAXZ8rYdyq37ZTTeDz90U7MVK+eMV7WbYtX
# /xuWFdaGZR79WPV5/TTd5Psw0pMrfrYysn+p6HhOgzWvNjCqcODUMI1leRqK4GT9
# GVEIoCvdsuz3f4C/to1pKgzW61+1oHVlCpdi7Uw6BnCAfILK5ez3b9ISnvY0fQ4Z
# kmhUPA9ZHCYjtBR0E2+KaCmZvZBf/TIP63pd+aD2PRvkMxNgY93ZxyzuJRSVoxMx
# y/vsIXaC0fCO1dGsBz0MvS+gLleLe8DWheNOWIdHxdWBBm3gapzq+PxO4nuVVzZu
# iQGvXyrdLah1ZxnsDa2AE+++97sOJfHVRWxTsouaGa0pGMdr0GUpOp0F3Z3uG3fE
# ATxJ9tSNj9ozZ+3tImoZxNJuyjN9IGPkxqFQLplJpzky0uGlOFBuR9ZMPYGVrMiG
# /GfZfO8TCULo5+Hy8leEuwPu9vCfqk4k96EB5p0zv0tTuuZXyf3NDt4UzQbd/q7R
# RoHZIDgpO+XvUoyMhOkntkT/1MsU04zzSm767IgGJEl44/NEu5Y=
# =YeIl
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 10 Oct 2024 05:58:47 AM EDT
# gpg:                using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
# gpg: Can't check signature: No public key
2024-10-21 14:10:07 -04:00