From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH v2 1/6] xen: xensyms support Date: Tue, 10 Jun 2014 14:31:12 +0100 Message-ID: <539708A0.1020604@citrix.com> References: <1402076686-26586-1-git-send-email-boris.ostrovsky@oracle.com> <1402076686-26586-2-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1402076686-26586-2-git-send-email-boris.ostrovsky@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky , konrad.wilk@oracle.com Cc: kevin.tian@intel.com, dietmar.hahn@ts.fujitsu.com, JBeulich@suse.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 06/06/14 18:44, Boris Ostrovsky wrote: > Export Xen symbols to dom0 via /proc/xen/xensyms (similar to /proc/kallsyms). [...] > --- a/drivers/xen/Kconfig > +++ b/drivers/xen/Kconfig > @@ -240,4 +240,9 @@ config XEN_MCE_LOG > config XEN_HAVE_PVMMU > bool > > +config XEN_SYMS > + bool "Xen symbols" > + depends on XEN_DOM0 && XENFS > + default y if KALLSYMS This needs documentation. > --- /dev/null > +++ b/drivers/xen/xenfs/xensyms.c > @@ -0,0 +1,124 @@ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "xenfs.h" > + > + > +#define XEN_KSYM_NAME_LEN 127 /* Hypervisor may have different name length */ Shouldn't this be exported in the hypervisor headers then? > +static int xensyms_release(struct inode *inode, struct file *file) > +{ > + struct seq_file *m = file->private_data; > + struct xen_platform_op *op = (struct xen_platform_op *)m->private; > + > + kfree(op->u.symdata.name); Isn't op->u.symdata.name a guest handle? I think you need to extract the pointer here? David