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] [day] [month] [year] [list]
Date:   Sat, 26 May 2018 01:30:26 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     "Liu, Changcheng" <changcheng.liu@...el.com>
Cc:     jiangshanlai@...il.com, tj@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: define struct workqueue_struct in C file

On Thu, May 24, 2018 at 11:10:14PM +0800, Liu, Changcheng wrote:
> Hi all,
> 	I have one confusion about workqueue_struct:
> 	1) Why struct workqueue_struct is defined in C file instead of
> 	header file?

To prevent all other code poking in its guts?

> 	   I'm trying to print "workqueue_struct:name" field in one external
> 	   build module. "workqueue_struct:name" can't be accessed directly.

... thus allowing implementation details be changed at later point without
worrying about breaking other code.

There are objects that are accessible via opaque pointers, with the set of
(widely used) primitives being the only code that has access to actual
structure layout.  Some are in a local header (outside of include search
path, and very much *NOT* supposed to be included outside of a few C
files implementing the public interfaces), some are outright local in
C file.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ