WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux/x86: make do_settimeofday() return -EPERM when

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: make do_settimeofday() return -EPERM when clock can't be changed
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Mon, 24 Aug 2009 08:30:19 +0100
Delivery-date: Mon, 24 Aug 2009 00:30:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Rather than returning success here (without actually having done
anything), it seems more appropriate/conforming to let the caller know
that what he intended to do didn't succeed.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- sle10sp3-2009-08-10.orig/arch/i386/kernel/time-xen.c        2009-07-27 
10:22:10.000000000 +0200
+++ sle10sp3-2009-08-10/arch/i386/kernel/time-xen.c     2009-08-10 
10:41:30.000000000 +0200
@@ -470,6 +470,9 @@ int do_settimeofday(struct timespec *tv)
        if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
                return -EINVAL;
 
+       if (!is_initial_xendomain() && !independent_wallclock)
+               return -EPERM;
+
        cpu = get_cpu();
        shadow = &per_cpu(shadow_time, cpu);
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: make do_settimeofday() return -EPERM when clock can't be changed, Jan Beulich <=