Re: Why amdgpu pro does not work on kernel 4.10?

2017-02-12 Thread valdis . kletnieks
On Mon, 13 Feb 2017 05:26:50 +0330, Ali Aminian said: > Thank you for your response. > It does not work means: > 1_ I have downloaded amdgpu-pro driver from AMD website and installed it. Complain to AMD then, because.. > 2_ I have compiled linux kernel 4.10 and 4.9 with oldconfig. > error: too

Re: vmsplice returned "bad address"

2016-08-18 Thread Valdis . Kletnieks
On Fri, 19 Aug 2016 00:19:47 +0800, Teoh Choon Zone said: > I have a driver which will dma_alloc a CMA region and return the address to > my user space program, the program then will mmap /dev/mem according to the > address offset. Step 1: Figure out whether your driver is returning a physical

Re: [help] How to test kernel code that I wrote?

2016-08-25 Thread Valdis . Kletnieks
On Thu, 25 Aug 2016 16:04:58 +0800, Louie Lu said: > Is that I'll need to use VM to test the code, > or just test it on my laptop? > > I found that if sometimes I broke my code (e.g. can't remove modules, > modules panic ...etc) > I need to reboot my laptop to recover from this situation. > > Is

Re: [help] How to test kernel code that I wrote?

2016-08-25 Thread Valdis . Kletnieks
On Wed, 24 Aug 2016 18:18:18 +0800, Louie Lu said: > in this doc have mention, there have hardirq, softirq. > How can I test it from these irq method? > First, figure out if the code in question should even be called from those contexts, or if it's a bug if that happens. Hard and soft IRQ

Re: check if a kernel page is read-only

2016-09-05 Thread Valdis . Kletnieks
On Mon, 05 Sep 2016 12:59:46 +0200, Oscar Salvador said: > I'm writing a module to read/write kernel memory, and for this I'd like to > check if a page is marked as read-only Actually, you almost certainly want to do a *much* stricter check than that. If your module is doing unrestricted

Re: Linux Security Module listsecurity (and security xattr hooks) only one called?

2016-09-06 Thread Valdis . Kletnieks
On Tue, 06 Sep 2016 07:05:54 -0400, "Pasquier, Thomas" said: > If one of the module return a non-zero value, the other are not called. > That means that the list of security of xattr is not built (or rather that > it only contains the first module being called), as the lenght of inserted That's

Re: check if a kernel page is read-only

2016-09-06 Thread Valdis . Kletnieks
On Tue, 06 Sep 2016 13:23:48 +0200, Oscar Salvador said: > I guess I explained it wrong. I'm not writing neither a rootkit nor a > module which is messing with kernel memory. I'm writing a module to be able > to r/w kernel/ user linear memory. It's for a forensic tool. And this, my friends, is an

Re: Request Chinese mail list and FrontPage

2016-09-06 Thread Valdis . Kletnieks
On Tue, 06 Sep 2016 20:04:20 -0300, "Daniel." said: > We're opensource developers, when we are not happy with something, we > fork it... lol. Still, I'm brazillian and have already found other > brazillians at this list. The problem isn't finding other Brazilians. It's having a sufficiently

Re: check if a kernel page is read-only

2016-09-07 Thread Valdis . Kletnieks
On Wed, 07 Sep 2016 15:47:30 +0200, Oscar Salvador said: > You are right regarding security stuff, but was not my will either > bypassing memory protections or crashing the system. Never said that was your intent. The problem is that given that tool, some other person can abuse your module with

Re: Device Driver problem

2016-08-30 Thread Valdis . Kletnieks
On Tue, 30 Aug 2016 11:59:57 +0530, Gurpartap Singh said: > I am using Quectel gsm module on Arm board from olimex. While attaching the > Device via USB, dmesg shows following: > > *qmi_wwan 2-1:1.0: not on our whitelist - ignored* drivers/net/usb/qmi_wwan.c has a list of devices the driver is

Re: insmod failing to insert a simple module

2016-09-29 Thread Valdis . Kletnieks
On Thu, 29 Sep 2016 17:54:55 +0530, Madhu K said: > Linux BLR-PCUB-01141 4.5.0-rc7 > vermagic: 4.5.0-rc7+ SMP mod_unload modversions 686 One is a straight 4.5.0-rc7 (and why are you using that and not the released 4.5.0, anyhow?), and the other is 4.5.0-rc7+ with a plus sign, which means

Re: [PATCH] INITEST: Documentation: Explains how INITEST works.

2016-09-30 Thread Valdis . Kletnieks
On Fri, 30 Sep 2016 07:49:50 +0200, Bjørn Mork said: > 1) There should be *some* body text describing the patch, even for a very >basic change which is explained in full in subject. This goes first >in the body, separated from the tags with a single empty line. And to add to what he

Re: if/else block default coding style question

2016-10-08 Thread Valdis . Kletnieks
On Sat, 08 Oct 2016 10:40:37 -, Nicholas Mc Guire said: >} else if (rtlpcipriv->bt_coexist.bt_service == BT_PAN) { >rtl_write_byte(rtlpriv, REG_GPIO_MUXCFG, tmp1byte); >} else { >rtl_write_byte(rtlpriv, REG_GPIO_MUXCFG, tmp1byte); >} That *does* smell like

Re: if/else block default coding style question

2016-10-08 Thread Valdis . Kletnieks
On Sat, 08 Oct 2016 15:19:18 -, Nicholas Mc Guire said: > Thats actually the cause of this mail - it just becaem obvious > that some of these if==else are intentional At the very least, the intentional ones need a comment similar to the one found in file.c > Now reporting these cases if

Re: Difference between config, menuconfig and defconfig

2016-09-19 Thread Valdis . Kletnieks
On Mon, 19 Sep 2016 16:20:12 +0530, Madhu K said: > That means kernel maintainer will define default configuration for his > architecture not for all architecture, I mean kernel maintainer might have > defined configuration for x86, not for ARM, POWERPC and all, is my > understanding correct?, if

Re: Q: what is the need for console write callback if there is serial tx (start_tx) ?

2016-09-15 Thread Valdis . Kletnieks
On Thu, 15 Sep 2016 23:19:51 +0300, Ran Shalit said: > Isn't writing to console, the same as outputing chars to serial ? No. For instance, consider any laptop where "console" is an LCD screen, and if it's recent hardware, there isn't a UART anywhere in the device, nor is there a serial port to

Re: Difference between config, menuconfig and defconfig

2016-09-19 Thread Valdis . Kletnieks
On Mon, 19 Sep 2016 10:58:35 -0400, Aruna Hewapathirane said: > make menuconfig: > An ncurses-based pseudo-graphical menu (only text input). Navigate through > the menu to modify the > desired options. Within menuconfig, use the / key to search modules by name. Actually, / searches (in a

Re: How to search topics in The Kernelnewbies Archives?

2016-09-21 Thread Valdis . Kletnieks
On Wed, 21 Sep 2016 14:27:03 +0800, Chi Wang said: > https://lists.kernelnewbies.org/pipermail/kernelnewbies/ > > Is there a general way to do searching in this archive? > Or I have to download all the packages? Google can do wonders. Say you're trying to find the discussion 2 years ago about

Re: SMP on different cores.

2016-09-22 Thread Valdis . Kletnieks
On Thu, 22 Sep 2016 16:46:12 +0530, Madhu K said: > If i want to enable SMP, cores should be of same version( ex: both core > should ARM 7 ) or we could enable SMP on different version. There's kernel support for the bigLITTLE architecture in some ARM chips, but since it depends on being able to

Re: Does a kernel developer need a hardware to do kernel development?

2016-09-30 Thread Valdis . Kletnieks
On Fri, 30 Sep 2016 23:07:11 -, Amit Kumar said: > Does a kernel developer need a hardware (e.g. board) to do kernel > development? That *really* depends on exactly what part of the kernel the developer is working on. If you're monkeying with the IPv6 code in the networking stack, or

Re: Device Tree

2016-10-25 Thread Valdis . Kletnieks
On Tue, 25 Oct 2016 11:51:38 +0530, Madhu K said: > If in case Device tree is not there, where and how to pass the hardware > information to the linux kernel. For many types of hardware, the bus protocol provides a standard way to find everything on the bus. And that sort of bus scanning is how

Re: What subsystem!?

2016-10-25 Thread Valdis . Kletnieks
On Tue, 25 Oct 2016 10:33:47 -0200, "Daniel." said: > I've been studying linux for some time now. I still see my self as an > begginer, but that's not a bad thing. I struggling to decide what > subsystem to focus right know. I've said it before, and I'll say it again: If you have to ask others

Re: Device Tree

2016-10-25 Thread Valdis . Kletnieks
On Tue, 25 Oct 2016 15:46:05 +0530, Madhu K said: > You mean In non embedded system( laptop, desktop and server ) DT is not at > all required? Basically, that's correct. Those types of systems have already evolved ways (boot loaders, ACPI, and so on) to do things so there's no real need to use

Re: Kernelnewbies Digest, Vol 71, Issue 26

2016-10-21 Thread Valdis . Kletnieks
On Fri, 21 Oct 2016 17:04:50 -, Laurence Rochfort said: > The BBC Micro which was 6502 based had an add on that let you connect a Z80 > straight onto the same bus. If I remember correctly, that one was basically an either/or - you could boot the 6502, or the Z80, but you couldn't run both at

Re: Is that possible to implement a single machine with heterogeneous architecture.

2016-10-21 Thread Valdis . Kletnieks
On Fri, 21 Oct 2016 03:10:28 -, Douglas Su said: > Is that possible to install multiple CPUs which have different architecture > on a single machine? For example, on a single machine with two different cpu > sockets for X86 and MIPS cpu respectively, and these two cpus are > inter-connected

Re: TCP as a module

2016-11-14 Thread Valdis . Kletnieks
On Tue, 15 Nov 2016 00:14:43 -0500, "Md. Islam" said: > I'm trying to write a Media-friendly TCP (by implementing a new > option). Please let me know if you have any suggestion. Step 0: Figure out what the new option is, and why you think it will be media-friendly. Hint: some 80% of internet

Re: TCP as a module

2016-11-12 Thread Valdis . Kletnieks
On Sat, 05 Nov 2016 21:10:19 -0400, "Md. Islam" said: > Currently TCP is statically linked to the kernel. How can I make it a > loadable module? I need to modify TCP (tcp_input.c and tcp_output.c). What problem are you trying to solve by modifying those two? There may be other approaches to do

Re: ip rule suppress_prefixlength

2016-10-31 Thread Valdis . Kletnieks
On Sun, 30 Oct 2016 12:25:50 +0100, Matthias Peter Walther said: > root@des1 ~ # ip rule > 0:from all lookup local > 32765:from all iif lo lookup ffnet suppress_prefixlength 0 > 32766:from all lookup main > 32767:from all lookup default > (ffnet is table 42) > root@des1 ~ # ip r s

Re: where's the definition of trace_kfree_skb?

2017-03-28 Thread valdis . kletnieks
On Tue, 28 Mar 2017 16:15:57 +0800, Shiyao Ma said: > I saw this function invocation, > trace_kfree_skb(skb, __builtin_return_address(0)); > > so I grepped the source for "trace_kfree_skb", but I found no where it's > defined. For some uses, the Linux kernel forms a definition via the

Re: 0 bit shift

2017-03-29 Thread valdis . kletnieks
On Thu, 30 Mar 2017 09:59:44 +1100, "Tobin C. Harding" said: > What is the reason for the zero bit shift in this code please? > > #define SDIO_STATE_PRESENT(1<<0) /* present in sysfs */ > > file: include/linux/mmc/sdio_func.h Most likely, to indicate that it's a bitmask in the

Re: Have been tested with 4 usb wifi adaptor, all loss packet when ping to router

2017-03-31 Thread valdis . kletnieks
On Sat, 01 Apr 2017 02:14:18 +0800, Hao Zhang said: > hi all, > i use usb wifi dongle rt5370/rt3070/rtl8192cus/rtl8178 on embeded > board based kernel 3.10.0 , they all loss packet when ping to router, > and then ifconfig can show below that > it seem some packet were been dropped, What does that

Re: Rebase against linux-next tree?

2017-03-15 Thread valdis . kletnieks
On Thu, 16 Mar 2017 10:26:48 +0900, Greg KH said: > On Tue, Mar 14, 2017 at 07:52:36PM -0600, Perry Hooker wrote: > > $ git checkout next-20170310 > > What am I doing wrong / where should I go for more info? > > linux-next is usually a day or so behind my tree, so maybe there were > other

Re: Merging device drivers to LK tree

2017-03-14 Thread valdis . kletnieks
On Tue, 14 Mar 2017 22:54:37 +0300, alexhoppus said: > No, I just try to understand the process. I don't fully understand what > is the role of independent developer in the process of submitting new > drivers to LK. What I mean is - hardware device vendors always ship > device driver with their

Re: Merging device drivers to LK tree

2017-03-14 Thread valdis . kletnieks
On Tue, 14 Mar 2017 21:59:20 +0100, Bjørn Mork said: > And another one: > > 5.) vendor independent class drivers > > > IMHO perfect for the independent developer since there will be > documentation available. The USB class specs are freely available for > example. Hmm... /sys/class has a bunch

Re: driver dev mailing lists

2017-03-14 Thread valdis . kletnieks
On Wed, 15 Mar 2017 11:58:52 +1100, "Tobin C. Harding" said: > What is the difference between these two mailing lists please? > > 1) de...@driverdev.osuosl.org > 2) de...@linuxdriverproject.org > > drivers/staging/ks7010/TODO asks for patches to be sent to > the second but

Re: USB shutdown issue

2017-04-11 Thread valdis . kletnieks
On Wed, 12 Apr 2017 09:49:38 +0900, manty kuma said: > The source code that is doing this is here - > http://androidxref.com/kernel_3.10/xref/drivers/usb/core/hub.c#4693 4693/* 4694 * EM interference sometimes causes badly 4695

How to contribute (was Re: Kernelnewbies Digest, Vol 77, Issue 7

2017-04-12 Thread valdis . kletnieks
On Wed, 12 Apr 2017 10:30:27 +0800, Tran Ly Vu said: > How exactly do i start to contribute to linux community, i.e fix bug, etc Step 0: Figure out *why* you want to contribute to the Linux kernel. Did your boss just tell you that you have 6 weeks to write a driver for your company's new

Re: How to contribute (was Re: Kernelnewbies Digest, Vol 77, Issue 7

2017-04-12 Thread valdis . kletnieks
On Wed, 12 Apr 2017 20:25:11 +0200, "Arthur Brainville (Ybalrid)" said: > So, the best "branch" of developement to test if it doesn't break our > system is the linux-next branch, or the mainline kernel (currently > tagged by Linus as 4.11-RC6) ? Depends how brave you are. Linus is currently at

Re: How to browse the code

2017-04-13 Thread valdis . kletnieks
On Thu, 13 Apr 2017 08:41:18 -0300, "Daniel." said: > The Makefile has targets for indexing the kernel.. Sometimes "find -exec > grep" helps... I will take a look in opengrok find |xargs grep. Will run a lot faster because it runs one grep for several hundred files, rather than one per file.

Re: Per container uptime?

2017-04-13 Thread valdis . kletnieks
On Thu, 13 Apr 2017 16:34:17 +0200, Fran?ois said: > Do you think it makes sense at all? The bigger question is whether there's stuff that runs in a container that wants the system uptime, which would break under this API change. > Any hint on how to get started on that? It's trivial - note the

Re: How to make per process firewall ?

2017-04-18 Thread valdis . kletnieks
On Tue, 18 Apr 2017 10:28:20 +0300, Lev Olshvang said: > I would like to constrain process (by name) or group of process to specific > network interface and to specific port. Let's take a step back. What problem are you trying to solve by constraining the processes? pgprLGP7LqYAe.pgp

Re: What is the fastest way to build and boot a kernel

2017-04-19 Thread valdis . kletnieks
On Wed, 19 Apr 2017 20:32:31 +1000, "Tobin C. Harding" said: > On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote: > [snip] > > Why the moniker? Could be worse. "Code Cannon Fodder", for example pgpv0BFLq0gT5.pgp Description: PGP signature

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread valdis . kletnieks
On Wed, 08 Mar 2017 15:20:57 +0300, Lev Olshvang said: > Hi Greg, >   > Thank you for a prompt reply. My intention is to build some euristics for > Intrusion detection of embedded based on sequence of syscalls. > I am collecting syscall events and send then with netlink to my monitor. > Since

Re: Problem in First-Patch-Tutorial

2017-03-12 Thread valdis . kletnieks
On Sun, 12 Mar 2017 15:49:31 +0200, Alexander Kapshuk said: > Are these drivers, drivers/iio/dummy/{iio_dummy_evgen,iio_dummy}.ko, > something of your own making, as I'm not seeing them in the kernel > source tree? > > The 'modules_install' make target installs drivers that have been > compiled

Re: cannot insmod sculld in ldd3

2017-03-10 Thread valdis . kletnieks
On Fri, 10 Mar 2017 20:19:29 +0330, Ali Aminian said: > these functions are defined in lddbus and i have insmod lddbus. > > can anyone tell me what is wrong. Unless I'm getting senile, neither sculld or lddbus are in the current mainline source tree, so you'll need to provide a pointer to your

Re: Problem in First-Patch-Tutorial

2017-03-13 Thread valdis . kletnieks
On Mon, 13 Mar 2017 15:38:07 +0530, SIMRAN SINGHAL said: > >> # modinfo iio_dummy_evgen.ko > >> filename: > >> vermagic: 4.11.0-rc1+ SMP mod_unload modversions > >> > >> > >> $ uname -r > >> 4.10.0-rc3+ > Greg, I got that I have to build the module against the kernel I am using. > But,

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-07 Thread valdis . kletnieks
On Tue, 07 Mar 2017 20:22:33 +0100, Greg KH said: > On Mon, Mar 06, 2017 at 10:18:26AM +0300, Lev Olshvang wrote: > Why do you want to hook a syscall? that's a very complex, and broken, > and ill-advised thing to do. Please don't do that. > > What problem are you trying to solve here that led

Re: Problems with adding a sysfs file

2017-04-17 Thread valdis . kletnieks
On Mon, 17 Apr 2017 01:17:08 -0700, Abhishek Bhardwaj said: > I followed this link to add a sysfs file > http://kroah.com/log/blog/2013/06/26/how-to-create-a-sysfs-file-correctly/ > . > > I set the driver.groups field and declared the attribute and attribute > groups required by the sysfs file.

Re: how to get consistent value of "nf_conntrack_htable_size" and "nf_conntrack_hash" in a kernel module ?

2017-07-07 Thread valdis . kletnieks
On Fri, 07 Jul 2017 23:55:25 +0800, Shiyao Ma said: > I want to foreach all the `struct nf_conn's in my out-of-tree kernel module. What are you trying to do? Hint: the very concept of "all" the nf_conn's is a very racy one, especially on high-powered servers that have multiple 40 gigabit

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread valdis . kletnieks
On Sat, 08 Jul 2017 21:08:40 +0530, Ajinkya Surnis said: > The purpose of assignment is to check the authenticity of the user > executing the system call, and prevent certain users from executing, kind > of like certain security programs (although I don't exactly know how they > work). The only

Re: new sysctl tunable knob for tcpip

2017-07-18 Thread valdis . kletnieks
On Thu, 06 Jul 2017 09:23:46 +0200, Massimo Sala said: > I have an idea about a new sysctl knob. It is under net.ipv4. Step 0: Identify whether it is even a good idea. TCP/IP is tougher than you think, especially when you get into congestion control. Step 0.1: Figure out if your brilliant idea

Re: kthread_stop always returning -EINTR?

2017-07-18 Thread valdis . kletnieks
On Tue, 18 Jul 2017 13:00:11 -0300, Martin Galvan said: > Hi everyone! I'm doing a bit of testing on the Linux kthread functions, and h > int function(void *data) > { > printk(KERN_DEBUG "CPU: %u\n", smp_processor_id()); > > do_exit(0); /* Not sure if this is ok */ > } Note that this

Re: kthread_stop always returning -EINTR?

2017-07-18 Thread valdis . kletnieks
On Tue, 18 Jul 2017 17:11:19 -0300, Martin Galvan said: > task_struct, it's not clear to me why I didn't get to see the thread > function printks. If the thread function finished before reaching > kthread_stop, I should be able to see them, right? The only way I can > see them is by removing the

Re: kthread_stop always returning -EINTR?

2017-07-18 Thread valdis . kletnieks
On Tue, 18 Jul 2017 15:13:08 -0300, Martin Galvan said: > I thought kthread_create/bind don't actually run the thread function? > At least that's what the comment says. It's the wake_up_process() that causes the problem... > > * If threadfn() may call do_exit() itself, the caller must ensure >

Re: Need help to understand Linux kernel source versioning systems

2017-07-25 Thread valdis . kletnieks
On Tue, 25 Jul 2017 20:14:45 +0800, Yubin Ruan said: > For example, let's say we are at 4.2 (or, 4.2.0) now. Before we move > to 4.3, there would > 4.3.1-rc, 4.3.2-rc, ..., 4.3.7-rc. After 4.3.7-rc, we have 4.3 (or, 4.3-rc1, 4.3-rc2, ... 4.3-rc7. pgpV4kQj9amsW.pgp Description: PGP signature

Re: Keeping track of called syscalls in real-time

2017-06-28 Thread valdis . kletnieks
On Wed, 28 Jun 2017 17:48:15 -0300, Ben Mezger said: > Can the kernel keep track of all the system calls that were called by an > application/module in real-time? > I know I can statically use strace, or even gdb, but I am looking for a > solution in real time when the application/module is

Re: Kernel schedules kernel tasks on isolated cpus, SCHED_FIFO prevents kernel tasks from running

2017-06-28 Thread valdis . kletnieks
On Wed, 28 Jun 2017 14:02:37 -0500, Andrei Hurynovich said: > The question is why this old 2.6 kernel decide that it needs per-cpu > events and kblockd tasks. You have per-cpu events ecause your real-time process issues syscalls, and syscalls do things inside the kernel that require per-CPU

Re: Kernel schedules kernel tasks on isolated cpus, SCHED_FIFO prevents kernel tasks from running

2017-06-28 Thread valdis . kletnieks
On Wed, 28 Jun 2017 08:39:07 -0500, Andrei Hurynovich said: > We set sysctl kernel.sched_rt_runtime_us = -1 so realtime threads are > NEVER interrupted. > According to /proc/sched_debug, it seems that kernel still schedules > some SCHED_OTHER(e.g. non-realtime) kernel tasks to isolated cpus - for

Re: Keeping track of called syscalls in real-time

2017-06-28 Thread valdis . kletnieks
On Wed, 28 Jun 2017 19:06:56 -0300, Ben Mezger said: > I'm actually formulating my thesis project. I am looking for a way to > intercept system calls (those chosen by the users), where I can keep > track of what syscall has been called and by who. As I said before - knowing this, what do you *do*

Re: building af_packet as a kernel module

2017-07-03 Thread valdis . kletnieks
On Mon, 03 Jul 2017 16:36:01 +0200, Kamil Konieczny said: > https://stackoverflow.com/questions/448999/is-there-a-way-to-figure-out-what-is-using-a-linux-kernel-module > and short answer is to use 'lsof' command (ls open files), > if lsmod fails to give ref info That's the short - and incorrect

Re: english grammar and patches

2017-04-25 Thread valdis . kletnieks
On Wed, 26 Apr 2017 10:27:00 +1000, "Tobin C. Harding" said: > This question relates to English grammar and correct usage when > writing gitlog messages and patch series cover letters. > > The writing of gitlog messages is covered in submitting-patches.rst, > of note is the mood to use. It is not

Re: what is the mostly used automation test framework

2017-04-21 Thread valdis . kletnieks
On Sat, 22 Apr 2017 08:01:39 +0530, Muni Sekhar said: > Can someone suggest what is the mostly used automation test framework > for testing the linux kernel mode drivers? To test what? Device drivers? There's so many different types that I don't think one framework can deal. Consider

Re: what is the mostly used automation test framework

2017-04-21 Thread valdis . kletnieks
On Sat, 22 Apr 2017 08:19:24 +0530, Muni Sekhar said: > Yes, to test device drivers(UART, PCIe, SDIO ...) As I said, there's not any good way to make a framework for testing all device drivers. For starters, you can't even get all the hardware into one machine - it's going to be *really* hard

Re: Task in Linux kernel

2017-04-27 Thread valdis . kletnieks
On Tue, 25 Apr 2017 20:52:17 +0530, Nagaraju Bellapu said: > What is the task put to sleep and schedule term referring while using > wait_queue_event and wake_up functions in a kernel module code.? Well.. think about it. If a task calls a function to wait for something, what task is wanting to

Re: Kernel build warnings

2017-08-08 Thread valdis . kletnieks
On Tue, 08 Aug 2017 05:36:34 -, Amit Kumar said: > When I compile arm64/defconfig kernel with W=1, build emits a lot of > warnings. When patch is required to be "build clean" then why warnings are > there? I want to understand. The warnings that come out with the default W=0 are by an large

Re: new sysctl tunable knob for tcpip

2017-07-31 Thread valdis . kletnieks
On Mon, 31 Jul 2017 15:16:34 +0200, Massimo Sala said: > I wish to suggest to developers to add this new knob : Note that most of the existing knobs were chosen fairly carefully, and that sometimes, the values chosen aren't immediately obvious, because they have to also take into account

Re: Don't know where to start linux kernel programming

2017-08-22 Thread valdis . kletnieks
On Tue, 22 Aug 2017 12:48:42 -0400, Cindy-Sue Causey said: > An observation that may just mean I haven't stumbled upon it yet is > that it would be nice to... stumble upon... a list of kernel problems > that *kernelnewbies* could cut their teeth on. I do understand that > this is a naive wish

Re: Don't know where to start linux kernel programming

2017-08-22 Thread valdis . kletnieks
On Tue, 22 Aug 2017 16:22:34 +0530, SUNIL KHORWAL said: > I'm new to linux kernel programming, I want to be a linux kernel hacker but > i don't know where to start. To repeat what I said previously on the subject: https://lists.kernelnewbies.org/pipermail/kernelnewbies/2017-April/017765.html

Re: device tree nodes and platform drivers

2017-05-18 Thread valdis . kletnieks
On Thu, 18 May 2017 12:38:01 -0400, Max Ruttenberg said: > >On Thu, May 18, 2017 at 12:34 PM, wrote: > >> On Thu, 18 May 2017 12:23:18 -0400, Max Ruttenberg said: > >> > >>> I figured it out... the system I am working with never makes a call to > >>>

Re: device tree nodes and platform drivers

2017-05-18 Thread valdis . kletnieks
On Thu, 18 May 2017 12:23:18 -0400, Max Ruttenberg said: > I figured it out... the system I am working with never makes a call to > of_platform_populate(NULL, NULL, NULL, NULL) and instead ops for > subsystems manually probing the device tree. Live and learn. So submit a patch to add the call.

Re: Mechnism for sharing data between kernel and user space

2017-05-21 Thread valdis . kletnieks
On Mon, 22 May 2017 10:13:08 +0530, jitendra kumar khasdev said: > I am exploring the mechanism for sharing data between kernel and user > space. There are following mechanism I have found > >1. copy_to_user/copy_from_user >2. Netlink sock >3. /proc, /debugfs etc. > > Other than this,

Re: Applying the pagecache monitoring patch

2017-05-27 Thread valdis . kletnieks
On Sat, 27 May 2017 21:59:54 +0800, Yun-Chih Chen said: > What I did is: > 1. Checkout to a commit near 2011/7/18 (the latest commit at the time > the patch was sent) > 2. Cherry-picked the three commits from tracing/mm > 3. Apply the patch > > I failed at step 3. > > Anyone has any suggestion on

Re: what is the current/ongoing state of userspace access to GPIO?

2017-05-25 Thread valdis . kletnieks
On Thu, 25 May 2017 15:20:06 -0400, "Robert P. J. Day" said: > On Thu, 25 May 2017, Greg KH wrote: > > > On Thu, May 25, 2017 at 03:02:24PM -0400, Robert P. J. Day wrote: > > > > > > thoughts? > > > > Why not ask on the linux-gpio mailing list? > > huh, i didn't even know there was such a

Re: Update a newly-created '.config' file with some predefined values

2017-05-30 Thread valdis . kletnieks
On Tue, 30 May 2017 12:28:34 +0300, Roman Storozhenko said: > Hello everybody, > > I have a host machine and I have a VM machine running CentOS 7 with 3.x. Ther e is > a kernel source tree on the host. I have made 'make menuconfig', > populated all options that I want to have in my custom kernel

Re: Is vnode number also limit system-wide number of open file?

2017-05-31 Thread valdis . kletnieks
On Thu, 01 Jun 2017 17:15:29 +0800, Yubin Ruan said: > Regarding to inode number, I notice that nearly every filesystem has tree > representation of the inode number: > 1. on-disk inode number > 2. in-memory inode number > 3. VFS inode number > How are these related? I mean, if they

Re: Fixing warnings

2017-06-02 Thread valdis . kletnieks
On Sat, 03 Jun 2017 02:47:55 +0530, srishti sharma said: > Can we fix two warnings in a single patch ? Depends what the two warnings are. If they're two actual kernel warning messages, probably best off doing 2 patches. If it's 2 complaints from checkpatch, it depends. If they're two or more

Re: Virtualbox + kgdb: Can't see vmlinux symbols

2017-06-16 Thread valdis . kletnieks
On Fri, 16 Jun 2017 13:24:58 -0700, Kamran Khan said: > This is happening only with kernel 4.8+. > > When I compile kernel 4.4 with a stock Ubuntu Xenial .config, symbols > appear just fine. > > When I compile kernel 4.8/4.10 with Yakkety/Zesty stock configs the > symbols disappear. What happens

Re: endian patches

2017-04-30 Thread valdis . kletnieks
On Mon, 01 May 2017 09:26:40 +1000, "Tobin C. Harding" said: > Should [drivers/staging/*] patches to endian code be tested on hardware > before submission? The first obvious question is: Is the hardware even available for the opposite endian systems? pgpDEe4BWVaNe.pgp Description: PGP

Re: Regarding The Eudyptula Challenge

2017-05-01 Thread valdis . kletnieks
On Tue, 02 May 2017 10:20:21 +0530, Anil Nair said: > Other than the instructions mentioned in > http://eudyptula-challenge.org, is there anything that i am missing? You're missing the fact that the challenge has been overwhelmed by entrants, and that it can take as much as a few weeks for them

Re: How to use V4L2 dmafd with sendfile?

2017-06-06 Thread valdis . kletnieks
On Tue, 06 Jun 2017 15:02:45 +0200, "Frank Smith" said: > I want to use sendfile to send my images really fast over the network. Step 0: Define "really fast". (I work with boxes that have LACP bonds of 2x40gbit ethernet interfaces - your v4l2 device is probably the slow link at that point, and

Re: help in the MM Area of the Linux Kernel

2017-10-06 Thread valdis . kletnieks
On Thu, 05 Oct 2017 18:14:08 +0200, Damian Tometzki said: > i'am intrested in helping and Bug Fixing in the mm area of the linux > kernel.  > > For driver development is it clear check in the staging area the > TODO's.  > > And what is the process for other areas of the kernel for example mm >

Re: boot time variable

2017-10-10 Thread valdis . kletnieks
On Tue, 10 Oct 2017 10:17:09 +1100, "Tobin C. Harding" said: > I would like to create a boot time variable i.e a variable that is set once > at boot time. Variable > does not need to be globally accessible. (actually I am using two variables). The canonical way to have stuff happen at boot is

Re: architecture conditional

2017-10-16 Thread valdis . kletnieks
On Tue, 17 Oct 2017 07:36:42 +1100, "Tobin C. Harding" said: > Jason A. Donenfeld suggested (offered to) add a helper function in siphash, > along the lines of > siphash_1u() but we still need to know the exact size of the return value (so > we can drop half of it > if it is 64 bits). We just

Re: USB keyboard can NOT wakeup from S3( suspend to RAM )

2017-08-30 Thread valdis . kletnieks
On Wed, 30 Aug 2017 08:09:55 +0200, Greg KH said: > On Wed, Aug 16, 2017 at 06:03:22PM +0800, jing...@cpu-os.ac.cn wrote: > > But if I do NOT hit the key during the suspending, I CAN wake it up by > > hitting > > the keyboard. > Sounds like your system does not support USB wakeup, which is very

Re: Regarding install uvcvideo driver for Iball chd 20.0 webcam

2017-08-29 Thread valdis . kletnieks
On Tue, 22 Aug 2017 12:34:12 +0530, vaibhav chaudhari said: > I want to configure iball chd 20.0 webcam on ubuntu 14.04 with kernel > version of 3.13.0-24-generic. > for that i want to install uvcvideo driver please suggest me how to install > uvcvideo driver.

Re: How to verify linux-next

2017-09-29 Thread valdis . kletnieks
On Fri, 29 Sep 2017 16:08:07 +0530, Pintu Kumar said: > I have a general question. > How do we normally verify linux-next tree? The same exact way you "verify" any other Linux kernel, for whatever definition of "verify" you plan to use. > 1) For Oracle virtual box 5.1.26 with ubuntu-32 bit, the

Re: How to verify linux-next

2017-10-02 Thread valdis . kletnieks
On Mon, 02 Oct 2017 10:11:34 +0200, Kamil Konieczny said: > What about /usr/bin/ssh as init replacement ? Well, if you are OK with your system panicking right away. :) (Hint - the init process needs to be something that can run as a daemon). If you use /usr/sbin/sshd, that has a *slightly*

Re: How to verify linux-next

2017-09-29 Thread valdis . kletnieks
On Fri, 29 Sep 2017 19:56:41 +0530, Pintu Kumar said: > 1) If you have pointers on how to setup ssh/net connection on QEMU > with busybox, do let me know. Busybox doesn't do that as far as I know, as it's intended as a single-user /sbin/init replacement. You'll need a full-featured userspace

Re: Input device driver

2017-09-29 Thread valdis . kletnieks
On Fri, 29 Sep 2017 19:38:49 -0300, "Bruno E. O. Meneguele" said: > 2) I'm using a USB keyboard as the testing device, and TBH I got > confused if I could actually use the input subsystem for that or I > _should_ use HID instead (considering the keyboard is HID compliant). Step 0: Decide if

Re: help in the MM Area of the Linux Kernel

2017-10-09 Thread valdis . kletnieks
On Mon, 09 Oct 2017 21:58:27 -0400, Jeffrey Walton said: > On Tue, 10 Oct 2017 09:50:21 +0800, Yubin Ruan said: > > um...terabyte of RAM? Can you name one of those machine with so much RAM? > > 4 TB: > http://investors.cray.com/phoenix.zhtml?c=98390=irol-newsArticle=1855272 > 64 TB:

Re: Syscall hijacking x64- unable to handle kernel paging request at ffffffff91000018

2017-10-05 Thread valdis . kletnieks
On Thu, 05 Oct 2017 20:04:12 +0200, "Wiktoria Lewicka" said: > I write kernel module which replace syscall and have a problem. Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems -- Jamie Zawinski What problem were you trying to

Re: Any trick to remove a D-state dead process without rebooting?

2017-12-04 Thread valdis . kletnieks
On Tue, 05 Dec 2017 12:03:56 +0800, Yun-Chih Chen said: > > 2) cat /proc/NNN/stack will give you a hint where the syscall is wedged. > > http://ix.io/CMN > It seems that they all have something to do with autofs or filesystem. Fortunately, you've hit an actually fixable problem that you may

Re: Any trick to remove a D-state dead process without rebooting?

2017-12-04 Thread valdis . kletnieks
On Tue, 05 Dec 2017 09:37:26 +0800, Yun-Chih Chen said: > Does anyone know of any hacks that remove a D-state dead process whose > parent is pid=1 (actually systemd), without rebooting? The problem is that D state means that the process is in the middle of a system call. That means that kernel

Re: Public Kernel Development

2017-12-01 Thread valdis . kletnieks
On Wed, 29 Nov 2017 11:16:05 +, Chris Obbard said: > Currently I am writing drivers for ARM boards (think along the lines of > Raspberry Pi HATs, it doesn't belong in mainline; Why not? If you upstream your patches, you don't have to play the "rebase every version" game. pgpYoYgvyOAhK.pgp

Re: Virtual Memory map

2017-12-12 Thread valdis . kletnieks
On Tue, 12 Dec 2017 20:14:35 +0100, Damian Tometzki said: > How are the bits (in brackets) calculated in the virtual memory map ? For x86_64 architecture, the 47 comes from the fact that currently shipping CPUs have an architected 48 bit wide memory address bus, and the fact that Linux does a

Re: hrtimer_interrupt time sync issues across cores

2017-12-14 Thread valdis . kletnieks
On Wed, 13 Dec 2017 23:01:57 -0800, Rajasekaran Chandrasekaran said: > In our multi-core x86 based system that is running 3.4.19 version of As Greg already pointed out, that's ancient history suitable only for kernel archaeologists and masochists. > Problem: > > Inside hrtimer_interrupt

Re: Unable to compile linux-kernel pulled from nf-next tree

2017-12-19 Thread valdis . kletnieks
On Tue, 19 Dec 2017 18:33:51 +0530, Harsha Sharma said: > cp: cannot stat 'net/nsh/nsh.ko': No such file or directory There was almost certainly a compile error for this. Go back and look at the 'make' output. make |& tee build.output is your friend. pgpoAsJs2Hmtv.pgp Description: PGP

Re: Unable to compile linux-kernel pulled from nf-next tree

2017-12-19 Thread valdis . kletnieks
On Tue, 19 Dec 2017 22:15:02 +0530, Harsha Sharma said: > This is the output of make. > Building modules, stage 2. > MODPOST 4905 modules > fs/ufs/ufs.o: Invalid argument > scripts/Makefile.modpost:92: recipe for target '__modpost' failed You didn't fill up the filesystem you were building

Re: Unable to compile linux-kernel pulled from nf-next tree

2017-12-19 Thread valdis . kletnieks
On Wed, 20 Dec 2017 02:28:40 +0530, Harsha Sharma said: > Using `make localmodconfig` doesn't load module nfnetlink in which I'm > making the changes. 'make localmodconfig' simply uses the output of 'lsmod' - so if you want nfnetlink included, simply modprobe a module called nfnetlink before you

Re: How to add a haradware breakpoint on a physical memory address?

2017-11-17 Thread valdis . kletnieks
On Fri, 17 Nov 2017 17:57:26 +0800, kipade said: > I found some memory was rewrite by gpu module, but i have not found where it > layout. > I just use samples hw_breakpoint module for memory monitor. > However, i found it only monitor on a virtual address, > in another words, if two variable

<    3   4   5   6   7   8   9   10   11   >