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]
Message-ID: <4B320D61.4070403@imap.cc>
Date:	Wed, 23 Dec 2009 13:30:25 +0100
From:	Tilman Schmidt <tilman@...p.cc>
To:	adobriyan@...il.com
CC:	akpm@...ux-foundation.org, isdn@...ux-pingi.de,
	netdev@...r.kernel.org
Subject: Re: [patch 1/2] proc_fops: convert drivers/isdn/ to seq_file

Am 22.12.2009 01:25 schrieb akpm@...ux-foundation.org:
> From: Alexey Dobriyan <adobriyan@...il.com>
> 
> Convert code away from ->read_proc/->write_proc interfaces.  Switch to
> proc_create()/proc_create_data() which make addition of proc entries
> reliable wrt NULL ->proc_fops, NULL ->data and so on.

Nice work, certainly an overall win.

> --- a/Documentation/isdn/INTERFACE.CAPI~proc_fops-convert-drivers-isdn-to-seq_file
> +++ a/Documentation/isdn/INTERFACE.CAPI
> @@ -149,8 +149,8 @@ char *(*procinfo)(struct capi_ctr *ctrlr
>  	pointer to a callback function returning the entry for the device in
>  	the CAPI controller info table, /proc/capi/controller
>  
> -read_proc_t *ctr_read_proc
> -	pointer to the read_proc callback function for the device's proc file
> +const struct file_operations *proc_fops
> +	pointers to callback functions for the device's proc file
>  	system entry, /proc/capi/controllers/<n>; will be called with a
>  	pointer to the device's capi_ctr structure as the last (data) argument
>  

As already noted in my mail dated 28.11.2009 13:26, the result of this is
incorrect.

The new proc_fops callback functions do *not* receive the capi_ctr pointer
as an argument. Instead, they must now retrieve it starting from their file
pointer argument, via PDE(file)->data which will contain a pointer to a
seq_file structure. The private field of that structure will then contain
the required capi_ctr pointer.

So it's not enough to just replace "pointer" by "pointers" here. The second
half of the paragraph needs to be adapted, too.

Thanks,
Tilman

-- 
Tilman Schmidt                    E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ