RE: [PATCH 1/2] x86/traps: call cond_local_irq_disable before returning from exc_general_protection and math_error

2021-04-09 Thread Thomas Tai
> -Original Message- > From: Alexandre CHARTRE > Sent: April 9, 2021 5:06 AM > To: Thomas Tai ; t...@linutronix.de; > mi...@redhat.com; b...@alien8.de; x...@kernel.org > Cc: sean.j.christopher...@intel.com; l...@amacapital.net; > jar...@kernel.org; b...@suse.de; jet..

[tip: x86/urgent] x86/traps: Correct exc_general_protection() and math_error() return paths

2021-04-09 Thread tip-bot2 for Thomas Tai
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 632a1c209b8773cb0119fe3aada9f1db14fa357c Gitweb: https://git.kernel.org/tip/632a1c209b8773cb0119fe3aada9f1db14fa357c Author:Thomas Tai AuthorDate:Thu, 08 Apr 2021 13:28:33 -04:00 Committer

[PATCH 2/2] arch/x86: arch/sparc: tools/perf: fix typos in comments

2021-04-08 Thread Thomas Tai
s/insted/instead/ s/maintaing/maintaining/ Signed-off-by: Thomas Tai --- arch/sparc/vdso/vdso2c.c | 2 +- arch/x86/entry/vdso/vdso2c.c | 2 +- arch/x86/kernel/cpu/intel.c | 2 +- tools/perf/arch/x86/util/perf_regs.c | 4 ++-- 4 files changed, 5 insertions(+), 5

[PATCH 1/2] x86/traps: call cond_local_irq_disable before returning from exc_general_protection and math_error

2021-04-08 Thread Thomas Tai
cal_irq_disable() is needed because the ASM return code no longer disables interrupts. Follow the existing code as an example to use "goto exit" instead of "return" statement. Signed-off-by: Thomas Tai --- arch/x86/kernel/traps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 de

Re: [PATCH V2] dma-direct: Fix potential NULL pointer dereference

2020-09-17 Thread Thomas Tai
On 2020-09-17 12:44 p.m., Christoph Hellwig wrote: Thanks, applied to the dma-mapping for-next tree. Thank you, Christoph for suggesting and applying the fix. Thomas

Re: [PATCH V2] dma-direct: Fix potential NULL pointer dereference

2020-09-17 Thread Thomas Tai
On 2020-09-17 12:05 p.m., Konrad Rzeszutek Wilk wrote: On Wed, Sep 16, 2020 at 02:51:06PM -0600, Thomas Tai wrote: When booting the kernel v5.9-rc4 on a VM, the kernel would panic when printing a warning message in swiotlb_map(). The dev->dma_mask must not be a NULL pointer when calling

[PATCH V2] dma-direct: Fix potential NULL pointer dereference

2020-09-16 Thread Thomas Tai
xbe/0x120 __x64_sys_finit_module+0x1a/0x20 do_syscall_64+0x38/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Thomas Tai --- include/linux/dma-direct.h | 3 --- kernel/dma/mapping.c | 11 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/linux/dma-direct.h

[PATCH] dma-direct: Fix potential NULL pointer dereference

2020-09-15 Thread Thomas Tai
do_sys_finit_module+0xbe/0x120 ? __do_sys_finit_module+0xbe/0x120 __x64_sys_finit_module+0x1a/0x20 do_syscall_64+0x38/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Thomas Tai --- include/linux/dma-direct.h | 2 +- kernel/dma/swiotlb.c | 2 +- 2 files changed, 2 inserti

Re: [PATCH] dma-direct: Fix potential NULL pointer dereference

2020-09-15 Thread Thomas Tai
On 2020-09-15 10:07 a.m., Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 08:03:14AM -0600, Thomas Tai wrote: When booting the kernel v5.9-rc4 on a VM, the kernel would panic when printing a warning message in swiotlb_map(). It is because dev->dma_mask can potentially be a null poin

Re: [PATCH] dma-direct: Fix potential NULL pointer dereference

2020-09-15 Thread Thomas Tai
On 2020-09-15 11:09 a.m., Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 10:40:39AM -0400, Thomas Tai wrote: +++ b/include/linux/dma-direct.h @@ -62,9 +62,6 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size, { dma_addr_t end = addr + size - 1

Re: [PATCH] dma-direct: Fix potential NULL pointer dereference

2020-09-15 Thread Thomas Tai
On 2020-09-15 11:09 a.m., Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 10:40:39AM -0400, Thomas Tai wrote: +++ b/include/linux/dma-direct.h @@ -62,9 +62,6 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size, { dma_addr_t end = addr + size - 1

Re: [PATCH] dma-direct: Fix potential NULL pointer dereference

2020-09-15 Thread Thomas Tai
On 2020-09-15 10:26 a.m., Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 10:11:51AM -0400, Thomas Tai wrote: On 2020-09-15 10:07 a.m., Christoph Hellwig wrote: On Tue, Sep 15, 2020 at 08:03:14AM -0600, Thomas Tai wrote: When booting the kernel v5.9-rc4 on a VM, the kernel would panic

Re: Is: virtio_gpu_object_shmem_init issues? Was:Re: upstream boot error: general protection fault in swiotlb_map

2020-08-26 Thread Thomas Tai
Hello, I had a similiar panic when booting an ARM VM with kernel v5.9-rc1. git bisect identified following bad commit. After reverting the bad commit, the VM boot ok. Maybe we should look into the following commit. d323bb44e4d23802eb25d13de1f93f2335bd60d0 is the first bad commit commit d323bb4

iscsi_ibft: change ISCSI_IBFT depends on ACPI instead of ISCSI_IBFT_FIND

2019-07-18 Thread Thomas Tai
module, the arch/x86/kernel/setup.c won't be able to find the variable at compile time. Signed-off-by: Thomas Tai --- drivers/firmware/Kconfig | 5 +++-- drivers/firmware/iscsi_ibft.c | 4 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/Kconfig b/dr

Re: [PATCH v1] ras: Use consistent types for UUIDs

2019-01-24 Thread Thomas Tai
On 1/9/19 11:07 AM, Andy Shevchenko wrote: On Fri, Oct 05, 2018 at 09:33:05AM +0200, Christoph Hellwig wrote: On Fri, Jul 13, 2018 at 04:10:27PM +0300, Andy Shevchenko wrote: The commit 297b64c74385 ("ras: acpi / apei: generate trace event for unrecognized CPER section") brought incons

Re: [PATCH V3 1/1] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-10 Thread Thomas Tai
On 2018-05-10 09:37 AM, Bjorn Helgaas wrote: On Tue, May 08, 2018 at 07:04:56PM -0400, Thomas Tai wrote: When a PCIe AER occurs, the TLP header information is printed in the kernel message but it is missing from the tracepoint. A userspace program can use this information in the tracepoint to

Re: [PATCH V3 1/1] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-09 Thread Thomas Tai
On 2018-05-09 08:38 AM, Steven Rostedt wrote: On Tue, 8 May 2018 19:04:56 -0400 Thomas Tai wrote: When a PCIe AER occurs, the TLP header information is printed in the kernel message but it is missing from the tracepoint. A userspace program can use this information in the tracepoint to

[PATCH V3 1/1] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
ent/enable Example tracepoint output: cat /sys/kernel/debug/tracing/trace aer_event: :01:00.0 PCIe Bus Error: severity=Uncorrected, non-fatal, Completer Abort TLP Header={0x0,0x1,0x2,0x3} Signed-off-by: Thomas Tai --- drivers/pci/pcie/aer/aerdrv_errprint.c | 4 ++-- include/ras/ras_even

[PATCH V3 0/1] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
Hi Bjorn and Steven, Would you kindly review the patch for me? following are the changes details. Please feel free to comment. Change log since last version: V3: 1. use u8 for boolean variable 2. check tlp_header_valid before accessing tlp_header 3. replace sizeof(unsigned int) with 4 4. change th

Re: [PATCH V2] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
On 2018-05-08 05:07 PM, Steven Rostedt wrote: On Tue, 8 May 2018 15:57:00 -0400 Thomas Tai wrote: When a PCIe AER occurs, the TLP header information is printed in the kernel message but it is missing from the tracepoint. A userspace program can use this information in the tracepoint to

[PATCH V2 0/1] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
Hi Bjorn and Steven, Would you kindly review the patch for me? following are the changes details. Please feel free to comment. Change log since last version: V2: 1. use u8 for boolean variable 2. check tlp_header_valid before accessing tlp_header 3. replace sizeof(unsigned int) with 4 4. change th

[PATCH V2] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
ent/enable Example tracepoint output: cat /sys/kernel/debug/tracing/trace aer_event: :01:00.0 PCIe Bus Error: severity=Uncorrected, non-fatal, Completer Abort TLP Header={0x0,0x1,0x2,0x3} Signed-off-by: Thomas Tai --- drivers/pci/pcie/aer/aerdrv_errprint.c | 4 ++-- include/ras/ras_even

Re: [PATCH] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
On 2018-05-08 09:34 AM, Steven Rostedt wrote: On Tue, 8 May 2018 09:25:01 -0400 Thomas Tai wrote: TP_STRUCT__entry( __string( dev_name, dev_name) __field(u32,status ) __field(u8

Re: [PATCH] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-08 Thread Thomas Tai
[ ... ] --- a/include/ras/ras_event.h +++ b/include/ras/ras_event.h @@ -298,30 +298,42 @@ TRACE_EVENT(non_standard_event, TRACE_EVENT(aer_event, TP_PROTO(const char *dev_name, const u32 status, -const u8 severity), +const u8 severity, +

Re: [PATCH] PCI/AER: add pcie TLP header information in the tracepoint

2018-05-07 Thread Thomas Tai
On 2018-05-07 06:21 PM, Bjorn Helgaas wrote: [+cc Steve, Alex] On Mon, Apr 02, 2018 at 11:47:08AM -0400, Thomas Tai wrote: When a PCIe AER occurs, the TLP header information is printed in the kernel message but it is missing from the tracepoint. A userspace program can use this information

[PATCH] PCI/AER: add pcie TLP header information in the tracepoint

2018-04-02 Thread Thomas Tai
=Uncorrected, non-fatal, Completer Abort TLP Header={0x0,0x1,0x2,0x3} Signed-off-by: Thomas Tai --- drivers/pci/pcie/aer/aerdrv_errprint.c | 4 ++-- include/ras/ras_event.h| 20 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aer