Re: Some linux kernel with KAISER/KPTI patch can't work under qemu + haxm.

2018-01-15 Thread lepton
FYI, this was fixed by https://www.spinics.net/lists/stable/msg209612.html On Tue, Jan 9, 2018 at 5:36 PM, lepton wrote: > I tried some debug, it seems it crashed after switch CR3: > > > I tried 2 different kernel, so actual crash points are different, but > they have same patte

Re: Some linux kernel with KAISER/KPTI patch can't work under qemu + haxm.

2018-01-09 Thread lepton
0x8188717d 0x81887175 <+16>: mov%al,%gs:0xf0c7 0x8188717d <+24>: mov%rax,%cr3 0x81887180 <+27>: pop%rax < crashed here 0x81887181 <+28>: swapgs 0x81887184 <

Some linux kernel with KAISER/KPTI patch can't work under qemu + haxm.

2018-01-04 Thread lepton
It seems for some reason, some linux kernel with KAISER/KPTI patch can't work with qemu + haxm. The mainline kernel from Linus is fine. But the patch to 4.4/4.10 doesn't work. I am not familiar with HAXM and KPTI either. so not sure if this is a qemu bug or KPTI bug or haxm bug. The same kernel w

Re: [PATCH v2] mtd: Fix mtdblock for >4GB MTD devices

2017-03-01 Thread lepton
and rejected by mail list) On Mon, Feb 27, 2017 at 1:31 AM, Marek Vasut wrote: > On 02/22/2017 03:15 AM, Lepton Wu wrote: >> Change to use loff_t instead of unsigned long in some functions >> to make sure mtdblock can handle offset bigger than 4G in 32 bits mode. >> >>

[PATCH v2] mtd: Fix mtdblock for >4GB MTD devices

2017-02-21 Thread Lepton Wu
Change to use loff_t instead of unsigned long in some functions to make sure mtdblock can handle offset bigger than 4G in 32 bits mode. Signed-off-by: Lepton Wu --- Changes in v2: - Make the commit message more clearer and fix some format issues. drivers/mtd/mtdblock.c| 35

[PATCH] Make mtdblock can handle partition bigger than 4G.

2017-02-17 Thread Lepton Wu
Signed-off-by: Lepton Wu --- drivers/mtd/mtdblock.c| 33 + drivers/mtd/mtdblock_ro.c | 4 ++-- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c index bb4c14f83c75..3d2da76287a7 100644 --- a

Re: [PATCH] 2.6.22.6 user-mode linux: use address instead of value as argument in os_free_irq_by_cb

2007-09-24 Thread lepton
I added dump_stack and some printk in host kernel. The following is what I got when sys_reboot in host kernel is called, the first line is printing the process state and ptrace state and pid of the calling process. the following is the call path. Sep 22 14:25:49 pc kernel: linux Rptrace:

[PATCH] 2.6.22.6 user-mode linux: fix error in check_sysemu

2007-09-23 Thread lepton
it is a error do count++ here, it will let the following compare (after 8 lines) " if (!count)" always be false. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -X linux-2.6.22.6/Documentation/dontdiff -pr -U 8 linux-2.6.22.6/arch/um/os-Linux/start_up.c linux-2.6.22.

[RFC PATCH] 2.6.22.6 user-mode linux: No need to new a stack for clone without CLONE_VM

2007-09-22 Thread lepton
Since we just call clone without CLONE_VM, it is no need to use anoymous mmap to get a new stack frame. Let's keep codes simple. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -X linux-2.6.22.6-uml/Documentation/dontdiff -pru linux-2.6.22.6/arch/um/os-Linux/start_up.c linux-2

[RFC PATCH] 2.6.22.6 user-mode linux: before abort, we make it sure all children quit

2007-09-22 Thread lepton
executed by host. I think it is better to make sure all of our children process to quit when user mode linux kernel abort. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -X linux-2.6.22.6/Documentation/dontdiff -pru linux-2.6.22.6/arch/um/os-Linux/util.c linux-2.6.22.6-lepton/arch/um/os

[PATCH] 2.6.22.6 user-mode linux: use address instead of value as argument in os_free_irq_by_cb

2007-09-21 Thread lepton
seems that after the tracing thread is dead, the syscall to sys_reboot of the traced thread is executed by host. I don't know if it is another bug. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -X linux-2.6.22.6/Documentation/dontdiff -pru linux-2.6.22.6/arch/um/include

Re: [PATCH RESEND] 2.6.22.6 networking [ipv4]: fix wrong destination when reply packetes

2007-09-20 Thread lepton
Now icmp_reply is only called by icmp_echo and icmp_timestamp ip_send_reply is only called by tcp_v4_send_reset and tcp_v4_send_ack I think in all situations the ip_hdr(skb)->saddr is set and should be the destination of reply packets. If using rt->rt_src as destination is correct in some situati

[PATCH RESEND] 2.6.22.6 networking [ipv4]: fix wrong destination when reply packetes

2007-09-20 Thread lepton
loopback device. But I think just to use ip_hdr(skb)->saddr instead of rt->rt_src as destination to reply packetes is a more simple fix. Thanks Kenan Kalajdzic <[EMAIL PROTECTED]> for help me with more details about this problem. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]>

[RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder

2007-09-19 Thread lepton
Hi, For local src packets, it is better to update sk_route_caps in ip_route_me_harder. Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -pru -X linux-2.6.22.6/Documentation/dontdiff linux-2.6.22.6/net/ipv4/netfilter.c linux-2.6.22.6-lepton/net/ipv4/netfilter.c --- linux-2.6.22.6/ne

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
Mon, Sep 17, 2007 at 08:14:56PM -0700, [EMAIL PROTECTED] wrote: > On Tue, 18 Sep 2007, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: > > >In article <[EMAIL PROTECTED]> (at Mon, 17 Sep > >2007 19:20:44 -0700 (PDT)), David Miller <[EMAIL PROTECTED]> says: > >

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
Hi, sorry for my previous email. What I mean is icmp_reply and ip_send_reply in some situation will send out packets with wrong DESTINATION address. the source address is always correct. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMA

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
ply to 10.10.10.1 instead of simply reversing the source and destination addresses as required by the RFC. On Tue, Sep 18, 2007 at 11:26:44AM +0900, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: > In article <[EMAIL PROTECTED]> (at Mon, 17 Sep 2007 19:20:44 -0700 (PDT)), > David

[PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
Hi, In some situation, icmp_reply and ip_send_reply will send out packet with the wrong source addr, the following patch will fix this. I don't understand why we must use rt->rt_src in the current code, if this is a wrong fix, please correct me. Signed-off-by: Lepton Wu

[PATCH] 2.6.22.6 reiserfs: work around for dead loop in finish_unfinished

2007-09-16 Thread lepton
_truncate -> search_for_position_by_key. Then remove_save_link doesn't be called. We always get the same "save_link_key" in the while loop in finish_unfinished function. The following patch adds a check for the possible dead loop and just remove save link when deap loop. (against 2.6.22.6

[PATCH] 2.6.22.6 fix kernel panic on corrupted reiserfs directory

2007-09-14 Thread lepton
Hi, When reading corrupted reiserfs directory data, d_reclen could be a negative number or a big positive number, this can lead to kernel panic or oop. The following patch adds a sanity check. (against 2.6.20.4) Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -X linux-2.6.22.6-

I have two 1394 port in my computer, why did I get only one eth1394 interface?

2007-08-13 Thread lepton
Hi, My computer has two 1394 port, one is in the front panel, and another is in the back. I found with linux 1394 ethernet support, I only get one ethernet device named eth1. After read code, I found author says "This is where we add all of our ethernet * devices. One for each host." Then

Re: [PATCH] 2.6.20.4 fix kernel panic on corrupted reiserfs directory

2007-04-05 Thread lepton
Yes, you are right. I need more work on my trival patch. On Thu, Apr 05, 2007 at 01:34:42PM +0600, Alexander E. Patrakov wrote: > lepton wrote: > >Hi, > > When reading corrupted reiserfs directory data, d_reclen > > could be a negative number, then memcpy will overflow &g

[PATCH] 2.6.20.4 fix kernel panic on corrupted reiserfs directory

2007-04-05 Thread lepton
Hi, When reading corrupted reiserfs directory data, d_reclen could be a negative number, then memcpy will overflow kernel stack. This can lead to kernel panic. The following patch adds a sanity check. (against 2.6.20.4) Signed-off-by: Lepton Wu <[EMAIL PROTECTED]> diff -pru linux-

[PATCH 2.6.12.5]error condition fix in usbnet

2005-08-23 Thread lepton
Hi! I thinks this condition is strange, it could be a type error. See the following patch. Signed-off-by: Wu Tao <[EMAIL PROTECTED]> diff -pru linux-2.6-curr/drivers/usb/net/usbnet.c linux-2.6-curr-lepton/drivers/usb/net/usbnet.c --- linux-2.6-curr/drivers/usb/net/usbnet.c 2005-06-30

[PATCH 2.6.12.5]fix gl_skb/skb type error in genelink driver in usbnet in 2.6

2005-08-22 Thread lepton
-lepton/drivers/usb/net/usbnet.c --- linux-2.6-curr/drivers/usb/net/usbnet.c 2005-06-30 07:00:53.0 +0800 +++ linux-2.6-curr-lepton/drivers/usb/net/usbnet.c 2005-08-22 13:55:18.0 +0800 @@ -1922,7 +1922,7 @@ static int genelink_rx_fixup (struct usb

Why don't register a d_delete function for externfs_dentry_ops in 2.4 kernel?

2005-08-09 Thread lepton
Hi! I read about code of linux-2.4.31/arch/um/fs/hostfs/externfs.c I found you have defined a function named exterfs_d_delete, but you don't register this function in externfs_dentry_ops. This behavior is diffrent from the hostfs code in 2.6 kernel It will