Skip to content

Conversation

@PlaidCat
Copy link
Collaborator

@PlaidCat PlaidCat commented Mar 28, 2025

This is just the initialization of the configs based on @kerneltoast recommendations and taking the kernel-ark/rhel-6.12.15 kernel configs as a base. We will continue making our own modifications as we sync with future linux-6.12.y olddefconfig.

Configs Commit

Add CIQ configs
Adding configs based of Fedora-ARK default config from 6.12.15.

We are modifying these with the following configs where available
CONFIG_MODIFY_LDT_SYSCALL=n
CONFIG_LEGACY_VSYSCALL_NONE=n
These options are for old software support which adds performance
overhead and potential attack surfaces with go against the CIQ LT
kernels priority of performance and security.

CONFIG_LIVEPATCH=n
We do not have Live patching on for any road-map, is not even supported
as a config for ARM.

CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
This should be enabled, it often improves performance funnily enough

CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_HZ=100
These are set to increase throughput CONFIG_PREEMPT_VOLUNTARY=y (default
Fedora config) but CONFIG_HZ=100 for higher throughput over the x86_64
default of CONFIG_HZ=1000 which provides lower latency.

x86_64 built and ran kselftests without blowing up locally, I messed up and didn't collect them into a file so they are actively rerunning.

6.12.15-_jmaple__ciq-6.12.y-b3fa7c3036f6+.kselftest.log

[jmaple@devbox code]$ grep '^ok ' 6.12.15-_jmaple__ciq-6.12.y-b3fa7c3036f6+.kselftest.log  | wc -l
522

Adding configs based of Fedora-ARK default config from 6.12.15.

We are modifying these with the following configs where available
CONFIG_MODIFY_LDT_SYSCALL=n
CONFIG_LEGACY_VSYSCALL_NONE=n
These options are for old software support which adds performance
overhead and potential attack surfaces with go against the CIQ LT
kernels priority of performance and security.

CONFIG_LIVEPATCH=n
We do not have Live patching on for any road-map, is not even supported
as a config for ARM.

CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
This should be enabled, it often improves performance funnily enough

CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_HZ=100
These are set to increase throughput CONFIG_PREEMPT_VOLUNTARY=y (default
Fedora config) but CONFIG_HZ=100 for higher throughput over the x86_64
default of CONFIG_HZ=1000 which provides lower latency.
Setting up the default build configs to ensure everything builds when we
update and rebase.
@PlaidCat PlaidCat force-pushed the {jmaple}_ciq-6.12.y branch from 6f079a8 to 322b4ae Compare March 28, 2025 16:48
@PlaidCat PlaidCat self-assigned this Mar 28, 2025
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🥌

@PlaidCat PlaidCat merged commit 322b4ae into ciq-6.12.y Mar 28, 2025
6 checks passed
@PlaidCat PlaidCat deleted the {jmaple}_ciq-6.12.y branch March 28, 2025 20:51
github-actions bot pushed a commit that referenced this pull request Nov 23, 2025
xfs/286 produced this report on my test fleet:

 ==================================================================
 BUG: KFENCE: out-of-bounds read in memcpy_orig+0x54/0x110

 Out-of-bounds read at 0xffff88843fe9e038 (184B right of kfence-#184):
  memcpy_orig+0x54/0x110
  xrep_symlink_salvage_inline+0xb3/0xf0 [xfs]
  xrep_symlink_salvage+0x100/0x110 [xfs]
  xrep_symlink+0x2e/0x80 [xfs]
  xrep_attempt+0x61/0x1f0 [xfs]
  xfs_scrub_metadata+0x34f/0x5c0 [xfs]
  xfs_ioc_scrubv_metadata+0x387/0x560 [xfs]
  xfs_file_ioctl+0xe23/0x10e0 [xfs]
  __x64_sys_ioctl+0x76/0xc0
  do_syscall_64+0x4e/0x1e0
  entry_SYSCALL_64_after_hwframe+0x4b/0x53

 kfence-#184: 0xffff88843fe9df80-0xffff88843fe9dfea, size=107, cache=kmalloc-128

 allocated by task 3470 on cpu 1 at 263329.131592s (192823.508886s ago):
  xfs_init_local_fork+0x79/0xe0 [xfs]
  xfs_iformat_local+0xa4/0x170 [xfs]
  xfs_iformat_data_fork+0x148/0x180 [xfs]
  xfs_inode_from_disk+0x2cd/0x480 [xfs]
  xfs_iget+0x450/0xd60 [xfs]
  xfs_bulkstat_one_int+0x6b/0x510 [xfs]
  xfs_bulkstat_iwalk+0x1e/0x30 [xfs]
  xfs_iwalk_ag_recs+0xdf/0x150 [xfs]
  xfs_iwalk_run_callbacks+0xb9/0x190 [xfs]
  xfs_iwalk_ag+0x1dc/0x2f0 [xfs]
  xfs_iwalk_args.constprop.0+0x6a/0x120 [xfs]
  xfs_iwalk+0xa4/0xd0 [xfs]
  xfs_bulkstat+0xfa/0x170 [xfs]
  xfs_ioc_fsbulkstat.isra.0+0x13a/0x230 [xfs]
  xfs_file_ioctl+0xbf2/0x10e0 [xfs]
  __x64_sys_ioctl+0x76/0xc0
  do_syscall_64+0x4e/0x1e0
  entry_SYSCALL_64_after_hwframe+0x4b/0x53

 CPU: 1 UID: 0 PID: 1300113 Comm: xfs_scrub Not tainted 6.18.0-rc4-djwx #rc4 PREEMPT(lazy)  3d744dd94e92690f00a04398d2bd8631dcef1954
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-4.module+el8.8.0+21164+ed375313 04/01/2014
 ==================================================================

On further analysis, I realized that the second parameter to min() is
not correct.  xfs_ifork::if_bytes is the size of the xfs_ifork::if_data
buffer.  if_bytes can be smaller than the data fork size because:

(a) the forkoff code tries to keep the data area as large as possible
(b) for symbolic links, if_bytes is the ondisk file size + 1
(c) forkoff is always a multiple of 8.

Case in point: for a single-byte symlink target, forkoff will be
8 but the buffer will only be 2 bytes long.

In other words, the logic here is wrong and we walk off the end of the
incore buffer.  Fix that.

Cc: stable@vger.kernel.org # v6.10
Fixes: 2651923 ("xfs: online repair of symbolic links")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants