Re: menuconfig: can not select scsi device support

2015-03-06 Thread Антон Татуев
You can find out dependencies for needed options by pressing '/' (to search) 
and then typing your option.

06.03.2015, 09:48, robert rottermann rob...@redcor.ch:
  Hi there,
  I am working trough a book on embeded systems (embeded linux by J.Quade)
  There in the chapter about building a new kernel is suggested to select 
 Device
  Drivers- SCSI device support - a number of subslections.

  Now, when I start menuconfig I find Device Drivers- SCSI device support, but
  selecting it produces an empty page.

  Why is that so?
  Do I have to add other elements to the configuration process?

  I am using linux-3.19.

  Thanks
  robert

  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


question scheduler

2015-03-06 Thread Meyer Lansky
 Hello all
continue to study the scheduler is O(1 ) there was one difficulty with the 
string 2  on 3,  in that these blocking occurs after lines ?

1   rcu_read_lock();
2   pcred = __task_cred(p);
3   match = (cred-euid == pcred-euid || 
 cred-euid == pcread-uid);
4   rcu_read_unlock();

I ask because in the comments there is not described .
Thank.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to check if a file is a present in a directory(directly/indirectly)

2015-03-06 Thread Gabriel Duarte
Maybe it helps:
http://stackoverflow.com/questions/8347553/how-do-i-open-a-directory-at-kernel-level-using-the-file-descriptor-for-that-dir

2015-03-06 12:08 GMT-03:00 noyb noybee afzal...@gmail.com:

 I am building a LKM in which I need to check whether a file is inside
 a particular directory(directly or inside sub-directories). Is there a
 function for this? Do I need to use the lookup function in
 inode_operations for this or is there a better method?

 Regards,
 winged_elite

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




-- 
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to check if a file is a present in a directory(directly/indirectly)

2015-03-06 Thread Valdis . Kletnieks
On Fri, 06 Mar 2015 20:38:46 +0530, noyb noybee said:
 I am building a LKM in which I need to check whether a file is inside
 a particular directory(directly or inside sub-directories). Is there a
 function for this? Do I need to use the lookup function in
 inode_operations for this or is there a better method?

Inside subdirectories is an intractable problem, even from userspace.  You
basically need to walk *all* the inodes:

find /mounpoint -inum file_inode_number | grep /mountpoint/directory/to/check

If the filesystem is large, that can take a while.

Also, a file can be in more than one subdirectory at once:

[~] cd /tmp
[/tmp] mkdir z9
[/tmp] cd z9
[/tmp/z9] mkdir a b
[/tmp/z9] mkdir a/c
[/tmp/z9] touch a/c/d
[/tmp/z9] ln a/c/d a/first
[/tmp/z9] ln a/c/d b/second
[/tmp/z9] ln a/c/d third
[/tmp/z9] ls -lR
/tmp/z9] ls -liR
.:  
total 0 
62326 drwxr-xr-x. 3 valdis valdis 80 Mar  6 12:13 a
62327 drwxr-xr-x. 2 valdis valdis 60 Mar  6 12:13 b
62388 -rw-r--r--. 4 valdis valdis  0 Mar  6 12:13 third

./a:
total 0 
63471 drwxr-xr-x. 2 valdis valdis 60 Mar  6 12:13 c
62388 -rw-r--r--. 4 valdis valdis  0 Mar  6 12:13 first

./a/c:
total 0
62388 -rw-r--r--. 4 valdis valdis 0 Mar  6 12:13 d

./b:
total 0
62388 -rw-r--r--. 4 valdis valdis 0 Mar  6 12:13 second

So which directory is it under?  And can this sort of stunt be
exploited with a race condition on a large filesystem? (Hint -there's
a *reason* that SELinux and Smack both use file labels instead of
pathnames...)

I think you need to stop and think about what you're *actually*
trying to accomplish here.  I suspect that what you *think* you are
checking isn't what you should *actually* be checking


pgpvWCj_AOjak.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: menuconfig: can not select scsi device support

2015-03-06 Thread Paul Bolle
On Fri, 2015-03-06 at 07:44 +0100, robert rottermann wrote:
 Now, when I start menuconfig I find Device Drivers- SCSI device support, but 
 selecting it produces an empty page.
 
 Why is that so?
 Do I have to add other elements to the configuration process?

My guess is you're missing BLOCK. If BLOCK is not set see you'll see
   SCSI device support  

in the Device Drivers page of make menuconfig. And if BLOCK is set
you'll see
   SCSI device support  ---

(Yes, the difference is rather subtle.) Then you should see a non-empty
page if you select that:
[ ] RAID Transport Class (NEW)
[ ] SCSI device support (NEW) 

(And, yes, there are two entries labeled SCSI device support.) You can
(probably) set BLOCK in the main menu under
[ ] Enable the block layer  

Hope this helps,


Paul Bolle


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Mouse driver

2015-03-06 Thread Ronit Halder
Hi,I want to write mouse driver for linux ( usb mouse). I am reading
Linux device driver and Linux kernel development. But i don't how
to start writing the driver.
So,Please help.

Best regards,
Ronit.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Mouse driver

2015-03-06 Thread nick


On 2015-03-06 11:36 PM, Ronit Halder wrote:
 This is my semester project and Thanks.
 
Does it have to be a input driver? If you really want to impress your teacher 
and
get a better mark,try writing a basic network or usb driver.
Nick

 On Sat, Mar 7, 2015 at 10:04 AM, nick xerofo...@gmail.com wrote:
 Ronit,
 What are your reasons for writing this driver? In addition if you have
 the kernel tree lying around look under drivers/input/mouse for mouse
 drivers that are in production to help you understand how to write
 one better.
 Good Luck,
 Nick

 On 2015-03-06 11:27 PM, Ronit Halder wrote:
 Hi,I want to write mouse driver for linux ( usb mouse). I am reading
 Linux device driver and Linux kernel development. But i don't how
 to start writing the driver.
 So,Please help.

 Best regards,
 Ronit.

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies