Re: Need good starting point

2022-02-15 Thread Rohan Puri
On Tue, Feb 15, 2022 at 9:01 PM Ankit Pandey wrote: > > Hello, > > I have gone through tutorials at kernelnewbies and was able to compile, build > and run the kernel on qemu. But I'm stuck now. I tried to look for style > fixes in drives/staging/ but most of them look good (and fixes that they n

Re: Mark dma buffer readonly

2018-01-31 Thread Rohan Puri
On 31-Jan-2018 11:36 PM, "Saket Sinha" wrote: > >> However, I am using this in kthreads and I want to protect it without >> using mutex/spilock. >> Apart from protecting it with spinlock or mutex, is their anyway to >> mark this dma buffer as read-only so that other threads(after >> concerned thr

Re: VFS: mount_bdev and fill_super

2017-06-18 Thread Rohan Puri
On 19-Jun-2017 10:38 AM, "Shrikant Giridhar" wrote: On Fri, 16 Jun 2017, Rohan Puri wrote: > If s_root is set it means the superblock is already filled up so call > fill_super() only if s_root is NULL meaning superblock is not filled yet. I tried looking at the d_name of the s_

Re: VFS: mount_bdev and fill_super

2017-06-15 Thread Rohan Puri
On 16-Jun-2017 11:44 AM, "Shrikant Giridhar" wrote: > I just had a quick look at mount_bdev() code for Linux v3.15, mount_bdev() > can return only root dentry or error. I'm sorry I should have been clearer. I was referring to the documentation mount() where it says that the call can return somet

Re: VFS: mount_bdev and fill_super

2017-06-15 Thread Rohan Puri
On 16-Jun-2017 11:21 AM, "Shrikant Giridhar" wrote: I'm a little confused about how the mount_bdev() call works. The VFS documentation lists it as a generic method to mount a block device. Based on what I understood from the source, it seems to open a block device whose path is passed via the mo

Re: How to get the inode - no path_lookup

2015-09-17 Thread Rohan Puri
On 17 Sep 2015 04:02, "Greg KH" wrote: > > On Fri, Sep 04, 2015 at 04:26:06PM +, priyamn wrote: > > > > Hi, > > > > I happened to come across this discussion. I am having a similar issue. > > I am using Rhel7-3.10.0-123 > > kernel. I tried all the options that are mentioned above and none of t

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
On 7 Sep 2015 23:25, wrote: > > On Mon, 07 Sep 2015 12:10:56 +0530, Pria Mn said: > > > return valid dentry value. My requirement is to fetch directory name from > > filepath. > > First off, unless this is a class assignment, your *requirement* isn't > to fetch a directory name. > > Fetching the d

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
value. > > dentry =kern_path_create(AT_FDCWD, tmp, path, 1); > > So, I tried using : user_path_at() , kern_path() which are not helping me. > > How to fetch 'dentry' data from file name ? > > On Mon, Sep 7, 2015 at 12:45 PM, Rohan Puri > wrote: > >> >&

Re: How to get the dentry value - no path_lookup

2015-09-07 Thread Rohan Puri
On Mon, Sep 7, 2015 at 12:10 PM, Pria Mn wrote: > Hi, > > > > I happened to come across the below discussion. > > > > http://lists.kernelnewbies.org/pipermail/kernelnewbies/2012-August/005914.html > > > I am having a similar issue. > > I am using Rhel7-3.10.0-123 > > kernel. I tried all the optio

Re: filesystem encryption problem.

2015-07-13 Thread Rohan Puri
On 13 Jul 2015 22:08, "Amir Hezarkhani" wrote: > > > On Jul 13, 2015 1:18 AM, "Rohan Puri" wrote: > > > > No issues, you are welcome. > > > > Enjoy life, > > Rohan > > > > On 13 Jul 2015 01:19, "Amir Heza

Re: filesystem encryption problem.

2015-07-12 Thread Rohan Puri
On 12 Jul 2015 22:20, "Amir Hezarkhani" wrote: > > Thank for replies. About copy_to_user and copy_from_user, whats the better way? > I dont have much experience in kernel development but I'm trying to learn. Can you recommend me some books, documents, etc so I can learn more about filesystems in k

Re: filesystem encryption problem.

2015-07-12 Thread Rohan Puri
On Sun, Jul 12, 2015 at 8:08 PM, Freeman Zhang wrote: > Original Message > > hello > > I am working on adding a simple encryption to file contents in ext4 > driver > > (for learning purposes) I added simple XOR encryption to aio_read and > > aio_write functions and it worked unt

Re: How to safely access inode/dentry obtained from struct page *?

2014-09-03 Thread Rohan Puri
On Thu, Sep 4, 2014 at 1:33 AM, Rohan Puri wrote: > On Wed, Sep 3, 2014 at 10:50 PM, Joshi wrote: >> >> Thanks Pranay. Please see below- >> >> On Mon, Sep 1, 2014 at 10:19 AM, Pranay Srivastava wrote: >> > >> > On 01-Sep-2014 10:18 AM, "Pran

Re: How to safely access inode/dentry obtained from struct page *?

2014-09-03 Thread Rohan Puri
On Wed, Sep 3, 2014 at 10:50 PM, Joshi wrote: > > Thanks Pranay. Please see below- > > On Mon, Sep 1, 2014 at 10:19 AM, Pranay Srivastava wrote: > > > > On 01-Sep-2014 10:18 AM, "Pranay Srivastava" wrote: > >> > >> > >> On 30-Aug-2014 10:49 AM, "Joshi" wrote: > >> > > >> > I am trying to obtain

Re: fd type from number

2014-08-22 Thread Rohan Puri
On Sat, Aug 23, 2014 at 12:33 AM, Loris Degioanni wrote: > On 8/20/2014 2:33 AM, Rohan Puri wrote: >> >> On Tue, Aug 19, 2014 at 10:04 PM, Loris Degioanni >> wrote: >>> >>> Sure, here's some more context. >>> >>> I'm one of

Re: fd type from number

2014-08-20 Thread Rohan Puri
On Tue, Aug 19, 2014 at 10:04 PM, Loris Degioanni wrote: > Sure, here's some more context. > > I'm one of the developers of sysdig (www.sysdig.org), a tool that > captures system calls and uses them to offer advanced system monitoring. > One of the features that our diver offers is the tcpdump-der

Re: Bad Patches and Issues with other devolopers

2014-08-05 Thread Rohan Puri
On Tue, Aug 5, 2014 at 11:55 PM, Sudip Mukherjee wrote: > > On Aug 5, 2014 11:14 PM, "Nick Krause" wrote: >> >> I have sent out just ten bad patches and the developers seem very >> annoyed with me and >> think I am trolling. If someone on this list can find a way for me to >> improve my relations

Re: Beginner guide

2014-06-11 Thread Rohan Puri
On Wed, Jun 11, 2014 at 12:35 PM, Pranay Srivastava wrote: > On Wed, Jun 11, 2014 at 11:58 AM, Prudhvee Narasimha Sadha > wrote: > > Hi, > > My name is Prudhvee and I'm purusing my undergraduate second year. > I'm > > intrested in kernel development but I'm unable to understand how to get

Re: Reset due to emergency remount r/o

2014-02-26 Thread Rohan Puri
On Wed, Feb 19, 2014 at 6:14 PM, Priyaranjan Das wrote: > Hi All, > > I am facing an kernel restart due to emergency remount. Could anybody tell > me general techniques to go head with the debugging? > > Below are the logs which are seen during a reboot. > > [ 425.832395,1] SysRq : Emergency Remou

Re: query on VFS busy inode

2014-02-25 Thread Rohan Puri
On Wed, Feb 26, 2014 at 1:08 AM, Abhishek Dave wrote: > Hello All, > > Can some one please help me to understand meaning of below code > > > > if (!list_empty(&sb->s_inodes)) { > 406 printk("VFS: Busy inodes after unmount of %s. " > 407"

Re: Determining 32bit or 64bit OS from a running kernel module

2013-10-23 Thread Rohan Puri
On Wed, Oct 23, 2013 at 2:42 PM, Nuno Martins wrote: > Hi Saket, > > At code level you can check the size of a long. If you are in 32 bit it > will be 4 bytes, if you are in 64 bit it will be 8 bytes. > > Probably there will be better ways and functions already with this test. > > If you want to c

Re: lg_local_lock issue

2013-09-12 Thread Rohan Puri
On Thu, Sep 12, 2013 at 10:14 AM, Saket Sinha wrote: > I am facing some issue on a filesystem-driver I ported from 2.6.18 > kernel to 3.8. Now a lot has changed in the VFS since 2.6.18 to 3.8, which > has caused a lot of problem for this driver. One of the biggest core change > is the change

Re: IOCTLs versus netlink

2013-09-05 Thread Rohan Puri
On Mon, Sep 2, 2013 at 1:30 AM, Kristian Evensen wrote: > On Sun, Sep 1, 2013 at 3:16 PM, Greg Freemyer > wrote: > > > > > > Kevin Wilson wrote: > >>Hi, > >>Can someone please explain why are netlink sockets a better > >>communication method between kernel space and userspace ? > >> > > Another

Re: How to configure bullseye code coverage on windows driver

2013-08-30 Thread Rohan Puri
On Fri, Aug 30, 2013 at 11:32 AM, Nitin Kshirsagar < nitin.kshirsagar2...@gmail.com> wrote: > Hello All, > > I am configuring bullseye code coverage for windows MSI build. > I am able to get user code coverage but not driver code coverage. > Please let me know if any one configured bullseye on win

Re: Has anyone worked with PF_RING

2013-08-08 Thread Rohan Puri
On Mon, Jul 22, 2013 at 5:54 PM, Robert Clove wrote: > Hi ALL, > > I have to understand the PF_RING part. > I mean why it is being used,is it available in kernel freely? > What are the benefits of PF_RING and what are the disadvantages of using > it? > Why we normally don't use it? > > If anyone

Re: Driver laboratory classes on university

2013-08-07 Thread Rohan Puri
st on Linux. As for drivers for new devices. This will require > constant amount of money from University. This may be a problem in the long > run. > 7 sie 2013 11:22, "Rohan Puri" napisał(a): > > >> >> >> On Wed, Aug 7, 2013 at 12:09 AM, Grzegorz Dworni

Re: Driver laboratory classes on university

2013-08-07 Thread Rohan Puri
On Wed, Aug 7, 2013 at 12:09 AM, Grzegorz Dwornicki wrote: > Hi > > I'm working on own phd thesis. It includes some kernel hacking for > practical application of my research. I wish to make some progress with > programming classes on my university. We have a lot of high level > programing like obj

Re: System-call in Kernel Space

2013-07-19 Thread Rohan Puri
On Fri, Jul 19, 2013 at 1:33 PM, SandeepKsinha wrote: > > > On Fri, Jul 19, 2013 at 1:29 PM, Saket Sinha wrote: > >> We all know that system-calls are for user-space. >> I have a file-system driver where I have to use system calls in >> kernel-space. >> >> Normally, we DON'T do any high level I

Re: How to benchmark my OS

2013-07-16 Thread Rohan Puri
On Tue, Jul 16, 2013 at 11:03 PM, shiek kaleem wrote: > Hi Guys , > > Just the same question from my side is there any guidelines i can follow > if I have created my own OS.(LFS) > > > On Mon, Jul 15, 2013 at 12:26 PM, bill4carson wrote: > >> Hello Steven >> >> On 2013年07月15日 10:56, Steven Zhou wr

Re: System call porting

2013-07-12 Thread Rohan Puri
On Fri, Jul 12, 2013 at 11:50 AM, Saket Sinha wrote: > > This is to discuss the problems I am facing with porting a driver from a > 2.6.18 kernel to 3.8.3 kernel. > Apart from the APIs and functions that have changed(which I have more or > less replaced), the system call implementation has change

Re: for interested folks, i'll announce new kernel tutorials via twitter

2013-03-17 Thread Rohan Puri
On Sun, Mar 17, 2013 at 7:07 PM, Robert P. J. Day wrote: > > as i don't want to seem like i'm spamming this list with notes about > new, posted kernel tutorials, people who want to stay on top of these > are welcome to follow me on twitter at @rpjday. everything written and > posted will be free

Re: set_super_anon in fs/super.c

2012-10-24 Thread Rohan Puri
On Thu, Oct 25, 2012 at 9:40 AM, Abhijit Pawar wrote: > On 10/24/2012 01:50 PM, Rohan Puri wrote: > > Look inline for comments. > > On Tue, Oct 23, 2012 at 7:30 PM, Abhijit Chandrakant Pawar < > abhi.c.pa...@gmail.com> wrote: > >> Hi Rohan, >> >> >

Re: set_super_anon in fs/super.c

2012-10-24 Thread Rohan Puri
Look inline for comments. On Tue, Oct 23, 2012 at 7:30 PM, Abhijit Chandrakant Pawar < abhi.c.pa...@gmail.com> wrote: > ** > Hi Rohan, > > > On Tue, 2012-10-23 at 18:47 +0530, Rohan Puri wrote: > > > > On Tue, Oct 23, 2012 at 6:33 PM, Abhijit Chandrakant Pawar

Re: set_super_anon in fs/super.c

2012-10-23 Thread Rohan Puri
On Tue, Oct 23, 2012 at 6:33 PM, Abhijit Chandrakant Pawar < abhi.c.pa...@gmail.com> wrote: > ** > I am working on the layered file systems. I came across a function called > set_super_anon. > This is a callback to the sget function to compare the superblock . This > function accepts two parameter

Re: Regarding the Kernel Configuration Options

2012-10-22 Thread Rohan Puri
On Tue, Oct 23, 2012 at 8:48 AM, supratim chakraborty wrote: > I was looking for some resources on the explanation on all (or even some > for that matter) kernel configuration options that come up in the pre- > compilation phase (make menuconfig ) . I looked over but couldnt find such > a guide >

Re: where are the bug ?

2012-10-20 Thread Rohan Puri
On Sat, Oct 20, 2012 at 7:35 AM, Fan Yang wrote: > > > 2012/10/19 Rohan Puri > >> >> >> On Fri, Oct 19, 2012 at 7:38 PM, Anuz Pratap Singh Tomar < >> chambilketha...@gmail.com> wrote: >> >>> >>> >>> On Fri, Oct

Re: where are the bug ?

2012-10-19 Thread Rohan Puri
On Fri, Oct 19, 2012 at 7:38 PM, Anuz Pratap Singh Tomar < chambilketha...@gmail.com> wrote: > > > On Fri, Oct 19, 2012 at 2:46 PM, Fan Yang wrote: > >> >> >> 2012/10/19 Arun KS >> > >> > Hi Fan, >> > >> > On Fri, Oct 19, 2012 at 6:50 PM, Fan Yang wrote: >> >> >> >> HI ALL: >> >> I just run

Re: an online kernel crash book, and wondering what's deprecated

2012-09-26 Thread Rohan Puri
On Wed, Sep 26, 2012 at 8:11 PM, Mulyadi Santosa wrote: > Hi Rob... > > On Wed, Sep 26, 2012 at 6:33 PM, Robert P. J. Day > wrote: > > along those lines, i'm just digging into ftrace and was wondering if > > it in any way obsoleted systemtap, but i've heard from more than one > > source that wh

Re: an online kernel crash book, and wondering what's deprecated

2012-09-26 Thread Rohan Puri
On Wed, Sep 26, 2012 at 5:03 PM, Robert P. J. Day wrote: > > in my online travels yesterday, i ran across this gem, "Linux Kernel > Crash Book": > > http://www.dedoimedo.com/computers/crash-book.html > > and am now wondering about what would constitute a reasonable (and > minimal?) list of can

Re: How to get the inode - no path_lookup

2012-08-13 Thread Rohan Puri
On Mon, Aug 13, 2012 at 2:17 PM, Rishi Agrawal wrote: > > > On Thu, Aug 9, 2012 at 12:39 PM, Rohan Puri wrote: > >> >> >> On Thu, Aug 9, 2012 at 8:45 AM, Rishi Agrawal >> wrote: >> >>> >>> >>> On Wed, Aug 8, 2012 at 12:46 PM

Re: How to get the inode - no path_lookup

2012-08-09 Thread Rohan Puri
On Thu, Aug 9, 2012 at 8:45 AM, Rishi Agrawal wrote: > > > On Wed, Aug 8, 2012 at 12:46 PM, Rohan Puri wrote: > >> >> >> On Tue, Aug 7, 2012 at 8:11 PM, Rishi Agrawal >> wrote: >> >>> Hi All, >>> >>> >>> I had a mod

Re: How to get the inode - no path_lookup

2012-08-08 Thread Rohan Puri
On Tue, Aug 7, 2012 at 8:11 PM, Rishi Agrawal wrote: > Hi All, > > > I had a module which used the path_lookup function to print the details of > any file's inode. I now want to rewrite that module in order to show some > juniors how to write some code in kernel. > > I am using 3.4.6 kernel, I tri

Re: Changing the page attributes

2012-07-10 Thread rohan puri
On Tue, Jul 10, 2012 at 9:42 PM, Mulyadi Santosa wrote: > Hi.. > > On Tue, Jul 10, 2012 at 6:51 PM, Arun KS wrote: > > Hello Experts, > > > > I have a requirement to change __log_buf memory(kernel printk buffer) > > as non cacheable memory. > > How can I change the page attributes for changing ca

Re: kernel_sendpage query.

2012-06-09 Thread rohan puri
On Sat, Jun 9, 2012 at 8:26 PM, Pranay Kumar Srivastava < pranay.shrivast...@hcl.com> wrote: > Hi, > > I've been trying to understand kernel_sendpage but I've not been able to > figure it out completely and hopefully someone else knows better so please > help me out on this. > > I'm using kernel_s

Re: Encfs detailed design guide?!! [hope this is relevant to this forum]

2012-05-25 Thread rohan puri
On Fri, May 25, 2012 at 7:24 PM, Bill Traynor wrote: > On Fri, May 25, 2012 at 9:36 AM, SaNtosh kuLkarni > wrote: > > Any help regarding Encfs (encrypted file system) detailed design. > > Any suitable link would be helpful.Thanks. > > See: http://en.wikipedia.org/wiki/ECryptfs > > And relevant

Re: Why I can't compile a simple netfilter hook module?

2012-05-08 Thread rohan puri
On Tue, May 8, 2012 at 9:37 AM, Chir0n wrote: > I'm using this Makefile: > > *obj-m += hello.o > > all: >make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules > > clean: >make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean* > > > The hello.c is this: > > *#include

Re: Why I can't compile a simple netfilter hook module?

2012-05-07 Thread rohan puri
On Tue, May 8, 2012 at 9:37 AM, Chir0n wrote: > I'm using this Makefile: > > *obj-m += hello.o > > all: >make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules > > clean: >make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean* > > > The hello.c is this: > > *#include

Re: Problem of workqueue

2012-05-03 Thread rohan puri
On Fri, May 4, 2012 at 6:55 AM, 夏业添 wrote: > Hi Chetan, > > Thanks for reply and it works. And I want to verify some other things. > > Is it a good way to use workqueue to do this job: send data to user > space through netlink socket from kernel? > > Thanks! > > 2012/5/4 Chetan Nanda : > > > > On

Re: Hooking a system call.

2012-03-27 Thread rohan puri
On Wed, Mar 28, 2012 at 9:16 AM, V.Ravikumar wrote: > > > On Mon, Mar 26, 2012 at 1:18 PM, Mulyadi Santosa < > mulyadi.sant...@gmail.com> wrote: > >> Hi... >> >> On Mon, Mar 26, 2012 at 11:45, V.Ravikumar >> wrote: >> > As part of auditing purpose I need to intercept/hook open/read/write >> syste

Re: does anyone know how to communicate between domUs on xen?

2012-02-20 Thread rohan puri
On Mon, Feb 20, 2012 at 7:17 PM, summerxyt wrote: > ** > hi, >I'm not very sure about if I can ask questions about xen here. I have > tow questions. >The first one is that I'm looking for methods about inter-domain > communication for xen. I know besides network, VMs on the same physical

Re: Current Thread mapping

2012-01-15 Thread rohan puri
On Sun, Jan 15, 2012 at 3:02 PM, SaNtosh kuLkarni < santosh.yesop...@gmail.com> wrote: > HI everyone just wanted to know whats the current implementation of user|| > kernel space thread mapping ...is it 1:1 or does it depend on the needs ? > For example say if i have 12k user space thread running

Re: Kernel user communication mechanism

2011-12-16 Thread rohan puri
On Fri, Dec 16, 2011 at 8:49 PM, Greg KH wrote: > On Fri, Dec 16, 2011 at 10:56:16AM +0530, rohan puri wrote: > > > > > > On Thu, Dec 15, 2011 at 5:54 PM, Konstantin Zertsekel < > zertse...@gmail.com> > > wrote: > > > > > Was having a look a

Re: Kernel user communication mechanism

2011-12-15 Thread rohan puri
gt; --- Kosta > I need to move the IP in user-space which currently is as a proprietary module and release the kernel component as GPL. So for decision making I require this communication. Any help in terms of ideas or existing solutions would be apprecia

Kernel user communication mechanism

2011-12-14 Thread rohan puri
ernel. Is it possible to send event from user-space to kernel space in -case of fanotify. I there any other way present which is better than these two above ways. Any ideas to implement a new mechanism are also appreciated. Regards, Rohan

Re: Storage and I/O subsystem

2011-12-14 Thread rohan puri
istinfo/kernelnewbies > You can start with Understanding Linux kernel Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: What is Backing device used for?

2011-12-04 Thread rohan puri
ts.kernelnewbies.org/mailman/listinfo/kernelnewbies > Backing device in linux is a block device. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: What is RTNL lock?

2011-11-27 Thread rohan puri
t during device removal, protecting routing table entry during > route lookup, etc., but I can't find its precise documentation > anywhere. Thanks, > > On 27 November 2011 22:44, rohan puri wrote: > > > > > > On Sun, Nov 27, 2011 at 10:37 PM, Vimal wrote: >

Re: Ownership of sk_buff

2011-11-23 Thread rohan puri
stinfo/kernelnewbies > Hello Vimal, Refer http://www.linuxfoundation.org/collaborate/workgroups/networking/skbuff Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: How to hook the system call?

2011-11-23 Thread rohan puri
; I know that AppArmor can hock syscalls like read, write and memory >> mapping and can deny or accept them. I am not sure if you can make it >> do something else when hocked, but I know it has a script-like >> configuration, so maybe you can take some other actions. >> >

Re: How to hook the system call?

2011-11-23 Thread rohan puri
org/mailman/listinfo/kernelnewbies > You can get the address of the sys_call_table from the /proc/kallsyms and regarding the read-only section of the this symbol you can re-map the addresses by making use of vmap api in kernel. This will avoid the need for the compilation of the kernel. But I would not recommend you to do this. Their is LSM framework specifically available for this try to see if you can make use of that. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: how set_user_nice() function is called

2011-11-23 Thread rohan puri
On Tue, Nov 22, 2011 at 3:53 PM, Enes Albay - انس الباى wrote: > Thanks for reply. > > I also asked that set_user_nice where and when is called(file and line). > I think it is not called after each forking operation, isn't it? Could you > give calling order between functions from do_fork() like t

Re: sd_prep_fn

2011-11-10 Thread rohan puri
On Thu, Nov 10, 2011 at 6:26 PM, sumeet gandhare wrote: > > > On Thu, Nov 10, 2011 at 6:13 PM, rohan puri wrote: > >> >> >> On Thu, Nov 10, 2011 at 4:50 PM, sumeet gandhare < >> sumeetgandh...@gmail.com> wrote: >> >>> Hi All, >>>

Re: sd_prep_fn

2011-11-10 Thread rohan puri
lo Sumeet, sd_prep_fn function is set to the request queue's prep_rq_fn member as you have mentioned. Now this function gets called in ret = q->prep_rq_fn(q, rq); in function blk_peek_request() which is called from scsi_request_fn() in file scsi_lib.c Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Spinlocks and interrupts

2011-11-09 Thread rohan puri
a non-SMP (aka UP) build, spinlocks become > no-ops (except when certain debug checking code is enabled). > > -- > Dave Hylands > Shuswap, BC, Canada > http://www.davehylands.com > > ___ > Kernelnewbies mailing list > Kernelne

Re: Guidance on writing device drivers

2011-11-09 Thread rohan puri
kernelnewbies > > Hello Suraj, I would suggest complete reading the book with the examples given in the book. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Char device initialization

2011-11-09 Thread rohan puri
nd store in major var. major = MAJOR(gcdev->dev); 3. Replace cdev_add() call like this : - cdev_add(&gcdev->cdev, MKDEV(major, FIRST_MINOR), 1); Now its running and your read methos is getting called. Hello Alexandru, That error was due to improper args passed to cdev_

Re: Getting a block from a block device?

2011-11-08 Thread rohan puri
second stage to read an kernel > > image. (This is all more or less a "because we can"-project, no > > commercial background, just learning). > > > > Once again, thank you guys! > > > > Greetings, > > > > Dan > > -- > > Dan Lu

Re: Getting a block from a block device?

2011-11-08 Thread rohan puri
elnewbies.org/mailman/listinfo/kernelnewbies > Dan, You need to look at other block-based file systems in the kernel sources in fs dir for examples and understand how they do it. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Understanding memcpy

2011-10-19 Thread rohan puri
re ext4 actually does this, so I'm making this up > as I go along. Any thing that you see that I should be doing a different > way that isn't actually part of my question is welcome too. > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Trouble removing character device

2011-10-19 Thread rohan puri
Kernelnewbies@kernelnewbies.org > > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > During cleanup i think you need to call function unregister_chrdev_region(). Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Heap memory is not re-claiming.

2011-10-18 Thread rohan puri
On Sat, Oct 15, 2011 at 9:31 AM, Mulyadi Santosa wrote: > Hi :) > > On Fri, Oct 14, 2011 at 16:15, pankaj singh wrote: > > Nice doc ...:) > > > > On Fri, Oct 14, 2011 at 10:28 AM, rohan puri > wrote: > >> Reference to an article by Mulayadi Santosa :

Re: Heap memory is not re-claiming.

2011-10-18 Thread rohan puri
On Tue, Oct 18, 2011 at 10:04 AM, V.Ravikumar wrote: > On Sat, Oct 15, 2011 at 9:31 AM, Mulyadi Santosa < > mulyadi.sant...@gmail.com> wrote: > >> Hi :) >> >> On Fri, Oct 14, 2011 at 16:15, pankaj singh wrote: >> > Nice doc ...:) >> >

Re: How to avoid volatiles

2011-10-14 Thread rohan puri
and no optimization is required, hence volatile keyword is made use of. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Heap memory is not re-claiming.

2011-10-13 Thread rohan puri
d blocks go in an area called the *heap. Reference to an article by Mulayadi Santosa :- http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html AWESOME ARTICLE SIR :) *Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: dma_alloc_coherent

2011-10-12 Thread rohan puri
if (!ret_nocache) { free_pages((unsigned long)ret, order); return NULL; } split_page(pfn_to_page(virt_to_phys(ret) >> PAGE_SHIFT), order); *dma_handle = virt_to_phys(ret); return ret_nocache; } Regards, Rohan Puri _

Re: kernel version incorporating a particular feature

2011-10-12 Thread rohan puri
gt; Thanks, > Amit > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Hi Amit, Kernel version is 2.6.29 refer http://lwn.ne

Re: File change notification along with user

2011-10-12 Thread rohan puri
On Wed, Oct 12, 2011 at 12:17 PM, V.Ravikumar wrote: > > On Wed, Oct 12, 2011 at 12:04 PM, rohan puri wrote: > >> >> >> On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar < >> ravikumar.valla...@gmail.com> wrote: >> >>> Other than fanotify , I can

Re: File change notification along with user

2011-10-11 Thread rohan puri
On Wed, Oct 12, 2011 at 10:50 AM, V.Ravikumar wrote: > Other than fanotify , I can achieve my requirement through a driver/module. > If this can be achieved through a driver/module please provide me inputs to > start. > > Thanks, > Ravi > > On Wed, Sep 21, 2011 at 10

Re: Finding out when a process has died

2011-10-10 Thread rohan puri
ing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Hi, I think you can make use of user-defined signal handlers. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: problem mapping physical address from /dev/mem

2011-10-07 Thread rohan puri
On Fri, Oct 7, 2011 at 3:51 PM, rohan puri wrote: > > > On Fri, Oct 7, 2011 at 3:29 PM, rohan puri wrote: > >> >> >> On Fri, Oct 7, 2011 at 12:41 PM, Vaibhav Jain wrote: >> >>> On Thu, Oct 6, 2011 at 9:42 PM, rohan puri wrote: >>> >&

Re: problem mapping physical address from /dev/mem

2011-10-07 Thread rohan puri
On Fri, Oct 7, 2011 at 3:29 PM, rohan puri wrote: > > > On Fri, Oct 7, 2011 at 12:41 PM, Vaibhav Jain wrote: > >> On Thu, Oct 6, 2011 at 9:42 PM, rohan puri wrote: >> >>> >>> >>> On Fri, Oct 7, 2011 at 4:13 AM, Vaibhav Jain wrote: >>

Re: problem mapping physical address from /dev/mem

2011-10-07 Thread rohan puri
On Fri, Oct 7, 2011 at 12:41 PM, Vaibhav Jain wrote: > On Thu, Oct 6, 2011 at 9:42 PM, rohan puri wrote: > >> >> >> On Fri, Oct 7, 2011 at 4:13 AM, Vaibhav Jain wrote: >> >>> >>> >>> On Thu, Oct 6, 2011 at 11:28 AM, Mulyadi Sa

Re: problem mapping physical address from /dev/mem

2011-10-06 Thread rohan puri
Is there a way to get over this ? > > Thanks > Vaibhav Jain > > > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > Hi Vaibhav, Thi

Re: Current and correct CPU clock and asm("cpuid")

2011-10-03 Thread rohan puri
On Tue, Oct 4, 2011 at 12:03 AM, Peter Senna Tschudin wrote: > Hi Rohan. > > It is really good reference. Thanks! > > Peter > > On Mon, Oct 3, 2011 at 1:17 AM, rohan puri wrote: > > > > > > On Mon, Oct 3, 2011 at 6:57 AM, Peter Senna Tschudin < > pet

Re: Current and correct CPU clock and asm("cpuid")

2011-10-02 Thread rohan puri
ere are lots of things which need to be considered instead of setting CPU_THOUSAND_HZ to any particular value, some of them are whether its multi-core or single core CPU. On multi-core its quite difficult to get the correct answers, The problems are mentioned in the above wiki link. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: What is "__attribute__()" in kernel code

2011-09-30 Thread rohan puri
es mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > Hi Anish, Refer link http://www.unixwiz.net/techtips/gnu-c-attributes.html Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: regarding disable of CONFIG_DEBUG_FS

2011-09-29 Thread rohan puri
On Fri, Sep 30, 2011 at 11:02 AM, Vladimir Murzin wrote: > On Tue, Sep 20, 2011 at 8:57 AM, Amit Nagal > wrote: > > On Tue, Sep 20, 2011 at 10:21 AM, rohan puri > wrote: > >> > >> > >> On Tue, Sep 20, 2011 at 10:09 AM, Amit Nagal > wrote: > &

Re: Prevent a process from opening a file more than once

2011-09-28 Thread rohan puri
On Wed, Sep 28, 2011 at 11:11 AM, Michael Blizek < mic...@michaelblizek.twilightparadox.com> wrote: > Hi! > > On 21:41 Tue 27 Sep , Venkatram Tummala wrote: > > On Tue, Sep 27, 2011 at 9:19 PM, rohan puri > wrote: > ... > > > in device_open() -> > &

Re: Evicting Anonymous pages.

2011-09-27 Thread rohan puri
On Tue, Sep 27, 2011 at 11:56 PM, Prateek Sharma wrote: > On Tue, Sep 27, 2011 at 11:42 PM, Mulyadi Santosa > wrote: > > Hi :) > > > > On Wed, Sep 28, 2011 at 00:14, Prateek Sharma > wrote: > >> Hello everyone, > >> I am trying to understand the kernel page frame reclaiming > >> mechanism, but

Re: Prevent a process from opening a file more than once

2011-09-27 Thread rohan puri
On Wed, Sep 28, 2011 at 10:11 AM, Venkatram Tummala wrote: > On Tue, Sep 27, 2011 at 9:19 PM, rohan puri wrote: > >> >> >> On Wed, Sep 28, 2011 at 6:17 AM, Venkatram Tummala < >> venkatram...@gmail.com> wrote: >> >>> On Tue, Sep 27, 2011 at

Re: Prevent a process from opening a file more than once

2011-09-27 Thread rohan puri
__ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > Hi Venkatram, I agree with Mulyadi, you maintain a static global variable (int), in device_open() -> if(var) return -EBUSY var++ & in device_release() -> var-- I think this should do the job. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Hooking exec system call

2011-09-26 Thread rohan puri
On Mon, Sep 26, 2011 at 1:00 PM, Abhijit Pawar wrote: > On 09/26/2011 12:57 PM, rohan puri wrote: > > > > On Mon, Sep 26, 2011 at 12:29 PM, Abhijit Pawar wrote: > >> On 09/26/2011 12:26 PM, rohan puri wrote: >> >> >> >> On Mon, Sep 26, 2011 at 1

Re: Hooking exec system call

2011-09-26 Thread rohan puri
On Mon, Sep 26, 2011 at 12:29 PM, Abhijit Pawar wrote: > On 09/26/2011 12:26 PM, rohan puri wrote: > > > > On Mon, Sep 26, 2011 at 12:02 PM, Abhijit Pawar wrote: > >> On 09/23/2011 03:11 PM, rohan puri wrote: >> >> >> >> On Fri, Sep 23, 2011 at

Re: Hooking exec system call

2011-09-25 Thread rohan puri
On Mon, Sep 26, 2011 at 12:02 PM, Abhijit Pawar wrote: > On 09/23/2011 03:11 PM, rohan puri wrote: > > > > On Fri, Sep 23, 2011 at 2:43 PM, Abhijit Pawar wrote: > >> On 09/23/2011 02:04 PM, rohan puri wrote: >> >> >> >> On Fri, Sep 23, 2011 a

Re: download 2.6.11 ver.

2011-09-25 Thread rohan puri
On Mon, Sep 26, 2011 at 12:16 PM, rohan puri wrote: > > > On Mon, Sep 26, 2011 at 10:01 AM, esmaeil mirzaee < > esmaeil.deb...@gmail.com> wrote: > >> thank you for your reply >> but when I try git clone >> https://github.com/torvalds/linux/tree/v2.6

Re: download 2.6.11 ver.

2011-09-25 Thread rohan puri
-server-info on the server? > > On Sun, Sep 25, 2011 at 11:59 PM, rohan puri > wrote: > > > > > > On Mon, Sep 26, 2011 at 9:17 AM, esmaeil mirzaee < > esmaeil.deb...@gmail.com> > > wrote: > >> > >> Hi > >> apologize for weak Engli

Re: download 2.6.11 ver.

2011-09-25 Thread rohan puri
tinfo/kernelnewbies > Hi, You can get it from following link : - https://github.com/torvalds/linux/tree/v2.6.12 This is for 2.6.12 as 2.6.11 link is present but not accessible. You may use 2.6.12 kernel and can get started. Regards, Rohan Puri ___ Kern

Re: How to traverse or walk, the kernel's page table without mem_map?

2011-09-23 Thread rohan puri
t node. So, if for NUMA i mean for DISCONTIGMEM, you want to mem_map ptr, then that would be maintained per node (per processor), so you need to get hold of all the nodes in the system, in this way you can complete your assigment. Regards, Rohan Puri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Hooking exec system call

2011-09-23 Thread rohan puri
On Fri, Sep 23, 2011 at 2:43 PM, Abhijit Pawar wrote: > On 09/23/2011 02:04 PM, rohan puri wrote: > > > > On Fri, Sep 23, 2011 at 2:00 PM, Abhijit Pawar wrote: > >> On 09/23/2011 01:01 PM, Rajat Sharma wrote: >> >>> Untidy way : - >>>> Yes,

Re: Hooking exec system call

2011-09-23 Thread rohan puri
; sitting on top of correct file format. Long time back I had written >> the similar module in Linux to do the same, but can't share the code >> :) >> >> -Rajat >> >> On Thu, Sep 22, 2011 at 3:14 PM, rohan puri >> wrote: >> >>> >

  1   2   >