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:	Fri, 20 Mar 2015 16:53:50 +0200
From:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:	Mathieu Poirier <mathieu.poirier@...aro.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Pratik Patel <pratikp@...eaurora.org>, peter.lachner@...el.com,
	norbert.schulz@...el.com, keven.boell@...el.com,
	yann.fouassier@...el.com, laurent.fert@...el.com,
	linux-api@...r.kernel.org
Subject: Re: [PATCH v0 01/11] stm class: Introduce an abstraction for System Trace Module devices

Mathieu Poirier <mathieu.poirier@...aro.org> writes:

> As promised I worked on a prototype that connects the coresight-stm
> driver with the generic STM interface you have suggested.  Things work
> quite well and aside from the enhancement related to the ioctl() and
> private member as discussed above, we should move ahead with this.
>
> I will send out a new version of the coresight-stm driver as soon as I
> see your patches with those changes.

Actually, instread of a private member I'd simply pass struct stm_data
pointer to the callback (like we do with other callbacks) and the
private data would be in the structure that embeds this struct stm_data,
so that you can get to it using container_of():

struct my_stm {
       struct stm_data	data;
       void		*my_stuff;
       ...
};

...

long my_ioctl(struct stm_data *data, unsigned int cmd, unsigned long
	      arg)
{
        struct my_stm *mine = container_of(data, struct my_stm, data);

...

Would this work for you? I'm otherwise ready to send the second version
of my patchset.

Regards,
--
Alex
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ