Re: Can't cleanly unload driver

2013-12-27 Thread Valdis . Kletnieks
On Fri, 27 Dec 2013 16:10:43 -0800, Eric Fowler said: I have checked that and the problem persists. I see insmod and rmmod - but no lsmod output. Not ls, lsmod. Different command. pgpfvNecn4jea.pgp Description: PGP signature ___ Kernelnewbies

Re: Can't cleanly unload driver

2013-12-27 Thread Valdis . Kletnieks
On Fri, 27 Dec 2013 19:33:50 -0800, Eric Fowler said: I suspect I am doing something wrong in the code with register/unregister_chrdev(), but I have been over that code a million times. It looks fine. Now: insmod the device, OK rmmod the device, OK Check /proc/devices , device # is

Re: simple memory malloc and free in ip_output.c

2014-01-01 Thread Valdis . Kletnieks
On Thu, 02 Jan 2014 12:12:49 +0700, Mulyadi Santosa said: Other than what others have said, IMHO it is better to avoid such rapid alloc/free, assuming your code fragment is running on every packet reception/sending. Instead, I suggest to allocate the memory before the ip_queue_xmit and

Re: Issue compiling Kernel Module

2014-01-08 Thread Valdis . Kletnieks
On Thu, 09 Jan 2014 03:00:11 +0530, Arun M Kumar said: all: make -C /home/arun/Linux_Source M=`pwd` The directory the -C parameter points at has to be a Linux source tree that has had at least a 'make prepare' run inside it. In addition, to actually *use* the module, you'll need to

Re: tcp packet split

2014-01-19 Thread Valdis . Kletnieks
On Sun, Jan 19, 2014 at 2:31 AM, net.study@gmail.com wrote: And why it is possible for one packet to contain uncontinuous part of different user protocol packets? Whatever gave you the idea that's possible? There's absolutely zero provision in the Internet standards for one packet to

Re: What's the meaning of CONFIG_BROKEN_ON_SMP?

2014-01-24 Thread Valdis . Kletnieks
On Fri, 24 Jan 2014 17:43:35 +0800, parmenides said: CONFIG_BROKEN_ON_SMP: should be set in the kernel configuration, but isn't. I wonder what the meaning of the configuration is. How does it work? Thx! Drivers (and all other kernel-mode code, actually) need to do proper locking, so that if

Re: make kernel driver closed

2014-01-25 Thread Valdis . Kletnieks
On Sat, 25 Jan 2014 15:43:19 +0200, Alexandru Juncu said: That is not true. Technically speaking, you could do that. Think of drivers from vmware or nvidia. The only reason NVidia gets away with it is because it's not actually a Linux driver. To save Phani the trouble, I'll point at this

Re: Where is the version.h?

2014-01-27 Thread Valdis . Kletnieks
On Mon, 27 Jan 2014 10:05:05 +0800, parmenides said: According to LDD3, the linux/module.h automatically includes the linux/version, which define some macros to help test the kernel version. But I search the source tree, and can not find version.h in include/linux. Where can I find it? It's

Re: make kernel driver closed

2014-01-27 Thread Valdis . Kletnieks
On Mon, 27 Jan 2014 17:19:46 +, Jeff Haran said: There are lots of companies with closed source Linux drivers. My former employer Brocade Communications Systems wrote, maintained and shipped their Fiberchannel stack Linux drivers consisting of tens of thousands of lines of closed source

Re: Where is the version.h?

2014-01-27 Thread Valdis . Kletnieks
On Tue, 28 Jan 2014 02:57:51 +0800, parmenides said: Accroding to LDD3, version.h is included with the path linux/version.h, therefore I think the include/generated/uapi/linux/version.h might be symbolic linked to include/linux/version.h during compilation. Is this the

Re: How to use memcpy in kernel driver

2014-01-27 Thread Valdis . Kletnieks
On Mon, 27 Jan 2014 11:53:00 -0800, m silverstri said: I try #include stdio.h Can you please help me? stdio is a libc invention, only used in userspace. As such, you can't call anything in a shared library from within kernel code (although there are similarly named routines for many things).

Re: Looking to dissect kbuild

2014-01-27 Thread Valdis . Kletnieks
On Mon, 27 Jan 2014 12:49:40 -0800, Eric Fowler said: I want to know more about how that file interacts with the build system. In particular, in situations like a build seeing a syntax error in foo.c, I want to trace from foo.c all the way up to every entry in dot-config that imports or

Re: malloc memory to be 32 byte aligned in kernel

2014-01-28 Thread Valdis . Kletnieks
On Tue, 28 Jan 2014 17:00:13 -0800, m silverstri said: Thanks. How big should be my slab cache and how to allocate from that? kmem_cache_alloc() and kmem_cache_free() are your friends. And to declare a struct ' __attribute__(aligned(32))'', does that mean I do that for every file in my

Re: 16-Byte aligned memory allocated in user space and then

2014-02-05 Thread Valdis . Kletnieks
On Wed, 05 Feb 2014 11:35:27 -0800, m silverstri said: If I allocated memory in user space and make it 16 byte aligned memory, and then pass it to kernel and setup DMA for my kernel driver, will my kernel driver still see the memory in 16-Byte aligned memory? The hard that my kernel driver

Re: How to test my patches before submitting them to LKML?

2014-02-07 Thread Valdis . Kletnieks
On Fri, 07 Feb 2014 16:31:04 +0100, Matthias Beyer said: I'm currently working on some stylefix-patches for drivers/cdrom/cdrom.c and I'm slowly getting to a point where they seem to be ready. How to test my patches? Note that some maintainers don't like accepting style fix patches, because

Re: How to test my patches before submitting them to LKML?

2014-02-07 Thread Valdis . Kletnieks
On Fri, 07 Feb 2014 12:51:42 -0800, Arlie Stephens said: Personally, I have 2 goals: - get paid - get good enough at linux to successfully play in the core kernel (successful == get changes accepted routinely, etc. etc.) Doing the former mostly just requires finding the right upstream

Re: [Help] How to Replace File Operations in File System?

2014-02-20 Thread Valdis . Kletnieks
On Thu, 20 Feb 2014 17:48:07 +0800, freeman said: However as I planed it, I don't want involve the user too much- just to keep simple. I plan to build a safe box, and people throw personal things into it. That's all. The first question is - what are you trying to protect against? The answer

Re: Side effects of open system call

2014-02-20 Thread Valdis . Kletnieks
On Thu, 20 Feb 2014 20:36:44 +0530, Rahul Bedarkar said: Often the open(2) call has unwanted side effects, that can be avoided under Linux by giving it the O_NONBLOCK flag. I have seen open man page but can't find what are side effects of open. Well, for starters, the open() call can

Re: how to validate code changes in /linux/kernel directory ?

2014-02-21 Thread Valdis . Kletnieks
On Fri, 21 Feb 2014 16:09:02 +0530, SandeepKsinha said: I made some changes in file module.c inside /linux/kernel/ directory . How do i validate if the code compiles fine before i submit a patch? For Go ahead and Compile the kernel ! And then actually *boot* it and make sure it works.

Re: Kernel Development

2014-02-24 Thread Valdis . Kletnieks
On Sun, 23 Feb 2014 22:54:31 +0530, subham soni said: I am a newbie to kernel development. I would like to develop my own kernel from scratch. From where should I start from? A large supply of caffeine, you're going to be writing a *lot* of code. For example, linux-0.01 was 100 source

Re: Object file section efficiency

2014-02-24 Thread Valdis . Kletnieks
On Mon, 24 Feb 2014 12:44:33 -0800, Matt Davis said: Are there any memory efficiencies with how the kernel loads the .data vs the .rodata sections into memory? Will the information stored in .rodata have better cache performance than that stored in .data? Yes/no/maybe. It's mostly going to

Re: How to use pr_debug

2014-02-26 Thread Valdis . Kletnieks
On Wed, 26 Feb 2014 11:35:23 -0800, m silverstri said: I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()? You probably need a #define DEBUG. Also,

Re: Google Summer of Code 2014 - IPP-over-USB printer support - Joint project idea for OpenPrinting and the kernel

2014-02-26 Thread Valdis . Kletnieks
On Tue, 25 Feb 2014 18:01:07 +0100, Till Kamppeter said: all non-Windows operating systems). IPP network printers have a lot of advantages compared to USB printers (letting the ability of several computers on a network being able to access them aside): - Encrypted job transfer I'll merely

Re: Mapping a memory address to all the processes using it

2014-02-26 Thread Valdis . Kletnieks
On Wed, 26 Feb 2014 14:52:09 -0800, Sandeep K Chaudhary said: I am working on a hack which requires me to find all the processes using a particular memory address. Lets say I get an MCE error containing a memory address. I want to use this address to find all the processes that might access

Re: Mapping a memory address to all the processes using it

2014-02-26 Thread Valdis . Kletnieks
On Wed, 26 Feb 2014 17:19:49 -0800, Sandeep K Chaudhary said: You mean like this in-tree code? config MEMORY_FAILURE depends on MMU depends on ARCH_SUPPORTS_MEMORY_FAILURE bool Enable recovery from hardware memory errors select MEMORY_ISOLATION

Re: Reset due to emergency remount r/o

2014-02-26 Thread Valdis . Kletnieks
On Thu, 27 Feb 2014 09:43:35 +0530, Arun KS said: [ 425.832395,1] SysRq : Emergency Remount R/O This looks like be a sys request from user space. Application can write echo u /proc/sysrq-trigger to trigger an emergency remount. You can hack drivers/tty/sysrq.c to print current task(to

Re: Module related permission

2014-03-07 Thread Valdis . Kletnieks
On Fri, 07 Mar 2014 21:12:19 +0700, Cao Thanh Phuong said: I want to research how to limit root's permission or root's privilege on a file or folder. So, do anybody know files or codes that are related to root's permission on a specific file or folder in linux kernel? You're proably going to

Re: Inline functions

2014-03-07 Thread Valdis . Kletnieks
On 01 Mar 2014 10:04:23 +, Summi said: a) inline functions in .c file -- Will it be correct to have inline function declared in .c file? I am speaking with respect to device driver meant for the linux kernel. I have a function, which is quite short in terms of function body and it is

Re: guidelines for kernel module development in linux

2014-03-07 Thread Valdis . Kletnieks
On Thu, 06 Mar 2014 15:52:11 +0530, pravin jadav said: i want to develop a kernel module that will scan page cache and find the pfn of those pages that have a same content in cache and in secondary storage like physical disk, so please give me some idea how should i start to develop kernel

Re: How to check if my kernel driver is leaking memory

2014-03-10 Thread Valdis . Kletnieks
On Sun, 09 Mar 2014 22:14:24 -0700, m silverstri said: I am developing a kernel driver. What should I test to make sure my kernel driver is not leaking memory? 1) The brute force method - just add lots of printk's that have allocating 25-byte frobozz struct and freeing 25-byte frobozz struct

Re: Does register_chrdev function make device file under /dev ?

2014-03-12 Thread Valdis . Kletnieks
On Tue, 11 Mar 2014 08:01:26 -, Kim Chan said: To my understanding, device file is needed when a user program wants to access the device and we don't need to generate the device file for us to use the device in kernel. Is my understanding correct? Right. You don't need to generate the

Re: Not mounting rootfs

2014-03-12 Thread Valdis . Kletnieks
On Tue, 11 Mar 2014 23:54:25 -0300, Flavio Ceolin said: Any tip is extremely welcome :) [0.820886] List of all partitions: tip 1: What would you expect to see here that isn't here? That's right, an output of what partitions it found. -hda ./buildroot-2013.05/output/images/rootfs.ext2

Re: Gosc proposal

2014-03-17 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 01:13:28 +0530, sampriti neog said: I would like to participate in GOOGLE SUMMER OF CODE 2014 with your prestigious organization. I want to propose an idea regarding music files. Although this, and your proposal regarding scanned files, may be good ideas, they're both

Re: Understanding of kernel stack print

2014-03-18 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 11:35:06 +0530, meenakshi aggarwal said: Also i want to know the significance of *0x84/0x9c* __schedule_bug+*0x84/0x9c* That's saying that __schedule_bug is 0x9c bytes long, and we were at 0x84 bytes into it. So even without a disassembly, we know we were down towards

Re: [GSoC] universal list of syscalls

2014-03-18 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 09:00:51 -0500, Edson Ticona said: What I have done so far is to write a system call for some architectures (x86, arm, sparc and microblaze) in order to understand how this part of the kernel works. That's a good learning project. However, GSOC is about learning projects

Re: [GSoC] universal list of syscalls

2014-03-18 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 09:48:06 -0500, Edson Ticona said: Hi I guess I couldn't explain myself very well. Sorry for my english, but I was doing that just to understand pretty well everything about the system calls. The project is about standardizing system calls between architectures. Good luck

Re: thread context switching

2014-03-18 Thread Valdis . Kletnieks
On Tue, 18 Mar 2014 19:01:50 +0300, Nada Saif said: I want to measure thread context switching in c, How I can do that? What are you trying to measure, exactly, and why? The answer depends on the details of the question. However, my first go-to solution would see if 'perf' can cough up the

Re: how to get PFN of page cache?

2014-03-20 Thread Valdis . Kletnieks
On Thu, 20 Mar 2014 17:14:57 +0530, pravin jadav said: i want to develop linux kernel module that will get PFN of pagecache pages. please help me how to develop this kind of kernel module. What do you intend to do with the page once you find its PFN? It's quite possible there's already an API

Re: The effect of nice value in CFS scheduler

2014-03-21 Thread Valdis . Kletnieks
On Fri, 21 Mar 2014 20:48:22 +0700, Anh Le said: I'm studying the CFS scheduler. I'm using ubuntu 13.10 and I assume that it's using CFS in it kernel. I try to see the effect of nice value by running 2 instances of the same program (just a while loop of calculations), putting them on the

Re: Selecting a Linux Kernel Bug

2014-03-24 Thread Valdis . Kletnieks
On Mon, 24 Mar 2014 12:22:58 +0530, sanjeev sharma said: Thanks and Let me subscribe so that I can start working on Bugs. Subscribing to lkml almost guarantees you won't have enough time to actually work on bugs. Note that nobody reads every post in linux-kernel. In fact, nobody who expects to

Re: Managing kernel-updates in rpm

2014-03-25 Thread Valdis . Kletnieks
On Tue, 25 Mar 2014 12:54:12 +0530, Saket Sinha said: Now this is very cumbersome and we plan to replace it with installing a yum plugin through our rpm which allows user to update the kernel level dependencies. dkms is your friend. Look to see how VirtualBox and NVidia use it for their

Re: Managing kernel-updates in rpm

2014-03-25 Thread Valdis . Kletnieks
On Tue, 25 Mar 2014 18:18:35 +0530, Saket Sinha said: Its a proprietary driver so its not meant to be the part of mainline kernel. :( Hey Greg - how long did Linux carry around an entire freaking *architecture* for the Voyager when there were only like 4 systems on the *planet* still in

Re: Unable to handle kernel paging request at virtual address ... while writing to frame buffer..

2014-03-27 Thread Valdis . Kletnieks
On Thu, 27 Mar 2014 08:55:10 -, Chan Kim said: I have this 'unable to handle kernel paging request at virtual address ...' when writing to the frame buffer. That almost certainly means you tried to write to something other than the actual frame buffer. pgpO0HuJjfE2i.pgp Description: PGP

Re: MPC8641 based custom board Kernel stuck at 1000Mhz core clock

2014-03-27 Thread Valdis . Kletnieks
On Thu, 27 Mar 2014 16:04:37 +0530, Ashish said: Hi, I am using MPC8641-HPCN based custom board and able to boot linux at MPX clock 400Mhz and core clock 800mhz. When I am increasing core frequency ie MPX clock at 400Mhz and core at 1Ghz, kernel stuck. Step 0: Prove to us that your core

Re: Storing GUIDs in linux [filesystems]

2014-03-27 Thread Valdis . Kletnieks
On Thu, 27 Mar 2014 16:55:53 +0530, Sankar P said: The size of the uid in UNIX is just 16 bits. So what is the way used by the Linux [filesystems] to store the GUID in linux to uniquely identify an user ? The filesystem only stores UIDs, not GUIDS for users. Were there any proposals in the

Re: Building nvidia driver with dkms fails on debian jessie/sid 3.14-rc8 (git)

2014-03-27 Thread Valdis . Kletnieks
On Thu, 27 Mar 2014 08:29:32 -0600, Tyrell Keene said: make.log (attached) tells me the kernel config is invalid and to make oldconf ig make prepare I do so but I still get the same error. Any ideas? What happens if you ignore dkms, and cd to wherever you extracted the NVidia source tree, 'cd

Re: Total Number of lines in the kernel code

2014-03-27 Thread Valdis . Kletnieks
On Fri, 28 Mar 2014 08:49:55 +0530, Kaushal Shriyan said: How many lines of code and files and directories in the latest stable kernel 3.13.7? find, xargs, and wc are your friends. For Linus's 'git' tree (3.14-rc8-ish): [/usr/src/linux] find * -type d | wc -l 2947 [/usr/src/linux] find *

Re: in sparc linux system call entry assembly code

2014-03-28 Thread Valdis . Kletnieks
On Fri, 28 Mar 2014 07:25:37 -, 김찬 said: andcc %l7, 1, %g0 bne linux_fast_syscall Then what is this andcc %l7, 1, %g0 doing? Well, I'm not an expert on Sparc assembler, but.. 'andcc' looks like it's doing an and, and setting the cc (condition code). Then 'bne'

Re: Ctrl-C doesn't work in the shell

2014-04-01 Thread Valdis . Kletnieks
On Tue, 01 Apr 2014 05:57:05 -, Chan Kim said: When I'm on a sheel on LCD using USB keyboard, all works fine (except another important problem..) but Ctrl-C key doesn't work. When I press ctrl-C, '^C' is displayed on the screen (prompt line), but doesn't have the effect of killing the

Re: git fetch and git merge stable kernel

2014-04-02 Thread Valdis . Kletnieks
On Wed, 02 Apr 2014 03:02:01 -0700, Anand Moon said: But their are too many confilits so no point in continue this way I will rather find patches from the old kernel and do some reverse engineering and apply them to latest stable kernel and lets see it it working. Did you learn that you're

Re: 2.6.10 no boot

2014-04-05 Thread Valdis . Kletnieks
On Sat, 05 Apr 2014 13:05:42 +0200, Marcello Stanisci said: I built a linux kernel 2.6.10. linux-2.6.10.tar.gz 24-Dec-2004 22:38 44M Unless it's a really old box, Linux probably isn't sure how to support it. Remember that in 2004, Intel was still releasing new versions of the Pentium 4

Re: Measuring Network Packet processing time

2014-04-08 Thread Valdis . Kletnieks
On Tue, 08 Apr 2014 15:35:29 +0200, Peter Senna Tschudin said: I'm not sure that rdtsc registers are synchronized on different CPUs. There exist Intel multi-core chipsets that explicitly do *not* have synchronised rdtsc registers. pgpxoLKfG3GEf.pgp Description: PGP signature

Re: Kernel Module Compilation error

2014-04-14 Thread Valdis . Kletnieks
On Tue, 15 Apr 2014 03:26:14 +0530, Arun M Kumar said: /home/arun/Dev/practice/Kmodules/Hello_world.c:1:0: error: code model 'kernel' not supported in the 32 bit mode /home/arun/Dev/practice/Kmodules/Hello_world.c:1:0: sorry, unimplemented: 64-bit mode not compiled in what could be the

Re: loglevel 7 (debug) and pr_debug()

2014-04-16 Thread Valdis . Kletnieks
On Wed, 16 Apr 2014 13:57:07 +0200, Martin Kepplinger said: I'd like to just read all pr_debug() messages like pr_info(). Did you consider, um, I don't know? Just building a kernel that doesn't have CONFIG_DYNAMIC_DEBUG turned on? Or you could read Documentation/dynamic-debug-howto.txt, and

Re: Time police - best way to submit?

2014-04-16 Thread Valdis . Kletnieks
On Wed, 16 Apr 2014 14:27:50 -0700, Henry Hallam said: 3. Is this sort of thing worth submitting to mainline? Don't bother doing it unless you have first verified that it plays nice with xntpd. pgpc64Z20t6BU.pgp Description: PGP signature ___

Re: [Kernel-BR] Re: [RFC] Only a.out QMAGIC format is working

2014-04-19 Thread Valdis . Kletnieks
On Sat, 19 Apr 2014 13:37:27 -0300, Geyslan Gregório Bem said: Maintainers, is there some chance to fix it or a.out is really doomed? Is there an actual use case for a.out on a modern kernel? In other wods, is there any reason to really care if it's doomed, since it's been *years* since that

Re:

2014-04-20 Thread Valdis . Kletnieks
On Sun, 20 Apr 2014 19:59:27 -0700, Amber Thrall said: I recently built and installed kernel version 3.15.0-rc1 following the KernelBuild article on kernelnewbies.org. Everything went smooth and my system is running fine. However when performing an update via (sudo yum update) the

Re: Question about VFS

2014-04-29 Thread Valdis . Kletnieks
On Tue, 29 Apr 2014 23:44:51 -0400, Adam Fowler said: called for my file, just open. When I ran strace I see a write call but it is to stdout and not to my file. Are you write()'ing to the correct file descriptor number? What is the source code for your userspace, near the open/write/close?

Re: Regarding skb and skb_frags

2014-05-01 Thread Valdis . Kletnieks
On Thu, 01 May 2014 16:12:43 +0530, Pranay Srivastava said: My question is that an Ethernet frame won't be bigger than 1500 bytes [correct?] Incorrect. 10G and faster ethernet support jumbograms. We run our HPC 10G network with an MTU of 9000 (which is 2 pages and a bit more).

Re: Identifying neighbors within the LAN

2014-05-03 Thread Valdis . Kletnieks
On Sat, 03 May 2014 11:01:19 -0700, Hettiarachchige Hasitha Shan said: In the concept, it is required to obtain the list of neighbors within the LAN. I did some research online and I found out that I can obtain IPv4/ IPv6 neighbors by typing in ip -4 neigh show or ip -6 neigh show in the

Re: LKML: Dropped mail fanout?

2014-05-06 Thread Valdis . Kletnieks
On Tue, 06 May 2014 15:51:15 -0700, David Matlack said: The patch series is here: https://lkml.org/lkml/2014/5/6/1. So it was delivered to LKML. But maybe the fanout failed. The messages are _not_ in my spam or trash folders. I don't think they were delivered at all. If you posted it with

Re: LKML: Dropped mail fanout?

2014-05-07 Thread Valdis . Kletnieks
On Wed, 07 May 2014 14:19:20 -0700, David Matlack said: gmail.com implements DMARC on the receive end. The idea being, gmail sees that Sender != From, and silently drops the message (theoretically). For those playing along at home who don't wear e-mail admin hats, the problem is that several

Re: large frame size warning when compiling

2014-05-08 Thread Valdis . Kletnieks
On Thu, 08 May 2014 09:24:38 +0530, Jay Aurabind said: Allocating 1K on the stack is indeed evil. Why would you say evil ? I didnt quite get why you meant by that. Is it at some extremes ? 1K is from the default ubuntu 14.04 config. Some paths in the kernel get very deep stacks (for

Re: large frame size warning when compiling

2014-05-09 Thread Valdis . Kletnieks
On Fri, 09 May 2014 17:39:21 +0530, Jay Aurabind said: So shouldnt we assume that initial value (somewhere around 6K) should be enough since the maximum it went down is only till its 50% mark ? Depends. Are you of the we haven't seen it before, so it can't happen school of programming, or the

Re: Question related to nfs(network file system) in linux kernel.

2014-05-12 Thread Valdis . Kletnieks
On Mon, 28 Apr 2014 17:57:11 +0530, Sivakumar V said: I want a requirement to intercept rpc call to nfs(network file system) or get hold of nfs buffer in kernel space and get data from the buffer to print it. First thing to do is take a step back. What problem are you trying to solve by

Re: Custom Kernel Compiling

2014-05-12 Thread Valdis . Kletnieks
On Thu, 08 May 2014 22:49:05 +0530, Prasad Ram said: .Even though i am successfully boot that kernel i would like to know how to choose other kernels which are already installed on your system to boot. grub and grub2 allow you to list multiple kernels to boot and provide

Re: problem with adding system call!

2014-05-12 Thread Valdis . Kletnieks
On Tue, 29 Apr 2014 20:54:41 +0300, Nada Saif said: I'm trying to add simple linux system call - I received the following error: No rule to make target 'block ... I use kernel 2.6.32 .. My system call called YourFirstName Any suggestion to solve the issue ? Hint: Next time, just

Re: how can I get the ZONE_DMA size ??

2014-05-12 Thread Valdis . Kletnieks
On Mon, 12 May 2014 15:14:11 +0800, RS said: So, how can I get the ZONE_DMA real size ? Is there any kernel functions or configuration files ? I want to get the accurate number. What question are you trying to answer with that number? There's a good chance that you're looking for something else

Re: Deleting a line from a file

2014-05-14 Thread Valdis . Kletnieks
On Wed, 14 May 2014 16:34:20 +0200, Bernd Petrovitsch said: sed -i 's#^/opt/new1.*$#d' file_entries.txt You don't even need the leading 's'. Just /pattern/d is sufficient. (And you can even do stuff like /pat1/,/pat2/s/old/new/ which will change 'old' to 'new', but only from a line

Re: Deleting a line from a file

2014-05-14 Thread Valdis . Kletnieks
On Wed, 14 May 2014 21:27:06 +0530, Saket Sinha said: char newFileName[PATH_MAX]; tabFileNew = setmntent(newFileName, w); And what is the new file name? You have random trash on the stack here. (Note that this is C 101 - if you can't debug this on your own, you probably shouldn't be

Re: Deleting a line from a file

2014-05-14 Thread Valdis . Kletnieks
On Wed, 14 May 2014 22:13:51 +0530, Saket Sinha said: I am sending /etc/fstab in fileName to this function and the path to be deleted in fullPath OK. char newFileName[PATH_MAX]; This lives on your function call stack. As such, it contains whatever was in that memory until you change it.

Re: why kernel do eight times nop ?

2014-05-15 Thread Valdis . Kletnieks
On Thu, 15 May 2014 14:19:25 +0800, Chuck Huang said: hi All, is anyone can explain why kernel do eight times nop in arch/arm/boot/compressed/head.S ? 128 start: 129 .type start,#function 130 .rept 8 131 mov r0, r0 132

Re: Deleting a line from a file

2014-05-15 Thread Valdis . Kletnieks
On Thu, 15 May 2014 09:55:52 +0200, Bernd Petrovitsch said: sed -i '/\/opt\/new1/d' file_entries.txt should do it. Just for the match, we do not need, the tailing .*$ (because it matches always). Actually, you want to use /^\/opt\/new1[ \t]/d because otherwise it will also delete lines that

Re: Boot Custom Kernel

2014-05-18 Thread Valdis . Kletnieks
On Sun, 18 May 2014 19:26:19 +0530, me storage said: Can any one please tell me how to boot custom kernel with out making any changes in the grub.That means i don't to use the custom kernel as default one.just i want to run it once. Add it to grub but don't make it the default entry. Easy.

Re: Where to base my patches on?

2014-05-18 Thread Valdis . Kletnieks
On Sun, 18 May 2014 11:20:39 -0700, Greg KH said: On Sun, May 18, 2014 at 07:20:03PM +0200, Matthias Beyer wrote: Besides, I received this mail about 10 times. Maybe something went wrong somewhere? The joys of sending email over a cell phone while on a ferry in the middle of the puget

Re: Eudyptula Challenge Task 3

2014-05-19 Thread Valdis . Kletnieks
On Tue, 20 May 2014 02:34:14 +0800, Mohammed Gamal said: Don't worry, the kernel build system should only recompile the source files affected by the change. You might want to try this in your kernel build tree, and be prepared to be astounded... % ls -lt include/generated % find . -type f

Re: Config options on kernel .config.

2014-05-19 Thread Valdis . Kletnieks
On Mon, 19 May 2014 17:06:41 -0300, Lucas Tanure said: How to get the help for a specific kernel compile option. Like, you do a cat .config in your .config file and see: CONFIG_GENERIC_CALIBRATE_DELAY=y Run 'make menuconfig'. Once in it, hit / to get a search box. Enter

Re: two virtual address pointing to same physical address

2014-05-19 Thread Valdis . Kletnieks
On Tue, 20 May 2014 00:39:26 -, Chan Kim said: But still it's confusing. Can two virtual addresses from the same process (in init process, one for nocache pool, the other not) point to the same physical address? I'm not sure what you're trying to say there. In general, the hardware tags

Re: Predict/force PCI slot id given by the kernel to NICs

2014-05-20 Thread Valdis . Kletnieks
On Tue, 20 May 2014 15:55:09 -0500, Jaime Arrocha said: I am working on a Proliant server model which have 6 physical pci slots. They are going to be used for NICs with either 2 or 4 interfaces and installed in an arbitrarily order in the slots. By this I mean that the a certain box will only

Re: How to enable zramfs in android...

2014-05-23 Thread Valdis . Kletnieks
On Fri, 23 May 2014 08:38:16 -0400, Corey Sheldon said: cat /proc/swaps: (should readout) /dev/block/zram0 52M (as kb readout most likely) if it shows a different slice path (/dev/zram0 for example) use swapon /that/mapping/path It won't show /dev/block/zram0 untin you've

Re: mmap(): enodev

2014-05-25 Thread Valdis . Kletnieks
On Sun, 25 May 2014 12:46:46 -, Pietro Paolini said: if ((fd = open(FILENAME, O_RDWR) == -1)) { This sort of whoopsie is why most of the kernel uses this style: fd = open(FILENAME, O_RDWR); if (fd == -1) { It may take an extra line of codde, but greatly reduces the

Re: Regarding parsing of cifs header

2014-05-26 Thread Valdis . Kletnieks
On Mon, 26 May 2014 12:21:12 +0530, Ramana Reddy said: I would like to know how to extract the cifs protocol header from skb buffer in the linux kernel. I want to parse the cifs header and do some stuff based on the content of the header. Depending what you are trying to do, it may be best

Re: error in oldconfig

2014-05-26 Thread Valdis . Kletnieks
On Tue, 27 May 2014 03:08:53 +0300, Nada Saif said: Why this appear to me when I use make oldconfig : *** Error during writing of the configuration. make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 mkdir: cannot create directory

Re: Download Linus's latest git tree

2014-05-26 Thread Valdis . Kletnieks
On Mon, 26 May 2014 15:04:17 -0300, Lucas Tanure said: git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Note that '--depth 1' results in a faster initial download, but it has a number of disadvatages - you can't clone it into another tree of yours, nor

Re: Open and copy a file from the kernel

2014-05-27 Thread Valdis . Kletnieks
On Tue, 27 May 2014 10:19:37 +0300, Nada Saif said: I want to process a copy operation from file sent from user space - this copying should be inside the kernel.. Why? What problem are you trying to solve by doing this? This is almost certainly a bad design, for a number of reasons. And

Re: Download Linus's latest git tree

2014-05-27 Thread Valdis . Kletnieks
On Tue, 27 May 2014 00:16:52 -0700, Anand Moon said: Please share your thoughts on this. I'd do it slightly differently, by keeping a master copy of Linus's tree, and a separate tree for the -stable additions (and other separate trees for linux-next or whatever else you feel like...) I keep my

Re: Download Linus's latest git tree

2014-05-27 Thread Valdis . Kletnieks
On Tue, 27 May 2014 07:28:34 -0700, Greg KH said: So are you doing this as root? Because you should never do kernel development as root, just put kernel source trees in your home directory somewhere, like under ~/linux/ No, I'm not doing the builds as root. /usr/src has been fixed to be owned

Re: Download Linus's latest git tree

2014-05-27 Thread Valdis . Kletnieks
On Tue, 27 May 2014 11:28:19 -0500, Victor Rodriguez said: Have you try the git archive instead of git clone? , if you do not need the history this git option rocks That has the same problem as 'clone --depth 1' - you can't bisect using the resulting tree. pgplGNsmTr6Xg.pgp Description: PGP

Re: Can i change address of Master Boot Record

2014-05-28 Thread Valdis . Kletnieks
On Wed, 28 May 2014 13:28:20 +0530, Saurabh Jain said: I was reading the booting process of Linux kernel. I got to know that generally the location of MBR is first sector of the bootable device. I want to know that whether we can change the location (Starting address ) of Master Boot Record

Re: killed message!

2014-05-28 Thread Valdis . Kletnieks
On Wed, 28 May 2014 21:48:04 +0300, Nada Saif said: I created a system call that deals with files - when I try to test the system call . I got a killed message. What this means? It probably means either your system call or your test program is buggy and generating a signal along the way. Do

Re: mmap() only version of ptmalloc3 and how to benchmark it

2014-05-28 Thread Valdis . Kletnieks
On Wed, 28 May 2014 12:37:48 -0700, Aaditya Gavandalkar said: So considering all these points, is it of any advantage to save on swapping time while having all those extra overheads. The short answer is it depends. The long answer is it depends. Do you have actual numbers that show a saving

Re: how to detect kernel memory overflow ?

2014-05-28 Thread Valdis . Kletnieks
On Thu, 29 May 2014 11:13:09 +0800, RS said: How to detect the kernel memory overflow errors? With a sufficiently recent gcc, you can build the kernel with CONFIG_CC_STACKPROTECTOR=y which will put a canary value on the stack and check it for corruption. pgpsJAUnjB0ke.pgp Description: PGP

Re: Extract the payload of the packet from SKB buffer at Layer-2

2014-05-29 Thread Valdis . Kletnieks
On Thu, 29 May 2014 13:06:58 +0530, Ramana Reddy said: Is there any mechanism to get the payload area after extracting the transport header from skb at layer-2. Step 0: Figure out why you're committing a layering violation and poking around in the data down at layer 2. Ask yourself if a

Re: Linux reboot command takes too long

2014-05-30 Thread Valdis . Kletnieks
On Fri, 30 May 2014 12:32:32 -0700, Vipul Jain said: On my system I have /var/core directory created which has 300G space and if I fill the /var/core with files say upto 290G and reboot the system and after it comes up and delete the files in /var/core and try to reboot the system takes 45

Re: For whoever wants to fix an unused variable in netfilter

2014-05-31 Thread Valdis . Kletnieks
On Sat, 31 May 2014 03:45:29 -0300, Raphael S Carvalho said: net/netfilter/nfnetlink.c: In function 'nfnetlink_rcv': net/netfilter/nfnetlink.c:363:14: warning: unused variable 'net' [-Wunused-variable] struct net *net = sock_net(skb-sk); ^ Of course, the real fun starts when

Re: head.S

2014-06-02 Thread Valdis . Kletnieks
On Mon, 02 Jun 2014 21:23:16 +0530, Saurabh Jain said: I am trying to trace Linux kernel booting process for ARM architecture. Right now i am doing it manually . I am getting problem in reading assembly codes (like in head.s and other files) . Can any body tell me the correct way of tracing

Re: Newbie task: Fix a build regression

2014-06-02 Thread Valdis . Kletnieks
On Mon, 02 Jun 2014 20:56:35 +0200, Richard Weinberger said: 1. Find out which commit broke the build (i.e. using git bisect) Any hint on a starting value for 'git bisect good v3.mumble'? :) pgpeXYL4ntWD9.pgp Description: PGP signature ___

Re: Newbie task: Fix a build regression

2014-06-02 Thread Valdis . Kletnieks
On Mon, 02 Jun 2014 21:10:10 +0200, Richard Weinberger said: I don't really now. I don't do out-of-tree builds on -next. Randy said its there for a few weeks. A 'v3.14-rc7' or similar tag from Linus's tree is good enough, as you can't do a sane bisect between (say) next-20140501 and

Re: can't find asm/system.h

2014-06-03 Thread Valdis . Kletnieks
On Tue, 03 Jun 2014 14:23:22 +0800, jinz...@wingtech.com said: In my code, I include the file asm/system.h, but when compiling the code, show the error as can't find the file or directory asm/system.h. Why?? Probably because either: 1) Your Makefile isn't set up to use the Kbuild architecture,

Re: remote devices

2014-06-03 Thread Valdis . Kletnieks
On Mon, 02 Jun 2014 19:12:47 -0700, riya khanna said: Thanks for pointing this out! I was wondering if it is possible to use a remote GPU through /dev/gpu. No. The upshot is that whenever you open a character or block special device, it's handled as a local reference, even if the directory

<    1   2   3   4   5   6   7   8   9   10   >