Re: where is __percpu_seg initialized?

2016-04-23 Thread Dave Tian
load_percpu_segment, which is called by switch_to_new_gdt in setup_per_cpu_areas. -daveti > On Apr 23, 2016, at 3:24 AM, wrote: > > Hi all: > I knew the kernel implement the per-cpu variable via __percpu_seg. For > example on x86 architecture, it's defined as: > >

Re: What does %P1 mean in gcc inline assembly?

2016-03-04 Thread Dave Tian
This ‘P’ is used to make gcc happy and work. Without ‘P’, this inline would be interpreted as: leal $-512(%esp), %eax With ‘P’, this inline is the thing we really want: leal -512(%esp), %eax Eventually, my gcc 4.9.2 does not compile with ‘P’ is missing. I am not sure if this is still the case

Re: How to correctly decode fun+X/Y

2015-12-03 Thread Dave Tian
addr2line -e /path_to_vmlinux c069369c -daveti > On Dec 3, 2015, at 1:14 PM, Matwey V. Kornilov > wrote: > > Hello, > > I have the following stack trace: > > [ 1351.381696] a.out S c0afb050 0 1676 1658 0x > [ 1351.387048] [] (__schedule)

Re: Obfuscate code GPL 2 - The source uses kernel structs and GPL2 API

2015-07-21 Thread Dave Tian
Off the topic maybe, this usb redirector could be built above usbip, which is in the mainline. -daveti On Jul 21, 2015, at 3:05 PM, Greg KH g...@kroah.com wrote: On Tue, Jul 21, 2015 at 03:49:22PM -0300, Lucas Tanure wrote: Hi, This company released a obfuscated kernel module in GPL

Re: Building Hello World LSM

2015-01-20 Thread Dave Tian
LSM should not appear in modprobe as they are not loaded anymore. Am I missing something or is this correct? Thanks, Thomas On Mon Jan 19 2015 at 3:45:15 PM Dave Tian dave.jing.t...@gmail.com mailto:dave.jing.t...@gmail.com wrote: LSM does not support dynamic module loading now. I

Re: Debugging an ARP issue (no resp to ARP requests)

2015-01-19 Thread Dave Tian
Check arp_* fields in https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt -daveti On Jan 19, 2015, at 7:11 PM, Mike Krinkin krinkin@gmail.com wrote: Hi, On Mon, Jan 19, 2015 at 03:42:58PM -0800, Mandeep

Re: Debugging an ARP issue (no resp to ARP requests)

2015-01-19 Thread Dave Tian
What about arp_filter=0 arp_ignore=0? -daveti On Jan 19, 2015, at 9:14 PM, Mandeep Sandhu mandeepsandhu@gmail.com wrote: Here's how my current setup looks like: $ ifconfig eth4 eth4 Link encap:Ethernet HWaddr 74:fe:48:04:e7:eb inet addr:192.168.1.1

Re: Building Hello World LSM

2015-01-19 Thread Dave Tian
LSM does not support dynamic module loading now. I have tried to create a new LSM based on yama and boot it as the default on my Ubuntu 14.04 (kernel 3.13). It works smoothly. I have NOT tried Fedora with kernel 3.18 yet but I do not think there would be some changes breaking LSM, which has

Re: Building Hello World LSM

2015-01-18 Thread Dave Tian
Did SELinux get loaded before your changes (Fedora uses SELinux by default)? Would you please post your security config? I still suspect that there was sth messed up in the config. Thanks, Dave On Jan 18, 2015, at 7:09 PM, Thomas F. J.-M. Pasquier tfj...@cam.ac.uk wrote: No, other LSM.

Re: Query on workqueue

2015-01-13 Thread Dave Tian
If you have to wait for the IRQ to be finished, do NOT use work queue, which belongs to bottom half. Just write your own IRQ handler, do sth there and register your handler. -daveti On Jan 13, 2015, at 8:51 AM, Victor Ascroft victorascr...@gmail.com wrote: Hello, Is it ok to use

Re: Greg Kroah-Hartman is doing an AMA on reddit :

2014-12-01 Thread Dave Tian
Thanks, Tom~ Fun to read and ask. -daveti On Dec 2, 2014, at 4:25 AM, Thomas t...@homeostasie.eu wrote: I know Greg K.H. used this mailing list. Maybe not everybody frequent reddit intensively. Greg Kroah-Hartman is doing an Ask Me Anything on reddit : A chance to asked more personal

Re: lots of connections in SYN_RECV state

2014-11-07 Thread Dave Tian
Latest kernel provides a TCP SYN Cookie feature to defense from SYN flooding. -daveti On Nov 6, 2014, at 11:58 PM, Silvan Jegen m...@sillymon.ch wrote: 2014-11-06 16:15,Puneet Agarwal: Is there a way to check the reason, why they do not answer to the SYN-ACK's? I don't think so. After

Re: lots of connections in SYN_RECV state

2014-11-07 Thread Dave Tian
Oops, my bad. I remember seeing sth on LWN for the 3.x kernel talking about a new feature related with TCP SYN. Thought this pretty old stuff was the one… -daveti On Nov 8, 2014, at 12:58 AM, valdis.kletni...@vt.edu wrote: On Fri, 07 Nov 2014 23:49:35 +0800, Dave Tian said: Latest kernel

Re: On spin_lock_irq_save and disabling specific interrupts.

2014-11-02 Thread Dave Tian
The simple answer would be we do not want to be interrupted during a interrupt handler. For SMP, there are other CPUs which can respond to IRQs. -daveti On Nov 2, 2014, at 2:30 PM, mind entropy mindentr...@gmail.com wrote: Hi, When I do spin_lock_irq it disables IRQ's which were

Re: doubt about interrupts and spinlocks

2014-10-24 Thread Dave Tian
If you are talking about the same spin_lock, once it is locked, it is locked. Others (even from other CPUs) have to ‘spin' util the lock is freed. -daveti On Oct 24, 2014, at 11:04 PM, Oscar Salvador osalvador.vilard...@gmail.com wrote: Hi! I have a doubt about interrupts and spin

Re: [PATCH] staging: Fix spacing between function name and parentheses

2014-10-11 Thread Dave Tian
On Sat, Oct 11, 2014 at 10:53 AM, Dave Tian dave.jing.t...@gmail.com wrote: It also works as value is surrounded by (), though I do not think the patch itself is right or useful. Dave Tian dave.jing.t...@gmail.com On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee sudipm.mukher

Re: [PATCH] staging: Fix spacing between function name and parentheses

2014-10-10 Thread Dave Tian
It also works as value is surrounded by (), though I do not think the patch itself is right or useful. Dave Tian dave.jing.t...@gmail.com On Oct 11, 2014, at 12:58 PM, Sudip Mukherjee sudipm.mukher...@gmail.com wrote: On Fri, Oct 10, 2014 at 09:55:48PM -0400, Nicholas Krause wrote: Fixes

MPI_WSIZE()

2014-10-01 Thread Dave Tian
Hi, Can someone point me to the implementation of MPI_WSIZE()? I assume it should be some old macro under linux/mpi.h. However, I am not able to find it within linux/crypto/mpi.h under RH kernel 2.6.32-358 or in the latest 3.x kernel. Thanks, Dave

usb mass storage ADSC cmd

2014-06-28 Thread Dave Tian
, // type 0, // value 0, // index buf,// recv buf 1, // size 10*HZ); // timeout Thanks, Dave Tian dave.jing.t...@gmail.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http

Re: Query regarding ARP request on a multi-homed system

2014-06-26 Thread Dave Tian
arp_filter may fit better. 0 - (default) The kernel can respond to arp requests with addresses from other interfaces. This may seem wrong but it usually makes sense, because it increases the chance of successful communication. IP addresses are owned by the complete

Re: More than 9 days on task 06 Eudyptula Challenge

2014-06-26 Thread Dave Tian
I tried to join and got no response yet… Is that site still alive/maintained? -daveti On Jun 26, 2014, at 2:29 PM, Lucas Tanure tan...@linux.com wrote: Sorry to bug this again. I'm waiting for task 06 more than 9 days. There are more guys with the same delay time in this task ? Thanks

Re: More than 9 days on task 06 Eudyptula Challenge

2014-06-26 Thread Dave Tian
Thanks for letting me know~ Will wait for the response then… -daveti On Jun 26, 2014, at 2:35 PM, Fernando Apesteguía fernando.apesteg...@gmail.com wrote: On Thu, Jun 26, 2014 at 11:32 PM, Dave Tian dave.jing.t...@gmail.com wrote: I tried to join and got no response yet… Is that site