b6ff24f7 | 08-Aug-2019 |
Valdis Kletnieks <valdis.kletnieks@vt.edu> |
RAS: Build debugfs.o only when enabled in Kconfig
In addition, the 0day bot reported this build error:
>> drivers/ras/debugfs.c:10:5: error: redefinition of 'ras_userspace_consumers' int ra
RAS: Build debugfs.o only when enabled in Kconfig
In addition, the 0day bot reported this build error:
>> drivers/ras/debugfs.c:10:5: error: redefinition of 'ras_userspace_consumers' int ras_userspace_consumers(void) ^~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/ras/debugfs.c:3:0: include/linux/ras.h:14:19: note: previous definition of 'ras_userspace_consumers' was here static inline int ras_userspace_consumers(void) { return 0; } ^~~~~~~~~~~~~~~~~~~~~~~
for a riscv-specific .config where CONFIG_DEBUG_FS is not set. Fix all that by making debugfs.o depend on that define.
[ bp: Rewrite commit message. ]
Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac@vger.kernel.org Cc: x86@kernel.org Link: http://lkml.kernel.org/r/7053.1565218556@turing-police
show more ...
|
60fd42d2 | 06-May-2019 |
Tony Luck <tony.luck@intel.com> |
RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there
The pfn and array files in (debugfs)/ras/cec are intended for debugging the CEC code itself. They are not needed on production sys
RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there
The pfn and array files in (debugfs)/ras/cec are intended for debugging the CEC code itself. They are not needed on production systems, so the default setting for this CONFIG option is "n".
[ bp: Have it with less ifdeffery by using IS_ENABLED(). ]
Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de>
show more ...
|
f57518cd | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Dump the different array element sections
When dumping the array elements, print them in the following format:
[ PFN | generation in binary | count ]
to be perfectly clear what all thos
RAS/CEC: Dump the different array element sections
When dumping the array elements, print them in the following format:
[ PFN | generation in binary | count ]
to be perfectly clear what all those sections are.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
b8b5ca66 | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Rename count_threshold to action_threshold
... which is the better, more-fitting name anyway.
Tony: - make action_threshold u64 due to debugfs accessors expecting u64. - rename the remai
RAS/CEC: Rename count_threshold to action_threshold
... which is the better, more-fitting name anyway.
Tony: - make action_threshold u64 due to debugfs accessors expecting u64. - rename the remaining: s/count_threshold/action_threshold/g
Co-developed-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
9632a329 | 21-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Sanity-check array on every insertion
Check the elements order in the array after every insertion.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux
RAS/CEC: Sanity-check array on every insertion
Check the elements order in the array after every insertion.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
d0e375e8 | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Fix potential memory leak
Free the array page if a failure is encountered while creating the debugfs nodes.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com>
RAS/CEC: Fix potential memory leak
Free the array page if a failure is encountered while creating the debugfs nodes.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
5cc6b16e | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Do not set decay value on error
When the value requested doesn't match the allowed (min,max) range, the @data buffer should not be modified with the invalid value because reading "decay_int
RAS/CEC: Do not set decay value on error
When the value requested doesn't match the allowed (min,max) range, the @data buffer should not be modified with the invalid value because reading "decay_interval" shows it otherwise as if the previous write succeeded.
Move the data write after the check.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
de0e0624 | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Check count_threshold unconditionally
The count_threshold should be checked unconditionally, after insertion too, so that a count_threshold value of 1 can cause an immediate offlining. I.e.
RAS/CEC: Check count_threshold unconditionally
The count_threshold should be checked unconditionally, after insertion too, so that a count_threshold value of 1 can cause an immediate offlining. I.e., offline the page on the *first* error encountered.
Add comments to make it clear what cec_add_elem() does, while at it.
Reported-by: WANG Chao <chao.wang@ucloud.cn> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac@vger.kernel.org Link: https://lkml.kernel.org/r/20190418034115.75954-3-chao.wang@ucloud.cn
show more ...
|
6d8e294b | 20-Apr-2019 |
Borislav Petkov <bp@suse.de> |
RAS/CEC: Fix pfn insertion
When inserting random PFNs for debugging the CEC through (debugfs)/ras/cec/pfn, depending on the return value of pfn_set(), multiple values get inserted per a single write
RAS/CEC: Fix pfn insertion
When inserting random PFNs for debugging the CEC through (debugfs)/ras/cec/pfn, depending on the return value of pfn_set(), multiple values get inserted per a single write.
That is because simple_attr_write() interprets a retval of 0 as success and claims the whole input. However, pfn_set() returns the cec_add_elem() value, which, if > 0 and smaller than the whole input length, makes glibc continue issuing the write syscall until there's input left:
pfn_set simple_attr_write debugfs_attr_write full_proxy_write vfs_write ksys_write do_syscall_64 entry_SYSCALL_64_after_hwframe
leading to those repeated calls.
Return 0 to fix that.
Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org>
show more ...
|
0ade0b62 | 16-Apr-2019 |
Cong Wang <xiyou.wangcong@gmail.com> |
RAS/CEC: Convert the timer callback to a workqueue
cec_timer_fn() is a timer callback which reads ce_arr.array[] and updates its decay values. However, it runs in interrupt context and the mutex pro
RAS/CEC: Convert the timer callback to a workqueue
cec_timer_fn() is a timer callback which reads ce_arr.array[] and updates its decay values. However, it runs in interrupt context and the mutex protection the CEC uses for that array, is inadequate. Convert the used timer to a workqueue to keep the tasks the CEC performs preemptible and thus low-prio.
[ bp: Rewrite commit message. s/timer/decay/gi to make it agnostic as to what facility is used. ]
Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Cc: <stable@vger.kernel.org> Link: https://lkml.kernel.org/r/20190416213351.28999-2-xiyou.wangcong@gmail.com
show more ...
|