do_kexec_op and compat_set_timer_op are both prototyped in xen/include/xen/hypercall.h, but are different than their implemented functions. This appears to be a bug. do_kexec_op: xen/common/kexec.c: 889 long do_kexec_op(unsigned long op, XEN_GUEST_HANDLE(void) uarg) { return do_kexec_op_internal(op, uarg, 0); } xen/include/xen/hypercall.h: 126 extern long do_kexec_op( unsigned long op, int arg1, XEN_GUEST_HANDLE(void) arg); compat_set_timer_op: xen/common/compat/schedule.c: 38 int compat_set_timer_op(u32 lo, s32 hi) { return do_set_timer_op(((s64)hi << 32) | lo); } xen/include/xen/hypercall.h:175 extern int compat_set_timer_op( s_time_t timeout); Thanks, Robbie VanVossen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
>>> On 26.02.13 at 15:23, Robert VanVossen <Robert.VanVossen@dornerworks.com> wrote: > do_kexec_op and compat_set_timer_op are both prototyped in > xen/include/xen/hypercall.h, but are different than their implemented > functions. This appears to be a bug.Care to send a patch? Jan> do_kexec_op: > xen/common/kexec.c: 889 > long do_kexec_op(unsigned long op, XEN_GUEST_HANDLE(void) uarg) > { > return do_kexec_op_internal(op, uarg, 0); > } > > xen/include/xen/hypercall.h: 126 > extern long > do_kexec_op( > unsigned long op, > int arg1, > XEN_GUEST_HANDLE(void) arg); > > > > compat_set_timer_op: > xen/common/compat/schedule.c: 38 > int compat_set_timer_op(u32 lo, s32 hi) > { > return do_set_timer_op(((s64)hi << 32) | lo); > } > > xen/include/xen/hypercall.h:175 > extern int > compat_set_timer_op( > s_time_t timeout); > > Thanks, > Robbie VanVossen
Patch is attached. -----Original Message----- From: Jan Beulich [mailto:JBeulich@suse.com] Sent: Tuesday, February 26, 2013 11:00 AM To: Robert VanVossen Cc: xen-devel@lists.xen.org Subject: Re: [Xen-devel] Incorrect Prototypes>>> On 26.02.13 at 15:23, Robert VanVossen <Robert.VanVossen@dornerworks.com> wrote: > do_kexec_op and compat_set_timer_op are both prototyped in > xen/include/xen/hypercall.h, but are different than their implemented > functions. This appears to be a bug.Care to send a patch? Jan> do_kexec_op: > xen/common/kexec.c: 889 > long do_kexec_op(unsigned long op, XEN_GUEST_HANDLE(void) uarg) { > return do_kexec_op_internal(op, uarg, 0); } > > xen/include/xen/hypercall.h: 126 > extern long > do_kexec_op( > unsigned long op, > int arg1, > XEN_GUEST_HANDLE(void) arg); > > > > compat_set_timer_op: > xen/common/compat/schedule.c: 38 > int compat_set_timer_op(u32 lo, s32 hi) { > return do_set_timer_op(((s64)hi << 32) | lo); } > > xen/include/xen/hypercall.h:175 > extern int > compat_set_timer_op( > s_time_t timeout); > > Thanks, > Robbie VanVossen_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jan Beulich
2013-Feb-28 16:44 UTC
[PATCH v2] change arguments of do_kexec_op and compat_set_timer_op prototypes
... to match the actual functions. Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com> Also make sure the source files defining these symbols include the header declaring them (had we done so, the problem would have been noticed long ago). Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/xen/common/kexec.c +++ b/xen/common/kexec.c @@ -15,6 +15,7 @@ #include <xen/nmi.h> #include <xen/sched.h> #include <xen/types.h> +#include <xen/hypercall.h> #include <xen/kexec.h> #include <xen/keyhandler.h> #include <public/kexec.h> --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -30,6 +30,7 @@ #include <xen/mm.h> #include <xen/err.h> #include <xen/guest_access.h> +#include <xen/hypercall.h> #include <xen/multicall.h> #include <xen/cpu.h> #include <xen/preempt.h> --- a/xen/include/xen/hypercall.h +++ b/xen/include/xen/hypercall.h @@ -126,8 +126,7 @@ do_hvm_op( extern long do_kexec_op( unsigned long op, - int arg1, - XEN_GUEST_HANDLE_PARAM(void) arg); + XEN_GUEST_HANDLE_PARAM(void) uarg); extern long do_xsm_op( @@ -174,7 +173,8 @@ compat_sched_op( extern int compat_set_timer_op( - s_time_t timeout); + u32 lo, + s32 hi); #endif _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Keir Fraser
2013-Mar-06 15:33 UTC
Re: [PATCH v2] change arguments of do_kexec_op and compat_set_timer_op prototypes
On 28/02/2013 16:44, "Jan Beulich" <JBeulich@suse.com> wrote:> ... to match the actual functions. > > Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com> > > Also make sure the source files defining these symbols include the > header declaring them (had we done so, the problem would have been > noticed long ago). > > Signed-off-by: Jan Beulich <jbeulich@suse.com>Acked-by: Keir Fraser <keir@xen.org>> --- a/xen/common/kexec.c > +++ b/xen/common/kexec.c > @@ -15,6 +15,7 @@ > #include <xen/nmi.h> > #include <xen/sched.h> > #include <xen/types.h> > +#include <xen/hypercall.h> > #include <xen/kexec.h> > #include <xen/keyhandler.h> > #include <public/kexec.h> > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -30,6 +30,7 @@ > #include <xen/mm.h> > #include <xen/err.h> > #include <xen/guest_access.h> > +#include <xen/hypercall.h> > #include <xen/multicall.h> > #include <xen/cpu.h> > #include <xen/preempt.h> > --- a/xen/include/xen/hypercall.h > +++ b/xen/include/xen/hypercall.h > @@ -126,8 +126,7 @@ do_hvm_op( > extern long > do_kexec_op( > unsigned long op, > - int arg1, > - XEN_GUEST_HANDLE_PARAM(void) arg); > + XEN_GUEST_HANDLE_PARAM(void) uarg); > > extern long > do_xsm_op( > @@ -174,7 +173,8 @@ compat_sched_op( > > extern int > compat_set_timer_op( > - s_time_t timeout); > + u32 lo, > + s32 hi); > > #endif > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel