Re: Kernel Oops on alpha with kernel version >=6.9.x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> In the past, there have been compiler optimizations that would use a large
> store to update a smaller variable, and then do small stores to fix up the
> clobbered areas.  These were all supposed to have been removed for C11.
> Might some linger in Alpha's compilers?


Hi again,

Making just these (see below) one-liner changes to tree_exp.h and
smp.c respectively, lets me boot kernel 6.12.5 on alpha without
passing any special rcu parameters to the kernel and it also lets me
load/unload my scsi kernel module. Is the alignment of structs just
giving gcc more room to clobber the stack without actually hitting
anything important or is it relevant for how kernel threads access
structs on weak memory-model architectures?

/Magnus

+++ kernel/rcu/tree_exp.h 2024-12-19 18:55:59.091893649 +0100
@@ -940,10 +939,10 @@
 void synchronize_rcu_expedited(void)
 {
  unsigned long flags;
- struct rcu_exp_work rew;
+ struct ____cacheline_aligned_in_smp rcu_exp_work rew;
  struct rcu_node *rnp;
  unsigned long s;


+++ kernel/smp.c        2024-12-19 19:01:20.592819628 +0100
@@ -631,7 +631,7 @@
int smp_call_function_single(int cpu, smp_call_func_t func, void *info,
                             int wait)
 {
        call_single_data_t *csd;
-       call_single_data_t csd_stack = {
+       struct ____cacheline_aligned_in_smp __call_single_data csd_stack = {
                .node = { .u_flags = CSD_FLAG_LOCK | CSD_TYPE_SYNC, },
        };
        int this_cpu;




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux