This project is mirrored from https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10.git.
Pull mirroring updated .
- Apr 02, 2025
-
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/421 JIRA: https://issues.redhat.com/browse/RHEL-80508 CVE: CVE-2024-53216 Comment: CVE identifies a patch which is reverted in the same release in favor of a different fix. Four patches included in this MR fix the problem that the CVE in question described. Signed-off-by:
Olga Kornievskaia <okorniev@redhat.com> Approved-by:
Benjamin Coddington <bcodding@redhat.com> Approved-by:
Scott Mayhew <smayhew@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/578 JIRA: https://issues.redhat.com/browse/RHEL-83372 CVE: CVE-2025-21857 ``` commit 071ed42cff4fcdd89025d966d48eabef59913bf2 Author: Pierre Riteau <pierre@stackhpc.com> Date: Thu Feb 13 23:36:10 2025 +0100 net/sched: cls_api: fix error handling causing NULL dereference tcf_exts_miss_cookie_base_alloc() calls xa_alloc_cyclic() which can return 1 if the allocation succeeded after wrapping. This was treated as an error, with value 1 returned to caller tcf_exts_init_ex() which sets exts->actions to NULL and returns 1 to caller fl_change(). fl_change() treats err == 1 as success, calling tcf_exts_validate_ex() which calls tcf_action_init() with exts->actions as argument, where it is dereferenced. Example trace: BUG: kernel NULL pointer dereference, address: 0000000000000000 CPU: 114 PID: 16151 Comm: handler114 Kdump: loaded Not tainted 5.14.0-503.16.1.el9_5.x86_64 #1 RIP: 0010:tcf_action_init+0x1f8/0x2c0 Call Trace: tcf_action_init+0x1f8/0x2c0 tcf_exts_validate_ex+0x175/0x190 fl_change+0x537/0x1120 [cls_flower] Fixes: 80cd22c3 ("net/sched: cls_api: Support hardware miss to tc action") Signed-off-by:
Pierre Riteau <pierre@stackhpc.com> Reviewed-by:
Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/20250213223610.320278-1-pierre@stackhpc.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>```> Signed-off-by:
CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> --- <small>Created 2025-03-13 07:56 UTC by backporter - [KWF FAQ](https://red.ht/kernel_workflow_doc) - [Slack #team-kernel-workflow](https://redhat-internal.slack.com/archives/C04LRUPMJQ5) - [Source](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/webhook/utils/backporter.py) - [Documentation](https://gitlab.com/cki-project/kernel-workflow/-/blob/main/docs/README.backporter.md) - [Report an issue](https://gitlab.com/cki-project/kernel-workflow/-/issues/new?issue%5Btitle%5D=backporter%20webhook%20issue)</small > Approved-by:
Xin Long <lxin@redhat.com> Approved-by:
Antoine Tenart <atenart@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
- Mar 31, 2025
-
-
Jan Stancek authored
JIRA: INTERNAL Upstream Status: RHEL only Omit changes to Makefile.rhelver, 10.0 KABI (but include mm struct padding) and d67259ef ("Revert "smb: client: fix chmod(2) regression with ATTR_READONLY""). Signed-off-by:
Jan Stancek <jstancek@redhat.com>
-
- Mar 28, 2025
-
-
Julio Faracco authored
Signed-off-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/383 # Merge Request Required Information ## Summary of Changes * Enables `CONFIG_BLK_CGROUP_PUNT_BIO` ## Rationale As someone working on building an external Btrfs kernel module for CentOS/RHEL 10, having all the dependencies for Btrfs satisfied in the kernel to enable third parties (like the CentOS Kmods SIG) to build Btrfs as a kernel module package is desirable. From looking at `fs/btrfs/Kconfig`, it appears that the only missing dependency is `BLK_CGROUP_PUNT_BIO`. So, this just needs to be enabled. ## Approved Development Ticket(s) JIRA: https://issues.redhat.com/browse/RHEL-79711 ## Signoffs Signed-off-by:
Neal Gompa <ngompa@centosproject.org> Approved-by:
Ming Lei <ming.lei@redhat.com> Approved-by:
Scott Weaver <scweaver@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/604 JIRA: https://issues.redhat.com/browse/RHEL-57021 Signed-off-by:
Michael Petlan <mpetlan@redhat.com> Approved-by:
ashelat <ashelat@redhat.com> Approved-by:
jbrnak <jbrnak@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/597 JIRA: https://issues.redhat.com/browse/RHEL-83856 Signed-off-by:
Paulo Alcantara <paalcant@redhat.com> Approved-by:
Jay Shin <jaeshin@redhat.com> Approved-by:
Benjamin Coddington <bcodding@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/558 Backport a series of improvements to dirty_log_test that make this test more robust, and in particular make it work in L1 Also backport a minor fix to KVM which needs to be present in L1 kernel to avoid the test failing, when run on Intel. JIRA: https://issues.redhat.com/browse/RHEL-58941 Tested: run the test few times Signed-off-by:
Maxim Levitsky <mlevitsk@redhat.com> Approved-by:
Vitaly Kuznetsov <vkuznets@redhat.com> Approved-by:
Cathy Avery <cavery@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/398 JIRA: https://issues.redhat.com/browse/RHEL-80114 CVE: CVE-2024-56690 Upstream Status: linux.git commit 662f2f13e66d3883b9238b0b96b17886179e60e2 Author: Yi Yang <yiyang13@huawei.com> Date: Tue Oct 15 02:09:35 2024 +0000 crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY Since commit 8f4f68e7 ("crypto: pcrypt - Fix hungtask for PADATA_RESET"), the pcrypt encryption and decryption operations return -EAGAIN when the CPU goes online or offline. In alg_test(), a WARN is generated when pcrypt_aead_decrypt() or pcrypt_aead_encrypt() returns -EAGAIN, the unnecessary panic will occur when panic_on_warn set 1. Fix this issue by calling crypto layer directly without parallelization in that case. Fixes: 8f4f68e7 ("crypto: pcrypt - Fix hungtask for PADATA_RESET") Signed-off-by:
Yi Yang <yiyang13@huawei.com> Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by:
Herbert Xu <herbert.xu@redhat.com> Approved-by:
Ondrej Mosnáček <omosnacek@gmail.com> Approved-by:
Phil Auld <pauld@redhat.com> Approved-by:
Vladis Dronov <vdronov@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/586 JIRA: https://issues.redhat.com/browse/RHEL-82421 Adjust sb->s_blocksize{,_bits} directly for file-backed mounts when the fs block size is smaller than PAGE_SIZE. Previously, EROFS used sb_set_blocksize(), which caused a panic if bdev-backed mounts is not used. Fixes: fb176750 ("erofs: add file-backed mount support") Signed-off-by:
Hongzhen Luo <hongzhen@linux.alibaba.com> Link: https://lore.kernel.org/r/20241015103836.3757438-1-hongzhen@linux.alibaba.com Signed-off-by:
Gao Xiang <hsiangkao@linux.alibaba.com> CVE: CVE-2024-56750 Signed-off-by:
Ian Kent <ikent@redhat.com> Approved-by:
Brian Foster <bfoster@redhat.com> Approved-by:
Eric Sandeen <esandeen@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/620 JIRA: https://issues.redhat.com/browse/RHEL-47411 Build Info: 67089053 Tested: Successful platform test results on Intel (intel-pantherlake-h-02) system. commit 83848e37f6ee80f60b04139fefdfa1bde4aaa826 Author: Xi Pardee <xi.pardee@linux.intel.com> Date: Tue Dec 10 13:26:41 2024 -0800 platform/x86/intel/vsec: Add support for Panther Lake Add Panther Lake PMT telemetry support. Signed-off-by:
Xi Pardee <xi.pardee@linux.intel.com> Link: https://lore.kernel.org/r/20241210212646.239211-1-xi.pardee@linux.intel.com Reviewed-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by:
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by:
Steve Best <sbest@redhat.com> Approved-by:
Tony Camuso <tcamuso@redhat.com> Approved-by:
David Arcari <darcari@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/587 JIRA: https://issues.redhat.com/browse/RHEL-73803 Signed-off-by:
Hangbin Liu <haliu@redhat.com> Approved-by:
Corinna Vinschen <vinschen@redhat.com> Approved-by:
Antoine Tenart <atenart@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/522 JIRA: https://issues.redhat.com/browse/RHEL-80554 Patches are required for managing MSI-X in driver. Signed-off-by:
Petr Oros <poros@redhat.com> Approved-by:
Michal Schmidt <mschmidt@redhat.com> Approved-by:
Kamal Heib <kheib@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/581 JIRA: https://issues.redhat.com/browse/RHEL-81574 Upstream Status: linux.git CVE: CVE-2025-21765 Signed-off-by:
Guillaume Nault <gnault@redhat.com> Approved-by:
Antoine Tenart <atenart@redhat.com> Approved-by:
Florian Westphal <fwestpha@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/580 JIRA: https://issues.redhat.com/browse/RHEL-80715 - objtool: Add bch2_trans_unlocked_error() to bcachefs noreturns (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - objtool/x86: allow syscall instruction (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - objtool: Exclude __tracepoints data from ENDBR checks (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - kbuild: Add Propeller configuration for kernel build (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - AutoFDO: Enable machine function split optimization for AutoFDO (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - AutoFDO: Enable -ffunction-sections for the AutoFDO build (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - vmlinux.lds.h: Add markers for text_unlikely and text_hot sections (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - openrisc: place exception table at the head of vmlinux (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - vmlinux.lds.h: Adjust symbol ordering in text output section (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - objtool: Fix unreachable instruction warnings for weak functions (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - kbuild: Add AutoFDO support for Clang build (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - reiserfs: The last commit (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - objtool: Also include tools/include/uapi (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715)] - objtool: Detect non-relocated text references (Radomir Vrbovsky) [[RHEL-80715](https://issues.redhat.com/browse/RHEL-80715) ] Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com> Approved-by:
Jan Stancek <jstancek@redhat.com> Approved-by:
Joe Lawrence <joe.lawrence@redhat.com> Approved-by:
David Arcari <darcari@redhat.com> Approved-by:
Carlos Maiolino <cmaiolino@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/419 JIRA: https://issues.redhat.com/browse/RHEL-80866 Upstream Status: RHEL only When in kdump we don't need any messaging about deprecated status. The kernel is limited to a single cpu by default which causes false messaging to show every time. Fix this by inverting the kdump boot test, to get proper messaging during standard boot. Signed-off-by:
Tomas Henzl <thenzl@redhat.com> Approved-by:
David Arcari <darcari@redhat.com> Approved-by:
Lenny Szubowicz <lszubowi@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/610 Description: Update intel_idle JIRA: https://issues.redhat.com/browse/RHEL-79459 Build Info: 67059186 Tested: Successful platform test results on Intel (intel-eaglestream-emr-01) system. Signed-off-by:
Steve Best <sbest@redhat.com> Approved-by:
David Arcari <darcari@redhat.com> Approved-by:
Tony Camuso <tcamuso@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/608 JIRA: https://issues.redhat.com/browse/RHEL-80288 Signed-off-by:
Hangbin Liu <haliu@redhat.com> Approved-by:
Antoine Tenart <atenart@redhat.com> Approved-by:
Guillaume Nault <gnault@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
- Mar 25, 2025
-
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 31ad36a271290648e7c2288a03d7b933d20254d6 Author: chenchangcheng <ccc194101@163.com> Date: Fri Dec 20 15:48:47 2024 +0800 Fix the following objtool warning during build time: fs/bcachefs/btree_trans_commit.o: warning: objtool: bch2_trans_commit_write_locked.isra.0() falls through to next function do_bch2_trans_commit.isra.0() fs/bcachefs/btree_trans_commit.o: warning: objtool: .text: unexpected end of section ...... fs/bcachefs/btree_update.o: warning: objtool: bch2_trans_update_get_key_cache() falls through to next function flush_new_cached_update() fs/bcachefs/btree_update.o: warning: objtool: flush_new_cached_update() falls through to next function bch2_trans_update_by_path() bch2_trans_unlocked_error() is an Obviously Correct (tm) panic() wrapper, add it to the list of known noreturns. [ mingo: Improved the changelog ] Fixes: fd104e29 ("bcachefs: bch2_trans_verify_not_unlocked()") Signed-off-by:
chenchangcheng <chenchangcheng@kylinos.cn> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Link: https://lkml.kernel.org/r/20241220074847.3418134-1-ccc194101@163.com Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit d5173f7537505315557d8580e3a648f07f17deda Author: Peter Zijlstra <peterz@infradead.org> Date: Fri, 8 Nov 2024 10:32:02 +0100 For some, as of yet unexplained reason, Clang-19, but not GCC, generates and endless stream of: drivers/iio/imu/bno055/bno055_ser.o: warning: objtool: __tracepoint_send_chunk+0x20: data relocation to !ENDBR: __SCT__tp_func_send_chunk+0x0 drivers/iio/imu/bno055/bno055_ser.o: warning: objtool: __tracepoint_cmd_retry+0x20: data relocation to !ENDBR: __SCT__tp_func_cmd_retry+0x0 drivers/iio/imu/bno055/bno055_ser.o: warning: objtool: __tracepoint_write_reg+0x20: data relocation to !ENDBR: __SCT__tp_func_write_reg+0x0 drivers/iio/imu/bno055/bno055_ser.o: warning: objtool: __tracepoint_read_reg+0x20: data relocation to !ENDBR: __SCT__tp_func_read_reg+0x0 drivers/iio/imu/bno055/bno055_ser.o: warning: objtool: __tracepoint_recv+0x20: data relocation to !ENDBR: __SCT__tp_func_recv+0x0 Which is entirely correct, but harmless. Add the __tracepoints section to the exclusion list. Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20241108184618.GG38786@noisy.programming.kicks-ass.net [Radomir Vrbovsky <rvrbovsk@redhat.com>: Manually updated due to context mismatch] Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit d5dc95836147f2e25b134c0ca3a0bc1a5867ea29 Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:14 2024 -0700 Add the build support for using Clang's Propeller optimizer. Like AutoFDO, Propeller uses hardware sampling to gather information about the frequency of execution of different code paths within a binary. This information is then used to guide the compiler's optimization decisions, resulting in a more efficient binary. The support requires a Clang compiler LLVM 19 or later, and the create_llvm_prof tool (https://github.com/google/autofdo/releases/tag/v0.30.1). This commit is limited to x86 platforms that support PMU features like LBR on Intel machines and AMD Zen3 BRS. Here is an example workflow for building an AutoFDO+Propeller optimized kernel: 1) Build the kernel on the host machine, with AutoFDO and Propeller build config CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y then $ make LLVM=1 CLANG_AUTOFDO_PROFILE=<autofdo_profile> “<autofdo_profile>” is the profile collected when doing a non-Propeller AutoFDO build. This step builds a kernel that has the same optimization level as AutoFDO, plus a metadata section that records basic block information. This kernel image runs as fast as an AutoFDO optimized kernel. 2) Install the kernel on test/production machines. 3) Run the load tests. The '-c' option in perf specifies the sample event period. We suggest using a suitable prime number, like 500009, for this purpose. For Intel platforms: $ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c <count> \ -o <perf_file> -- <loadtest> For AMD platforms: The supported system are: Zen3 with BRS, or Zen4 with amd_lbr_v2 # To see if Zen3 support LBR: $ cat proc/cpuinfo | grep " brs" # To see if Zen4 support LBR: $ cat proc/cpuinfo | grep amd_lbr_v2 # If the result is yes, then collect the profile using: $ perf record --pfm-events RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a \ -N -b -c <count> -o <perf_file> -- <loadtest> 4) (Optional) Download the raw perf file to the host machine. 5) Generate Propeller profile: $ create_llvm_prof --binary=<vmlinux> --profile=<perf_file> \ --format=propeller --propeller_output_module_name \ --out=<propeller_profile_prefix>_cc_profile.txt \ --propeller_symorder=<propeller_profile_prefix>_ld_profile.txt “create_llvm_prof” is the profile conversion tool, and a prebuilt binary for linux can be found on https://github.com/google/autofdo/releases/tag/v0.30.1 (can also build from source). "<propeller_profile_prefix>" can be something like "/home/user/dir/any_string". This command generates a pair of Propeller profiles: "<propeller_profile_prefix>_cc_profile.txt" and "<propeller_profile_prefix>_ld_profile.txt". 6) Rebuild the kernel using the AutoFDO and Propeller profile files. CONFIG_AUTOFDO_CLANG=y CONFIG_PROPELLER_CLANG=y and $ make LLVM=1 CLANG_AUTOFDO_PROFILE=<autofdo_profile> \ CLANG_PROPELLER_PROFILE_PREFIX=<propeller_profile_prefix> Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Suggested-by:
Krzysztof Pszeniczny <kpszeniczny@google.com> Suggested-by:
Nick Desaulniers <ndesaulniers@google.com> Suggested-by:
Stephane Eranian <eranian@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 2fd65f7afd5a73b685a1651cb651ade120b53e15 Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:13 2024 -0700 Enable the machine function split optimization for AutoFDO in Clang. Machine function split (MFS) is a pass in the Clang compiler that splits a function into hot and cold parts. The linker groups all cold blocks across functions together. This decreases hot code fragmentation and improves iCache and iTLB utilization. MFS requires a profile so this is enabled only for the AutoFDO builds. Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Suggested-by:
Krzysztof Pszeniczny <kpszeniczny@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 0847420f5e499a7ab518942fff71482179290163 Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:12 2024 -0700 Enable -ffunction-sections by default for the AutoFDO build. With -ffunction-sections, the compiler places each function in its own section named .text.function_name instead of placing all functions in the .text section. In the AutoFDO build, this allows the linker to utilize profile information to reorganize functions for improved utilization of iCache and iTLB. Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit db0b2991ae1aac5ca985ec6fd8ff9bd9b2126c9b Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:11 2024 -0700 Add markers like __hot_text_start, __hot_text_end, __unlikely_text_start, and __unlikely_text_end which will be included in System.map. These markers indicate how the compiler groups functions, providing valuable information to developers about the layout and optimization of the code. Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit a412f04070e52e6d6b5f6f964b9d9644de16bb81 Author: Masahiro Yamada <masahiroy@kernel.org> Date: Mon Dec 2 15:28:22 2024 +0900 Since commit 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in text output section"), the exception table in arch/openrisc/kernel/head.S is no longer positioned at the very beginning of the kernel image, which causes a boot failure. Currently, the exception table resides in the regular .text section. Previously, it was placed at the head by relying on the linker receiving arch/openrisc/kernel/head.o as the first object. However, this behavior has changed because sections like .text.{asan,unknown,unlikely,hot} now precede the regular .text section. The .head.text section is intended for entry points requiring special placement. However, in OpenRISC, this section has been misused: instead of the entry points, it contains boot code meant to be discarded after booting. This feature is typically handled by the .init.text section. This commit addresses the issue by replacing the current __HEAD marker with __INIT and re-annotating the entry points with __HEAD. Additionally, it adds __REF to entry.S to suppress the following modpost warning: WARNING: modpost: vmlinux: section mismatch in reference: _tng_kernel_start+0x70 (section: .text) -> _start (section: .init.text) Fixes: 0043ecea2399 ("vmlinux.lds.h: Adjust symbol ordering in text output section") Reported-by:
Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/all/5e032233-5b65-4ad5-ac50-d2eb6c00171c@roeck-us.net/#t Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Tested-by:
Guenter Roeck <linux@roeck-us.net> Reviewed-by:
Rong Xu <xur@google.com> Signed-off-by:
Stafford Horne <shorne@gmail.com> [Radomir Vrbovsky <rvrbovsk@redhat.com> Manually modified due to context mismatch] Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 0043ecea2399ffc8bfd99ed9dbbe766e7c79293c Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:10 2024 -0700 When the -ffunction-sections compiler option is enabled, each function is placed in a separate section named .text.function_name rather than putting all functions in a single .text section. However, using -function-sections can cause problems with the linker script. The comments included in include/asm-generic/vmlinux.lds.h note these issues.: “TEXT_MAIN here will match .text.fixup and .text.unlikely if dead code elimination is enabled, so these sections should be converted to use ".." first.” It is unclear whether there is a straightforward method for converting a suffix to "..". This patch modifies the order of subsections within the text output section. Specifically, it changes current order: .text.hot, .text, .text_unlikely, .text.unknown, .text.asan to the new order: .text.asan, .text.unknown, .text_unlikely, .text.hot, .text Here is the rationale behind the new layout: The majority of the code resides in three sections: .text.hot, .text, and .text.unlikely, with .text.unknown containing a negligible amount. .text.asan is only generated in ASAN builds. The primary goal is to group code segments based on their execution frequency (hotness). First, we want to place .text.hot adjacent to .text. Since we cannot put .text.hot after .text (Due to constraints with -ffunction-sections, placing .text.hot after .text is problematic), we need to put .text.hot before .text. Then it comes to .text.unlikely, we cannot put it after .text (same -ffunction-sections issue) . Therefore, we position .text.unlikely before .text.hot. .text.unknown and .tex.asan follow the same logic. This revised ordering effectively reverses the original arrangement (for .text.unlikely, .text.unknown, and .tex.asan), maintaining a similar level of affinity between sections. It also places .text.hot section at the beginning of a page to better utilize the TLB entry. Note that the limitation arises because the linker script employs glob patterns instead of regular expressions for string matching. While there is a method to maintain the current order using complex patterns, this significantly complicates the pattern and increases the likelihood of errors. This patch also changes vmlinux.lds.S for the sparc64 architecture to accommodate specific symbol placement requirements. Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Suggested-by:
Krzysztof Pszeniczny <kpszeniczny@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 18e885099f1c52755f054202525cb60d3edcda44 Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:09 2024 -0700 In the presence of both weak and strong function definitions, the linker drops the weak symbol in favor of a strong symbol, but leaves the code in place. Code in ignore_unreachable_insn() has some heuristics to suppress the warning, but it does not work when -ffunction-sections is enabled. Suppose function foo has both strong and weak definitions. Case 1: The strong definition has an annotated section name, like .init.text. Only the weak definition will be placed into .text.foo. But since the section has no symbols, there will be no "hole" in the section. Case 2: Both sections are without an annotated section name. Both will be placed into .text.foo section, but there will be only one symbol (the strong one). If the weak code is before the strong code, there is no "hole" as it fails to find the right-most symbol before the offset. The fix is to use the first node to compute the hole if hole.sym is empty. If there is no symbol in the section, the first node will be NULL, in which case, -1 is returned to skip the whole section. Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Suggested-by:
Krzysztof Pszeniczny <kpszeniczny@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Acked-by:
Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 315ad8780a129e82e2c5c65ee6e970d91a577acb Author: Rong Xu <xur@google.com> Date: Sat Nov 2 10:51:08 2024 -0700 Add the build support for using Clang's AutoFDO. Building the kernel with AutoFDO does not reduce the optimization level from the compiler. AutoFDO uses hardware sampling to gather information about the frequency of execution of different code paths within a binary. This information is then used to guide the compiler's optimization decisions, resulting in a more efficient binary. Experiments showed that the kernel can improve up to 10% in latency. The support requires a Clang compiler after LLVM 17. This submission is limited to x86 platforms that support PMU features like LBR on Intel machines and AMD Zen3 BRS. Support for SPE on ARM 1, and BRBE on ARM 1 is part of planned future work. Here is an example workflow for AutoFDO kernel: 1) Build the kernel on the host machine with LLVM enabled, for example, $ make menuconfig LLVM=1 Turn on AutoFDO build config: CONFIG_AUTOFDO_CLANG=y With a configuration that has LLVM enabled, use the following command: scripts/config -e AUTOFDO_CLANG After getting the config, build with $ make LLVM=1 2) Install the kernel on the test machine. 3) Run the load tests. The '-c' option in perf specifies the sample event period. We suggest using a suitable prime number, like 500009, for this purpose. For Intel platforms: $ perf record -e BR_INST_RETIRED.NEAR_TAKEN:k -a -N -b -c <count> \ -o <perf_file> -- <loadtest> For AMD platforms: The supported system are: Zen3 with BRS, or Zen4 with amd_lbr_v2 For Zen3: $ cat proc/cpuinfo | grep " brs" For Zen4: $ cat proc/cpuinfo | grep amd_lbr_v2 $ perf record --pfm-events RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a \ -N -b -c <count> -o <perf_file> -- <loadtest> 4) (Optional) Download the raw perf file to the host machine. 5) To generate an AutoFDO profile, two offline tools are available: create_llvm_prof and llvm_profgen. The create_llvm_prof tool is part of the AutoFDO project and can be found on GitHub (https://github.com/google/autofdo ), version v0.30.1 or later. The llvm_profgen tool is included in the LLVM compiler itself. It's important to note that the version of llvm_profgen doesn't need to match the version of Clang. It needs to be the LLVM 19 release or later, or from the LLVM trunk. $ llvm-profgen --kernel --binary=<vmlinux> --perfdata=<perf_file> \ -o <profile_file> or $ create_llvm_prof --binary=<vmlinux> --profile=<perf_file> \ --format=extbinary --out=<profile_file> Note that multiple AutoFDO profile files can be merged into one via: $ llvm-profdata merge -o <profile_file> <profile_1> ... <profile_n> 6) Rebuild the kernel using the AutoFDO profile file with the same config as step 1, (Note CONFIG_AUTOFDO_CLANG needs to be enabled): $ make LLVM=1 CLANG_AUTOFDO_PROFILE=<profile_file> Co-developed-by:
Han Shen <shenhan@google.com> Signed-off-by:
Han Shen <shenhan@google.com> Signed-off-by:
Rong Xu <xur@google.com> Suggested-by:
Sriraman Tallam <tmsriram@google.com> Suggested-by:
Krzysztof Pszeniczny <kpszeniczny@google.com> Suggested-by:
Nick Desaulniers <ndesaulniers@google.com> Suggested-by:
Stephane Eranian <eranian@google.com> Tested-by:
Yonghong Song <yonghong.song@linux.dev> Tested-by:
Yabin Cui <yabinc@google.com> Tested-by:
Nathan Chancellor <nathan@kernel.org> Reviewed-by:
Kees Cook <kees@kernel.org> Tested-by:
Peter Jung <ptr1337@cachyos.org> Signed-off-by:
Masahiro Yamada <masahiroy@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit fb6f20ecb121cef4d7946f834a6ee867c4e21b4a Author: Jan Kara <jack@suse.cz> Date: Thu Oct 17 12:28:23 2024 +0200 Deprecation period of reiserfs ends with the end of this year so it is time to remove it from the kernel. Acked-by:
Darrick J. Wong <djwong@kernel.org> Acked-by:
Christian Brauner <brauner@kernel.org> Signed-off-by:
Jan Kara <jack@suse.cz> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit 32b504854bd96f707a03c6ddecb0af9d7fbc4775 Author: HONG Yifan <elsk@google.com> Date: Tue, 8 Oct 2024 23:47:17 +0000 When building objtool against a sysroot that contains a stripped down version of the UAPI headers, the following error happens: In file included from arch/x86/decode.c:10: In file included from .../tools/arch/x86/include/asm/insn.h:10: In file included from <sysroot>/include/asm/byteorder.h:9: In file included from <sysroot>/include/linux/byteorder/little_endian.h:15: In file included from <sysroot>/include/linux/stddef.h:9: In file included from .../tools/include/linux/compiler_types.h:36: .../tools/include/linux/compiler-gcc.h:3:2: error: "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." 3 | #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." | ^ 1 error generated. As hinted by the error, this is because <sysroot>/include/linux/stddef.h (a stripped-down version of uapi/include/linux/stddef.h) includes linux/compiler_types.h directly. However, this gets resolved to tools/include/linux/compiler_types.h, which is not expected to be included directly. To resolve this, I added tools/include/uapi to the include paths when building objtool. With this trick, linux/stddef.h is resolved to tools/include/uapi/linux/stddef.h, which doesn't include linux/compiler_types.h. Signed-off-by:
HONG Yifan <elsk@google.com> Signed-off-by:
Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Radomir Vrbovsky authored
JIRA: https://issues.redhat.com/browse/RHEL-80715 commit ed1cb76ebdeb88cf0603b9cb543f43f09ab704a1 Author: Josh Poimboeuf <jpoimboe@kernel.org> Date: Thu, 3 Oct 2024 17:31:10 -0700 When kernel IBT is enabled, objtool detects all text references in order to determine which functions can be indirectly branched to. In text, such references look like one of the following: mov $0x0,%rax R_X86_64_32S .init.text+0x7e0a0 lea 0x0(%rip),%rax R_X86_64_PC32 autoremove_wake_function-0x4 Either way the function pointer is denoted by a relocation, so objtool just reads that. However there are some "lea xxx(%rip)" cases which don't use relocations because they're referencing code in the same translation unit. Objtool doesn't have visibility to those. The only currently known instances of that are a few hand-coded asm text references which don't actually need ENDBR. So it's not actually a problem at the moment. However if we enable -fpie, the compiler would start generating them and there would definitely be bugs in the IBT sealing. Detect non-relocated text references and handle them appropriately. [ Note: I removed the manual static_call_tramp check -- that should already be handled by the noendbr check. ] Reported-by:
Ard Biesheuvel <ardb@kernel.org> Tested-by:
Ard Biesheuvel <ardb@kernel.org> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by:
Radomir Vrbovsky <rvrbovsk@redhat.com>
-
Jan Stancek authored
Signed-off-by:
Jan Stancek <jstancek@redhat.com>
-
Jan Stancek authored
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-10/-/merge_requests/18 JIRA: https://issues.redhat.com/browse/RHEL-80306 CVE: CVE-2024-57901 Tested: boot-tested only Conflicts: None Signed-off-by:
Davide Caratti <dcaratti@redhat.com> Approved-by:
Xin Long <lxin@redhat.com> Approved-by:
Hangbin Liu <haliu@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Jan Stancek <jstancek@redhat.com>
-
Jan Stancek authored
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-10/-/merge_requests/46 To ensure we can provide critical fixes to z-stream/EUS during the RHEL10 lifetime, we need to analyze the impact of the requested symbols on the MM sst. This MR is modifies some of the MM structs by either hiding or padding them. These padding are needed to allow critical fixes in z-stream without breaking the KABI. JIRA: https://issues.redhat.com/browse/RHEL-80552 Upstream Status: RHEL only Signed-off-by:
Nico Pache <npache@redhat.com> Approved-by:
Čestmír Kalina <ckalina@redhat.com> Approved-by:
Waiman Long <longman@redhat.com> Approved-by:
Sabrina Dubroca <sdubroca@redhat.com> Approved-by:
Jan Stancek <jstancek@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Jan Stancek <jstancek@redhat.com>
-
Jan Stancek authored
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-10/-/merge_requests/55 JIRA: https://issues.redhat.com/browse/RHEL-75653 CVE: CVE-2025-21663 Signed-off-by:
Izabela Bakollari <ibakolla@redhat.com> Approved-by:
José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by:
Michal Schmidt <mschmidt@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Jan Stancek <jstancek@redhat.com>
-
- Mar 24, 2025
-
-
Julio Faracco authored
Signed-off-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/607 Description: Update drivers/platform/x86/pmc JIRA: https://issues.redhat.com/browse/RHEL-79463 Build Info: 67045302 Tested: Successful platform test results on Intel (intel-arrowlake-s-02) system. Signed-off-by:
Steve Best <sbest@redhat.com> Approved-by:
Tony Camuso <tcamuso@redhat.com> Approved-by:
David Arcari <darcari@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/573 JIRA: https://issues.redhat.com/browse/RHEL-81545 Upstream Status: linux.git CVE: CVE-2025-21791 Signed-off-by:
Guillaume Nault <gnault@redhat.com> Approved-by:
Antoine Tenart <atenart@redhat.com> Approved-by:
Florian Westphal <fwestpha@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/603 Description: Updates for Pseries vas_vm_ops struct JIRA: https://issues.redhat.com/browse/RHEL-83836 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=67038649 Tested: Verified Brew build test kernel RPMs Signed-off-by:
Mamatha Inamdar <minamdar@redhat.com> commit 05aa156e156ef3168e7ab8a68721945196495c17 Author: Haren Myneni <haren@linux.ibm.com> Date: Fri Dec 13 21:17:58 2024 -0800 powerpc/pseries/vas: Add close() callback in vas_vm_ops struct The mapping VMA address is saved in VAS window struct when the paste address is mapped. This VMA address is used during migration to unmap the paste address if the window is active. The paste address mapping will be removed when the window is closed or with the munmap(). But the VMA address in the VAS window is not updated with munmap() which is causing invalid access during migration. The KASAN report shows: [16386.254991] BUG: KASAN: slab-use-after-free in reconfig_close_windows+0x1a0/0x4e8 [16386.255043] Read of size 8 at addr c00000014a819670 by task drmgr/696928 [16386.255096] CPU: 29 UID: 0 PID: 696928 Comm: drmgr Kdump: loaded Tainted: G B 6.11.0-rc5-nxgzip #2 [16386.255128] Tainted: [B]=BAD_PAGE [16386.255148] Hardware name: IBM,9080-HEX Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.00 (NH1110_016) hv:phyp pSeries [16386.255181] Call Trace: [16386.255202] [c00000016b297660] [c0000000018ad0ac] dump_stack_lvl+0x84/0xe8 (unreliable) [16386.255246] [c00000016b297690] [c0000000006e8a90] print_report+0x19c/0x764 [16386.255285] [c00000016b297760] [c0000000006e9490] kasan_report+0x128/0x1f8 [16386.255309] [c00000016b297880] [c0000000006eb5c8] __asan_load8+0xac/0xe0 [16386.255326] [c00000016b2978a0] [c00000000013f898] reconfig_close_windows+0x1a0/0x4e8 [16386.255343] [c00000016b297990] [c000000000140e58] vas_migration_handler+0x3a4/0x3fc [16386.255368] [c00000016b297a90] [c000000000128848] pseries_migrate_partition+0x4c/0x4c4 ... [16386.256136] Allocated by task 696554 on cpu 31 at 16377.277618s: [16386.256149] kasan_save_stack+0x34/0x68 [16386.256163] kasan_save_track+0x34/0x80 [16386.256175] kasan_save_alloc_info+0x58/0x74 [16386.256196] __kasan_slab_alloc+0xb8/0xdc [16386.256209] kmem_cache_alloc_noprof+0x200/0x3d0 [16386.256225] vm_area_alloc+0x44/0x150 [16386.256245] mmap_region+0x214/0x10c4 [16386.256265] do_mmap+0x5fc/0x750 [16386.256277] vm_mmap_pgoff+0x14c/0x24c [16386.256292] ksys_mmap_pgoff+0x20c/0x348 [16386.256303] sys_mmap+0xd0/0x160 ... [16386.256350] Freed by task 0 on cpu 31 at 16386.204848s: [16386.256363] kasan_save_stack+0x34/0x68 [16386.256374] kasan_save_track+0x34/0x80 [16386.256384] kasan_save_free_info+0x64/0x10c [16386.256396] __kasan_slab_free+0x120/0x204 [16386.256415] kmem_cache_free+0x128/0x450 [16386.256428] vm_area_free_rcu_cb+0xa8/0xd8 [16386.256441] rcu_do_batch+0x2c8/0xcf0 [16386.256458] rcu_core+0x378/0x3c4 [16386.256473] handle_softirqs+0x20c/0x60c [16386.256495] do_softirq_own_stack+0x6c/0x88 [16386.256509] do_softirq_own_stack+0x58/0x88 [16386.256521] __irq_exit_rcu+0x1a4/0x20c [16386.256533] irq_exit+0x20/0x38 [16386.256544] interrupt_async_exit_prepare.constprop.0+0x18/0x2c ... [16386.256717] Last potentially related work creation: [16386.256729] kasan_save_stack+0x34/0x68 [16386.256741] __kasan_record_aux_stack+0xcc/0x12c [16386.256753] __call_rcu_common.constprop.0+0x94/0xd04 [16386.256766] vm_area_free+0x28/0x3c [16386.256778] remove_vma+0xf4/0x114 [16386.256797] do_vmi_align_munmap.constprop.0+0x684/0x870 [16386.256811] __vm_munmap+0xe0/0x1f8 [16386.256821] sys_munmap+0x54/0x6c [16386.256830] system_call_exception+0x1a0/0x4a0 [16386.256841] system_call_vectored_common+0x15c/0x2ec [16386.256868] The buggy address belongs to the object at c00000014a819670 which belongs to the cache vm_area_struct of size 168 [16386.256887] The buggy address is located 0 bytes inside of freed 168-byte region [c00000014a819670, c00000014a819718) [16386.256915] The buggy address belongs to the physical page: [16386.256928] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x14a81 [16386.256950] memcg:c0000000ba430001 [16386.256961] anon flags: 0x43ffff800000000(node=4|zone=0|lastcpupid=0x7ffff) [16386.256975] page_type: 0xfdffffff(slab) [16386.256990] raw: 043ffff800000000 c00000000501c080 0000000000000000 5deadbee00000001 [16386.257003] raw: 0000000000000000 00000000011a011a 00000001fdffffff c0000000ba430001 [16386.257018] page dumped because: kasan: bad access detected This patch adds close() callback in vas_vm_ops vm_operations_struct which will be executed during munmap() before freeing VMA. The VMA address in the VAS window is set to NULL after holding the window mmap_mutex. Fixes: 37e67648 ("powerpc/pseries/vas: Add VAS migration handler") Signed-off-by:
Haren Myneni <haren@linux.ibm.com> Signed-off-by:
Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/20241214051758.997759-1-haren@linux.ibm.com Signed-off-by:
Mamatha Inamdar <minamdar@redhat.com> Approved-by:
Steve Best <sbest@redhat.com> Approved-by:
Tony Camuso <tcamuso@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-
Julio Faracco authored
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/600 JIRA: https://issues.redhat.com/browse/RHEL-83951 Upstream Status: All commits are found in Linus's Git tree Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=67027203 Signed-off-by:
Nigel Croxon <ncroxon@redhat.com> Approved-by:
Vladis Dronov <vdronov@redhat.com> Approved-by:
Xiao Ni <xni@redhat.com> Approved-by:
Heinz Mauelshagen <heinzm@redhat.com> Approved-by:
CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by:
Julio Faracco <jfaracco@redhat.com>
-