lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 09 Jun 2008 01:44:57 +0800
From:	RuoMu Hu <huruomu@...il.com>
To:	Alexey Dobriyan <adobriyan@...il.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: Create proc entry under /proc/sys/kernel

Alexey Dobriyan wrote:
> On Sun, Jun 08, 2008 at 04:00:57PM +0800, RuoMu Hu wrote:
>   
>> Is it possible to create a proc entry under /proc/sys/kernel directly by 
>> create_proc_read_entry in the way shown below?
>>     
>
> No longer.
>
>   
>> test_pde = create_proc_read_entry("/proc/sys/kernel/test", 0, NULL,
>>                                    test_read_proc, NULL);
>> if (test_pde == NULL) {
>>    printk(KERN_ERR "Failed to create the test proc file.\n");
>>    return -ENOMEM;
>> }
>>
>> I'm using this in my kernel module but create_proc_read_entry always 
>> returns fail, while there's no problem creating proc entries directly under 
>> /proc.  The kernel source I'm building my kernel module against is 
>> 2.6.25.4.
>>     
>
> Use register_sysctl_table() for sysctls.
>   

Thank you for your hint, it really helped me.

Another question: Is it possible to add an entry under /proc/sys/kernel 
by register_sysctl_table() without modifying kernel source (adding an 
entry to the kern_table[] array in kernel/sysctl.c)?

Best regards,
Romu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists