On 2020/11/6 21:17, Eric Blake wrote:
> On 11/5/20 7:59 PM, AlexChen wrote:
>> Close the fd when the connect() fails.
>>
>> Reported-by: Euler Robot
>> Signed-off-by: Alex Chen
>
> Your From: line ("AlexChen") is spelled differently than your S-o-
On 2020/11/6 22:16, Philippe Mathieu-Daudé wrote:
> On 11/3/20 8:46 AM, AlexChen wrote:
>> The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5].
>> To avoid data access out of bounds, only if 'rn' is less than 3, we
>> can print env->mm
Either accept() fails or exits normally, we need to close the fd.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
contrib/plugins/lockstep.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 319bd44b83..5aad50869d 100644
--
Close the fd when the connect() fails.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
contrib/plugins/lockstep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index a696673dff..319bd44b83 100644
--- a/contrib/plugins/lockstep.
There are 3 resource leaks in contrib/plugins/lockstep.c, fix it.
v1->v2:
- add the cover letter
- modify the subject of the patch[2/2]
alexchen (2):
plugins: Fix resource leak in connect_socket()
plugins: Fix two resource leaks in setup_socket()
contrib/plugins/lockstep.c | 3 +++
1 f
On 2020/11/5 18:37, Alex Bennée wrote:
>
> AlexChen writes:
>
>> Kindly ping.
>
> Ahh sorry I missed these. Was there a cover letter for the series?
>
I forgot to send the cover letter, I will send the patch V2 with the cover
letter.
Thanks,
Alex Chen
The 'addr' would not be NULL after checking 'succ' is valid,
and it has been dereferenced in the previous code(args = g_strdup_printf()).
So the check on 'addr' in the tpm_test_swtpm_test() is redundant. Remove it.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
tests/qtest/tpm-tests.c |
Currently, the 'v' is not checked whether it is between 0 and 16,
which may result in an out-of-bounds access to the array 'xhci->intr[]'.
This is LP#1902112. Following is the reproducer provided in:
-->https://bugs.launchpad.net/qemu/+bug/1902112
=== Reproducer (build with --enable-sanitizers) ==
Kindly ping.
On 2020/10/28 21:45, AlexChen wrote:
> Either accept() fails or exits normally, we need to close the fd.
>
> Reported-by: Euler Robot
> Signed-off-by: AlexChen
> ---
> contrib/plugins/lockstep.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> d
Kindly ping.
On 2020/10/28 21:45, AlexChen wrote:
> Close the fd when connect() fails.
>
> Reported-by: Euler Robot
> Signed-off-by: AlexChen
> ---
> contrib/plugins/lockstep.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/contrib/plugins/lockstep.c b
We should use printf format specifier PRIu32 instead of "%d" for
argument of type 'uint32_t'.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
tests/qtest/arm-cpu-features.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/arm-cpu-features.c b/tests/q
On 2020/11/4 18:44, Thomas Huth wrote:
> On 04/11/2020 11.23, AlexChen wrote:
>> We should use printf format specifier "%u" instead of "%d" for
>> argument of type "unsigned int".
>>
>> Reported-by: Euler Robot
>> Signed-o
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
contrib/libvhost-user/libvhost-user.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/contrib/libv
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
tests/qtest/arm-cpu-features.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/arm-cpu-features.c b/tests
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
hw/ssi/imx_spi.c| 2 +-
hw/ssi/xilinx_spi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ssi/imx_spi.c b/hw/ssi/
In qos_build_main_args(), the pointer 'path' is dereferenced before
checking it is valid, which may lead to NULL pointer dereference.
So move the assignment to 'cmd_line' after checking 'path' is valid.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
tests/qtest/fuzz/qos_fuzz.c | 3 ++-
1
On 2020/11/3 17:53, Jiaxun Yang wrote:
>
>
> 在 2020/11/3 17:32, AlexChen 写道:
>> According to the loongson spec
>> (http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf)
>> and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we k
On 2020/11/3 21:26, Max Reitz wrote:
> On 21.10.20 11:12, AlexChen wrote:
>> The "qemu-common.h" include is not used, remove it.
>>
>> Reported-by: Euler Robot
>> Signed-off-by: AlexChen
>> ---
>> block/dmg-lzfse.c | 1 -
>> 1 file changed
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
In addition, fix two error format problems found by checkpatch.pl:
ERROR: space required after that ',' (ctx:VxV)
+fprintf(stderr,"%s attributes=0x%02x begin=%u size=%d\n",
On 2020/11/3 17:30, Kevin Wolf wrote:
> Am 02.11.2020 um 12:52 hat AlexChen geschrieben:
>> We should use printf format specifier "%u" instead of "%d" for
>> argument of type "unsigned int".
>> In addition, fix two error format problems found by
According to the loongson spec
(http://www.loongson.cn/uploadfile/cpu/3B1500/Loongson_3B1500_cpu_user_1.pdf)
and the macro definition(#define R_PERCORE_ISR(x) (0x40 + 0x8 * x)), we know
that the ISR size of per CORE is 8, so here we need to divide
(addr - R_PERCORE_ISR(0)) by 8, not 4.
Reported-by
The size of env->mmu.regs is 3, but the range of 'rn' is [0, 5].
To avoid data access out of bounds, only if 'rn' is less than 3, we
can print env->mmu.regs[rn]. In other cases, we can print
env->mmu.regs[MMU_R_TLBX].
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
target/microblaze/mmu.c
Kindly ping.
On 2020/10/26 17:05, AlexChen wrote:
> Fix some error style problems found by checkpatch.pl.
>
> alexchen (4):
> qga: Add spaces around operator
> qga: Delete redundant spaces
> qga: Open brace '{' following struct go on the same
> qga: switch
We should use printf format specifier "%u" instead of "%d" for
argument of type "unsigned int".
In addition, fix two error format problems found by checkpatch.pl:
ERROR: space required after that ',' (ctx:VxV)
+fprintf(stderr,"%s attributes=0x%02x begin=%u size=%d\n",
As we can see from the following function call stack, amaster and aslave
can not be NULL: char_pty_open() -> qemu_openpty_raw() -> openpty().
In addition, according to the API specification for openpty():
https://www.gnu.org/software/libc/manual/html_node/Pseudo_002dTerminal-Pairs.html,
the argumen
In exynos4210_fimd_update(), the pointer 's' is dereferenced before
checking it is valid, which may lead to NULL pointer dereference.
So move the assignment to global_width after checking 's' is valid.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
Reviewed-by: Philippe Mathieu-Daudé
---
hw
On 2020/11/2 17:16, Philippe Mathieu-Daudé wrote:
> On 11/2/20 5:39 AM, AlexChen wrote:
>> In exynos4210_fimd_update(), the pointer s is dereferinced before
>
> Typo dereferinced -> dereferenced.
>
>> being check if it is valid, which may lead to NULL pointer
We should use printf format specifier "%u" instead of "%i" for
argument of type "unsigned int".
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
hw/arm/pxa2xx.c | 2 +-
hw/arm/spitz.c | 2 +-
hw/arm/tosa.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/arm/pxa
On 2020/10/31 23:21, Peter Maydell wrote:
> On Sat, 31 Oct 2020 at 11:04, AlexChen wrote:
>>
>> As we can see from the following function call stack, the amaster and the
>> aslave
>> cannot be NULL: char_pty_open() -> qemu_openpty_raw() -> openpty().
>>
In exynos4210_fimd_update(), the pointer s is dereferinced before
being check if it is valid, which may lead to NULL pointer dereference.
So move the assignment to global_width after checking that the s is valid.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
hw/display/exynos4210_fimd.c
As we can see from the following function call stack, the amaster and the aslave
cannot be NULL: char_pty_open() -> qemu_openpty_raw() -> openpty().
In addition, the amaster and the aslave has been dereferenced at the beginning
of the openpty(). So the checks on amaster and aslave in the openpty()
.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
hw/display/omap_lcdc.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c
index fa4a381db6..58e659c94f 100644
--- a/hw/display/omap_lcdc.c
+++ b/hw/display/omap_lcdc.c
On 2020/10/30 22:35, Peter Maydell wrote:
> On Fri, 30 Oct 2020 at 14:29, Peter Maydell wrote:
>>
>> On Fri, 30 Oct 2020 at 10:23, AlexChen wrote:
>>>
>>> In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before
>>> being check if i
On 2020/10/30 22:28, Peter Maydell wrote:
> On Fri, 30 Oct 2020 at 10:23, AlexChen wrote:
>>
>> In exynos4210_fimd_update(), the pointer s is dereferenced before
>> being check if it is valid, which may lead to NULL pointer dereference.
>> So move the assignment to
In omap_lcd_interrupts(), the pointer omap_lcd is dereferenced before
being check if it is valid, which may lead to NULL pointer dereference.
So move the assignment to surface after checking that the omap_lcd is valid.
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
hw/display/omap_lcdc.c
In exynos4210_fimd_update(), the pointer s is dereferenced before
being check if it is valid, which may lead to NULL pointer dereference.
So move the assignment to global_width after checking that the s is valid
Reported-by: Euler Robot
Signed-off-by: Alex Chen
---
hw/display/exynos4210_fimd.c
The result has been checked to be NULL before, it cannot be NULL here,
so the check is redundant. Remove it.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
net/l2tpv3.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/l2tpv3.c b/net/l2tpv3.c
index
When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid()
returns 0 and assigns the result to *fd, so We have to check that *fd is 0,
not that fd is 0.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
contrib/rdmacm-mux/main.c | 2 +-
1 file changed, 1 insertion(+), 1
Kindly ping.
Thanks,
Alex
On 2020/10/21 17:12, AlexChen wrote:
> The "qemu-common.h" include is not used, remove it.
>
> Reported-by: Euler Robot
> Signed-off-by: AlexChen
> ---
> block/dmg-lzfse.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/
On 2020/10/28 15:44, Paolo Bonzini wrote:
> On 28/10/20 08:11, AlexChen wrote:
>> The current 'DEBUG_KVM' macro is defined in many files, and turning on
>> the debug switch requires code modification, which is very inconvenient,
>> so this series add an opt
When socket() fails, it returns -1, 0 is the normal return value and should not
return error.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
contrib/vhost-user-blk/vhost-user-blk.c | 2 +-
contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions
for socket call"?
>
Thanks for your suggestion. I will modify the commit message in next version.
Thanks,
Alex
> On Wed, Oct 28, 2020 at 10:10 AM AlexChen wrote:
>>
>> When socket() fails, it returns -1, 0 is the normal return value and should
>> not return
&g
When socket() fails, it returns -1, 0 is the normal return value and should not
return
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
contrib/vhost-user-blk/vhost-user-blk.c | 2 +-
contrib/vhost-user-scsi/vhost-user-scsi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions
Either accept() fails or exits normally, we need to close the fd.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
contrib/plugins/lockstep.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 319bd44b83..5aad50869d 100644
Close the fd when connect() fails.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
contrib/plugins/lockstep.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index a696673dff..319bd44b83 100644
--- a/contrib/plugins/lockstep.c
Wrapped printf calls inside debug macros (DPRINTF) in `if` statement.
This will ensure that printf function will always compile even if debug
output is turned off and, in turn, will prevent bitrot of the format
strings.
Signed-off-by: AlexChen
---
target/i386/kvm.c | 11 +--
1 file
Wrapped printf calls inside debug macros (DPRINTF) in `if` statement.
This will ensure that printf function will always compile even if debug
output is turned off and, in turn, will prevent bitrot of the format
strings.
Signed-off-by: AlexChen
---
accel/kvm/kvm-all.c | 10 --
1 file
rintf always compile in debug output
which will prevent bitrot of the format strings by referring to the
commit(08564ecd: s390x/kvm: make printf always compile in debug output).
alexchen (4):
configure: Add a --enable-debug-kvm option to configure
kvm: replace DEBUG_KVM to CONFIG_DEBUG_KV
This patch allows CONFIG_DEBUG_KVM to be defined when passing
an option to the configure script.
Signed-off-by: AlexChen
---
configure | 10 ++
1 file changed, 10 insertions(+)
diff --git a/configure b/configure
index e6754c1e87..2cdef5be4c 100755
--- a/configure
+++ b/configure
Now we can control the definition of DPRINTF by CONFIG_DEBUG_KVM,
so let's replace DEBUG_KVM with CONFIG_DEBUG_KVM.
Signed-off-by: AlexChen
---
accel/kvm/kvm-all.c | 3 +--
target/i386/kvm.c | 4 +---
target/mips/kvm.c | 6 --
target/s390x/kvm.c | 6 +++---
4 files chang
Fix some error style problems found by checkpatch.pl.
alexchen (4):
qga: Add spaces around operator
qga: Delete redundant spaces
qga: Open brace '{' following struct go on the same
qga: switch and case should be at the same indent
qga/channel-win32.c | 6 ++---
qga/comman
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
qga/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/qga/main.c b/qga/main.c
index 308ebd6581..69660d9abd 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -694,8 +694,7 @@ DWORD WINAPI service_ctrl_handler(DWORD ctrl
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
qga/main.c | 52 ++--
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/qga/main.c b/qga/main.c
index 69660d9abd..33e510ba19 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -280,20
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
qga/commands-win32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 2c341c7bea..de6e07f275 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1234,7
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
qga/channel-win32.c | 6 +++---
qga/commands-posix.c | 4 ++--
qga/commands-win32.c | 24
qga/commands.c | 4 ++--
qga/main.c | 4 ++--
5 files changed, 21 insertions(+), 21 deletions(-)
diff
The "qemu-common.h" include is not used, remove it.
Reported-by: Euler Robot
Signed-off-by: AlexChen
---
block/dmg-lzfse.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/dmg-lzfse.c b/block/dmg-lzfse.c
index 19d25bc646..6798cf4fbf 100644
--- a/block/dmg-lzfse.c
+++ b
Signed-off-by: AlexChen
---
io/channel-websock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io/channel-websock.c b/io/channel-websock.c
index 47a0e941d9..e94a1fcf99 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -746,7 +746,7 @@ static int
Kindly ping.
On 2020/8/26 18:15, AlexChen wrote:
> From: AlexChen
>
> The 'kdgb' is allocating memory in get_kdbg(), but it is not freed
> in both fill_header() and fill_context() failed branches, fix it.
>
> Signed-off-by: AlexChen
> ---
> contrib/elf2dmp
On 2020/8/26 18:18, Daniel P. Berrangé wrote:
> On Wed, Aug 26, 2020 at 06:14:48PM +0800, AlexChen wrote:
>> > From: alexchen
>> >
>> > The fd will leak when (a.st_ino == b.st_ino) is true, fix it.
> That is *INTENTIONAL*. We're holding a lock on the file a
From: AlexChen
The 'kdgb' is allocating memory in get_kdbg(), but it is not freed
in both fill_header() and fill_context() failed branches, fix it.
Signed-off-by: AlexChen
---
contrib/elf2dmp/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/elf2
From: alexchen
The fd will leak when (a.st_ino == b.st_ino) is true, fix it.
Signed-off-by: AlexChen
---
util/oslib-posix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index ad8001a4ad..74cf5e9c73 100644
--- a/util/oslib-posix.c
+++ b/util/oslib
61 matches
Mail list logo