All of lore.kernel.org
 help / color / mirror / Atom feed
* Measured load of running auditd with various options?
From: Michael Sierchio @ 2015-02-17 18:06 UTC (permalink / raw)
  To: linux-audit

Hi, all. I am wondering if there has been any work done on the
measured impact of running auditd, under various sets of options. I'm
looking for quantitative studies with good analytics, not anecdotes.
Thanks.

- M

^ permalink raw reply

* [PATCH] read-cache.c: free cache entry when refreshing fails
From: Stefan Beller @ 2015-02-17 18:06 UTC (permalink / raw)
  To: gitster; +Cc: git, Stefan Beller

This fixes a memory leak, when building the cache entries as
refresh_cache_entry may decide to return NULL in case of

I am not sure how severe this memory leak is as it was found by
scan.coverity.com, CID 290041.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 read-cache.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/read-cache.c b/read-cache.c
index 9cff715..8d71860 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -725,7 +725,7 @@ struct cache_entry *make_cache_entry(unsigned int mode,
 		unsigned int refresh_options)
 {
 	int size, len;
-	struct cache_entry *ce;
+	struct cache_entry *ce, *ret;
 
 	if (!verify_path(path)) {
 		error("Invalid path '%s'", path);
@@ -742,7 +742,13 @@ struct cache_entry *make_cache_entry(unsigned int mode,
 	ce->ce_namelen = len;
 	ce->ce_mode = create_ce_mode(mode);
 
-	return refresh_cache_entry(ce, refresh_options);
+	ret = refresh_cache_entry(ce, refresh_options);
+	if (!ret) {
+		free(ce);
+		return NULL;
+	} else {
+		return ret;
+	}
 }
 
 int ce_same_name(const struct cache_entry *a, const struct cache_entry *b)
-- 
2.3.0.81.gc37f363

^ permalink raw reply related

* Re: [Qemu-devel] [PATCH 03/10] guest agent: guest-file-open: refactoring
From: Denis V. Lunev @ 2015-02-17 18:05 UTC (permalink / raw)
  To: Michael Roth, Denis V. Lunev, Eric Blake, qemu-devel
  Cc: peter.maydell, Simon Zolin, Olga Krishtal
In-Reply-To: <20150217175635.13315.80188@loki>

On 17/02/15 20:56, Michael Roth wrote:
> Quoting Denis V. Lunev (2015-02-17 10:06:49)
>> On 17/02/15 18:27, Eric Blake wrote:
>>> On 02/16/2015 08:14 PM, Michael Roth wrote:
>>>> From: Simon Zolin <szolin@parallels.com>
>>>>
>>>> Moved the code that sets non-blocking flag on fd into a separate function.
>>>>
>>>> Signed-off-by: Simon Zolin <szolin@parallels.com>
>>>> Reviewed-by: Roman Kagan <rkagan@parallels.com>
>>>> Signed-off-by: Denis V. Lunev <den@openvz.org>
>>>> CC: Michael Roth <mdroth@linux.vnet.ibm.com>
>>>> CC: Eric Blake <eblake@redhat.com>
>>>> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>>>> ---
>>>>    qga/commands-posix.c | 31 +++++++++++++++++++++++--------
>>>>    1 file changed, 23 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
>>>> index 57409d0..ed527a3 100644
>>>> --- a/qga/commands-posix.c
>>>> +++ b/qga/commands-posix.c
>>>> @@ -376,13 +376,33 @@ safe_open_or_create(const char *path, const char *mode, Error **errp)
>>>>        return NULL;
>>>>    }
>>>>
>>>> +static int guest_file_toggle_flags(int fd, int flags, bool set, Error **err)
>>>> +{
>>> Why are you reinventing qemu_set_nonblock()?
>>>
>> because we are uneducated :)
>>
>> Anyway, qemu_set_nonblock() does not handle error
>> and resides in a strange header aka  "include/qemu/sockets.h"
>> Technically I can switch to it immediately. Though error
>> check condition will be lost.
>>
>> What is better at your opinion?
>>
>> a) return error from qemu_set_nonblock()/qemu_set_block()
>
> I think making the existing functions a non-error-checking
> wrapper around qemu_set_{block,nonblock}_error or something
> would be best.
>
> These are meant to be os-agnostic utility functions though,
> but in the case of qemu-ga the win32 variant won't work as
> expected, so I'm not sure it's a good idea to rely on them.
>
> If the lack of it's usage in net/tap* compared to other parts
> of QEMU that build on w32 is any indication, that seems to
> be the pattern followed by other users.
>
> In any case, since I was actually the one who re-invented it,
> and this code just moves it to another function, I think we
> can address it as a seperate patch and leave the PULL
> intact (unless there are other objections).
>

OK to me.

I'll check Win32 version with Olga to be somewhat
sure with upcoming cleanup.

^ permalink raw reply

* [xen-4.3-testing test] 34637: regressions - FAIL
From: xen.org @ 2015-02-17 18:05 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson

flight 34637 xen-4.3-testing real [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/34637/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:
 build-amd64                   5 xen-build                 fail REGR. vs. 34190
 build-i386                    5 xen-build                 fail REGR. vs. 34190

Tests which did not succeed, but are not blocking:
 test-amd64-amd64-rumpuserxen-amd64  1 build-check(1)               blocked n/a
 test-amd64-i386-rumpuserxen-i386  1 build-check(1)               blocked  n/a
 build-amd64-libvirt           1 build-check(1)               blocked  n/a
 test-amd64-i386-xl-qemuu-ovmf-amd64  1 build-check(1)              blocked n/a
 test-amd64-i386-libvirt       1 build-check(1)               blocked  n/a
 build-i386-libvirt            1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-qemuu-ovmf-amd64  1 build-check(1)             blocked n/a
 test-amd64-i386-pv            1 build-check(1)               blocked  n/a
 test-amd64-amd64-libvirt      1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-sedf-pin  1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-sedf      1 build-check(1)               blocked  n/a
 test-amd64-i386-rhel6hvm-amd  1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-pcipt-intel  1 build-check(1)               blocked  n/a
 test-amd64-amd64-pv           1 build-check(1)               blocked  n/a
 build-amd64-rumpuserxen       1 build-check(1)               blocked  n/a
 test-armhf-armhf-xl-credit2   5 xen-boot                     fail   never pass
 test-armhf-armhf-xl-sedf      5 xen-boot                     fail   never pass
 test-armhf-armhf-libvirt      5 xen-boot                     fail   never pass
 test-amd64-i386-rhel6hvm-intel  1 build-check(1)               blocked  n/a
 test-amd64-i386-qemut-rhel6hvm-amd  1 build-check(1)               blocked n/a
 test-amd64-amd64-xl           1 build-check(1)               blocked  n/a
 test-amd64-i386-qemuu-rhel6hvm-intel  1 build-check(1)             blocked n/a
 test-amd64-i386-qemuu-rhel6hvm-amd  1 build-check(1)               blocked n/a
 test-amd64-amd64-xl-multivcpu  1 build-check(1)               blocked  n/a
 test-armhf-armhf-xl           5 xen-boot                     fail   never pass
 test-amd64-amd64-xl-credit2   1 build-check(1)               blocked  n/a
 test-armhf-armhf-xl-sedf-pin  5 xen-boot                     fail   never pass
 test-amd64-i386-freebsd10-i386  1 build-check(1)               blocked  n/a
 test-amd64-i386-freebsd10-amd64  1 build-check(1)               blocked  n/a
 test-armhf-armhf-xl-multivcpu  5 xen-boot                     fail  never pass
 test-amd64-i386-qemut-rhel6hvm-intel  1 build-check(1)             blocked n/a
 test-armhf-armhf-xl-midway    5 xen-boot                     fail   never pass
 test-amd64-i386-xl            1 build-check(1)               blocked  n/a
 test-amd64-i386-xl-win7-amd64  1 build-check(1)               blocked  n/a
 build-i386-rumpuserxen        1 build-check(1)               blocked  n/a
 test-amd64-i386-pair          1 build-check(1)               blocked  n/a
 test-amd64-i386-xl-qemuu-winxpsp3-vcpus1  1 build-check(1)         blocked n/a
 test-amd64-amd64-xl-qemuu-winxpsp3  1 build-check(1)               blocked n/a
 test-amd64-i386-xl-winxpsp3-vcpus1  1 build-check(1)               blocked n/a
 test-amd64-i386-xend-qemut-winxpsp3  1 build-check(1)              blocked n/a
 test-amd64-i386-xl-qemut-debianhvm-amd64  1 build-check(1)         blocked n/a
 test-amd64-amd64-pair         1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-qemuu-win7-amd64  1 build-check(1)             blocked n/a
 test-amd64-i386-xl-qemut-win7-amd64  1 build-check(1)              blocked n/a
 test-amd64-i386-xl-qemuu-win7-amd64  1 build-check(1)              blocked n/a
 test-amd64-i386-xl-qemuu-debianhvm-amd64  1 build-check(1)         blocked n/a
 test-amd64-amd64-xl-winxpsp3  1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-win7-amd64  1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-qemut-win7-amd64  1 build-check(1)             blocked n/a
 test-amd64-amd64-xl-qemut-debianhvm-amd64  1 build-check(1)        blocked n/a
 test-amd64-amd64-xl-qemuu-debianhvm-amd64  1 build-check(1)        blocked n/a
 test-amd64-i386-xl-qemut-winxpsp3-vcpus1  1 build-check(1)         blocked n/a
 test-amd64-i386-xend-winxpsp3  1 build-check(1)               blocked  n/a
 test-amd64-amd64-xl-qemut-winxpsp3  1 build-check(1)               blocked n/a

version targeted for testing:
 xen                  9c9b73912759baa8cf9ca25256fe17d8407095fb
baseline version:
 xen                  ef73de2a84a3042c3481c9a521e8e0c756b793f2

------------------------------------------------------------
People who touched revisions under test:
  Ian Jackson <ian.jackson@eu.citrix.com>
------------------------------------------------------------

jobs:
 build-amd64                                                  fail    
 build-armhf                                                  pass    
 build-i386                                                   fail    
 build-amd64-libvirt                                          blocked 
 build-armhf-libvirt                                          pass    
 build-i386-libvirt                                           blocked 
 build-amd64-pvops                                            pass    
 build-armhf-pvops                                            pass    
 build-i386-pvops                                             pass    
 build-amd64-rumpuserxen                                      blocked 
 build-i386-rumpuserxen                                       blocked 
 test-amd64-amd64-xl                                          blocked 
 test-armhf-armhf-xl                                          fail    
 test-amd64-i386-xl                                           blocked 
 test-amd64-i386-rhel6hvm-amd                                 blocked 
 test-amd64-i386-qemut-rhel6hvm-amd                           blocked 
 test-amd64-i386-qemuu-rhel6hvm-amd                           blocked 
 test-amd64-amd64-xl-qemut-debianhvm-amd64                    blocked 
 test-amd64-i386-xl-qemut-debianhvm-amd64                     blocked 
 test-amd64-amd64-xl-qemuu-debianhvm-amd64                    blocked 
 test-amd64-i386-xl-qemuu-debianhvm-amd64                     blocked 
 test-amd64-i386-freebsd10-amd64                              blocked 
 test-amd64-amd64-xl-qemuu-ovmf-amd64                         blocked 
 test-amd64-i386-xl-qemuu-ovmf-amd64                          blocked 
 test-amd64-amd64-rumpuserxen-amd64                           blocked 
 test-amd64-amd64-xl-qemut-win7-amd64                         blocked 
 test-amd64-i386-xl-qemut-win7-amd64                          blocked 
 test-amd64-amd64-xl-qemuu-win7-amd64                         blocked 
 test-amd64-i386-xl-qemuu-win7-amd64                          blocked 
 test-amd64-amd64-xl-win7-amd64                               blocked 
 test-amd64-i386-xl-win7-amd64                                blocked 
 test-amd64-amd64-xl-credit2                                  blocked 
 test-armhf-armhf-xl-credit2                                  fail    
 test-amd64-i386-freebsd10-i386                               blocked 
 test-amd64-i386-rumpuserxen-i386                             blocked 
 test-amd64-amd64-xl-pcipt-intel                              blocked 
 test-amd64-i386-rhel6hvm-intel                               blocked 
 test-amd64-i386-qemut-rhel6hvm-intel                         blocked 
 test-amd64-i386-qemuu-rhel6hvm-intel                         blocked 
 test-amd64-amd64-libvirt                                     blocked 
 test-armhf-armhf-libvirt                                     fail    
 test-amd64-i386-libvirt                                      blocked 
 test-armhf-armhf-xl-midway                                   fail    
 test-amd64-amd64-xl-multivcpu                                blocked 
 test-armhf-armhf-xl-multivcpu                                fail    
 test-amd64-amd64-pair                                        blocked 
 test-amd64-i386-pair                                         blocked 
 test-amd64-amd64-xl-sedf-pin                                 blocked 
 test-armhf-armhf-xl-sedf-pin                                 fail    
 test-amd64-amd64-pv                                          blocked 
 test-amd64-i386-pv                                           blocked 
 test-amd64-amd64-xl-sedf                                     blocked 
 test-armhf-armhf-xl-sedf                                     fail    
 test-amd64-i386-xl-qemut-winxpsp3-vcpus1                     blocked 
 test-amd64-i386-xl-qemuu-winxpsp3-vcpus1                     blocked 
 test-amd64-i386-xl-winxpsp3-vcpus1                           blocked 
 test-amd64-i386-xend-qemut-winxpsp3                          blocked 
 test-amd64-amd64-xl-qemut-winxpsp3                           blocked 
 test-amd64-amd64-xl-qemuu-winxpsp3                           blocked 
 test-amd64-i386-xend-winxpsp3                                blocked 
 test-amd64-amd64-xl-winxpsp3                                 blocked 


------------------------------------------------------------
sg-report-flight on osstest.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images

Logs, config files, etc. are available at
    http://www.chiark.greenend.org.uk/~xensrcts/logs

Test harness code can be found at
    http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary


Not pushing.

------------------------------------------------------------
commit 9c9b73912759baa8cf9ca25256fe17d8407095fb
Author: Ian Jackson <ian.jackson@eu.citrix.com>
Date:   Mon Feb 16 14:54:11 2015 +0000

    QEMU_TAG update
(qemu changes not included)

^ permalink raw reply

* Re: [PATCH] drm: Fix the CRTC_STEREO_DOUBLE_ONLY define to include stero modes
From: Matt Roper @ 2015-02-17 18:05 UTC (permalink / raw)
  To: Damien Lespiau
  Cc: Ander Conselvan de Oliveira, intel-gfx, Gustavo Padovan,
	dri-devel
In-Reply-To: <1424099551-13252-1-git-send-email-damien.lespiau@intel.com>

On Mon, Feb 16, 2015 at 03:12:31PM +0000, Damien Lespiau wrote:
> The CRTC_STEREO_DOUBLE_ONLY define was introduced in commit:
> 
>   commit ecb7e16bf187bc369cf6a5cd108582c01329980d
>   Author: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>   Date:   Mon Dec 1 15:40:09 2014 -0800
> 
>       drm: add helper to get crtc timings (v5)
> 
> but if we want the stereo h/v adjustments, we need to set the
> CRTC_STEREO_DOUBLE flag. Otherwise, we'll get the wrong h/v for frame packing
> stereo 3d modes.
> 
> Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  include/drm/drm_modes.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
> index d92f6dd..0616188 100644
> --- a/include/drm/drm_modes.h
> +++ b/include/drm/drm_modes.h
> @@ -92,7 +92,7 @@ enum drm_mode_status {
>  #define CRTC_STEREO_DOUBLE	(1 << 1) /* adjust timings for stereo modes */
>  #define CRTC_NO_DBLSCAN		(1 << 2) /* don't adjust doublescan */
>  #define CRTC_NO_VSCAN		(1 << 3) /* don't adjust doublescan */
> -#define CRTC_STEREO_DOUBLE_ONLY	(CRTC_NO_DBLSCAN | CRTC_NO_VSCAN)
> +#define CRTC_STEREO_DOUBLE_ONLY	(CRTC_STEREO_DOUBLE | CRTC_NO_DBLSCAN | CRTC_NO_VSCAN)
>  
>  #define DRM_MODE_FLAG_3D_MAX	DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF
>  
> -- 
> 1.8.3.1
> 

-- 
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply

* [OSSTEST PATCH 0/9] Fix NTP unreliability, and other fixes
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

We are having persistent spurious "xen-boot" failures.  Cursory
investigation revealed that this was due to problems with NTP startup,
so we put it down to infrastructure problems.

However, it turns out that the cause is that we are using the
Debian-default NTP servers from pool.ntp.org.  We might expect some of
these servers don't work some of the time.

The underlying cause is a bug in Debian: the NTP servers specified via
preseeding are used during the installer environment to set the clock,
but the information is not used to configure the actual ntp server
package in the install.  I have reported this as a bug in Debian but
we need to work around it by editing ntp.conf after installation.

There are also two unrelated fixes in this series.

One of the changes (`Provide get_target_property') is likely to be
useful for nested virt.

In the absence of objections I am going to push this series soon.

^ permalink raw reply

* [OSSTEST PATCH 1/9] cs-adjust-flight: Add missing `use Data::Dumper'
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

Dumper is used in some of the error reporting so we need to `use' it.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 cs-adjust-flight |    1 +
 1 file changed, 1 insertion(+)

diff --git a/cs-adjust-flight b/cs-adjust-flight
index d6cab1a..9bd8757 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -40,6 +40,7 @@
 use strict qw(vars);
 use DBI;
 use Osstest;
+use Data::Dumper;
 
 csreadconfig();
 
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 8/9] NTP servers: Use NtpServer host property
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

Move the specification of NTP servers in the production-config from
the ad-hoc entry in DebianPreseed to a dedicated NtpServer host
property.

This results in no overall functional change, except that the order of
elements in the preseed file is slightly different.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a044f8f..cc075a4 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -506,7 +506,7 @@ sub di_installcmdline_core ($$;@) {
 sub preseed_base ($$$;@) {
     my ($ho,$suite,$extra_packages,%xopts) = @_;

-    return <<"END";
+    my $preseed = <<"END";
 d-i mirror/suite string $suite

 d-i debian-installer/locale string en_GB
@@ -572,10 +572,22 @@ d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bi

 $xopts{ExtraPreseed}

-### END OF DEBIAN PRESEED BASE
+END
+
+    my $ntpserver = get_target_property($ho,'NtpServer');
+use Data::Dumper;
+print STDERR "PRESEED NTP ", Dumper($ntpserver);
+    $preseed .= <<"END" if $ntpserver;
+d-i clock-setup/ntp-server string $ntpserver
+END

+    $preseed .= <<"END";
+
+### END OF DEBIAN PRESEED BASE
 END
-}
+
+    return $preseed;
+}

 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
diff --git a/README b/README
index 6e63e97..0a0242c 100644
--- a/README
+++ b/README
@@ -334,6 +334,11 @@ HostProp_<testbox>_TftpScope
    Defines the Tftp scope (i.e. subnet) where this host resides. See
    "TftpFoo_<scope> and TftpFoo" below.

+HostProp_<testbox>_NtpServer
+   NTP server to use.  You should probably have your own local
+   NTP server for production use; the default is to use the operating
+   system's default (normally, Debian's pool.ntp.org servers).
+
 HostFlags_<testbox>
    Defines a set of flags for the host. Flags is a list separated by
    whitespace, comma or semi-colon. A flag can be unset by prepending
@@ -357,9 +362,7 @@ HostGroupFlags_<group>
    merged with the host specific flags. Only used in standalone mode.

 DebianPreseed
-   Text to add to the debian-installer preseed file.  Optional
-   but you will need to set some NTP servers here if your firewall
-   doesn't permit NTP to Debian's pool.ntp.org servers.
+   Text to add to the debian-installer preseed file.  Optional.

 ========================================

diff --git a/production-config b/production-config
index 515bd98..5fbca50 100644
--- a/production-config
+++ b/production-config
@@ -77,8 +77,9 @@ XenUseUser osstest
 #DebianMirrorHost debian.uk.xensource.com
 DebianMirrorHost 10.80.16.196

+HostProp_NtpServer ntp.uk.xensource.com
+
 DebianPreseed= <<'END'
-d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END

 HostProp_Serial sympathy woking
---
 production-config |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/production-config b/production-config
index 515bd98..5fbca50 100644
--- a/production-config
+++ b/production-config
@@ -77,8 +77,9 @@ XenUseUser osstest
 #DebianMirrorHost debian.uk.xensource.com
 DebianMirrorHost 10.80.16.196
 
+HostProp_NtpServer ntp.uk.xensource.com
+
 DebianPreseed= <<'END'
-d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END
 
 HostProp_Serial sympathy woking
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 9/9] NTP servers: Work around Debian's failure to honour preseed
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

Setting clock-setup/ntp-server is not sufficient: it only takes effect
in the installer (!)

I have reported this as Debian #778564.  In the meantime we should
work around it for current releases (including jessie, which is
frozen).

For later releases, the new ntp.conf editing code arranges to bomb out
if we have an NTP server configured and find it hasn't been honoured
during the install.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 ts-host-install |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/ts-host-install b/ts-host-install
index ae1d228..9656079 100755
--- a/ts-host-install
+++ b/ts-host-install
@@ -119,6 +119,26 @@ END
 
     target_install_packages($ho, qw(ed));
 
+    my $ntpserver = get_target_property($ho, 'NtpServer');
+    if ($ntpserver) {
+	target_editfile_root($ho, '/etc/ntp.conf', sub {
+	    my $done= 0;
+	    while (<EI>) {
+		if (m/^server\s/) {
+		    if ($ho->{Suite} =~ m/lenny|squeeze|wheezy|jessie/) {
+			$_= $done ? "" : "server $ntpserver\n";
+		    } else {
+			m/^server \Q$ntpserver\E\s/ or
+			    die "NTP server not honoured, Debian #778564 ";
+		    }
+		    $done= 1;
+		}
+		print EO or die $!;
+	    }
+	    $done or die;
+	});
+    }
+
     target_cmd_root($ho, "update-rc.d osstest-confirm-booted start 99 2 .");
 
     logm('OK: install completed');
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH v6 0/7] Add initial support for DA9150 Charger & Fuel-Gauge IC
From: Sebastian Reichel @ 2015-02-17 18:04 UTC (permalink / raw)
  To: Opensource [Adam Thomson]
  Cc: Lee Jones, Jonathan Cameron, Jonathan Cameron, Samuel Ortiz,
	Hartmut Knaack, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Dmitry Eremin-Solenikov, David Woodhouse,
	linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring,
	Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Grant Likely,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton,
	Joe Perches, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Support Opensource
In-Reply-To: <2E89032DDAA8B9408CB92943514A0337AB52D71F-68WUHU125fLLPO1uwJ3ImwLouzNaz+3S@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hi,

On Mon, Feb 16, 2015 at 09:45:59PM +0000, Opensource [Adam Thomson] wrote:
> Just a quick one to see what the status is on this patch set? Just
> interested as to when it'll be pulled in.

I plan to pull it into for-next once -rc1 has been tagged (probably
about a week). Feel free to send a new version with the style fixes.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH v6 0/7] Add initial support for DA9150 Charger & Fuel-Gauge IC
From: Sebastian Reichel @ 2015-02-17 18:04 UTC (permalink / raw)
  To: Opensource [Adam Thomson]
  Cc: Lee Jones, Jonathan Cameron, Jonathan Cameron, Samuel Ortiz,
	Hartmut Knaack, linux-iio@vger.kernel.org,
	Dmitry Eremin-Solenikov, David Woodhouse,
	linux-pm@vger.kernel.org, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Grant Likely,
	devicetree@vger.kernel.org, Andrew Morton, Joe Perches,
	linux-kernel@vger.kernel.org, Support Opensource
In-Reply-To: <2E89032DDAA8B9408CB92943514A0337AB52D71F@SW-EX-MBX01.diasemi.com>

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

Hi,

On Mon, Feb 16, 2015 at 09:45:59PM +0000, Opensource [Adam Thomson] wrote:
> Just a quick one to see what the status is on this patch set? Just
> interested as to when it'll be pulled in.

I plan to pull it into for-next once -rc1 has been tagged (probably
about a week). Feel free to send a new version with the style fixes.

-- Sebastian

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH rt-tests] pi_stress: remove timestamp of compilation from version output
From: Sebastian Andrzej Siewior @ 2015-02-17 18:03 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: Clark Williams, linux-rt-users
In-Reply-To: <1424185739-29680-1-git-send-email-u.kleine-koenig@pengutronix.de>

* Uwe Kleine-König | 2015-02-17 16:08:59 [+0100]:

>Hello,
>
>a few people work on getting reproducible builds for Debian. Using
>__DATE__ and __TIME__ obviously makes the rt-tests package fail to
>compile in a deterministic fashion.

We used faketime (fed from changelog) to achieve the same goal but we
still got the warning while beeing deterministic. As a plus the build
crashed on hurd :)

>Best regards
>Uwe

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [OSSTEST PATCH 2/9] sg-report-job-history: Increase default history depth to 500
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

We are putting through a lot more jobs and branches.  Older history is
still interesting.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 sg-report-job-history |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sg-report-job-history b/sg-report-job-history
index 3e4b0ef..e7052a3 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -27,7 +27,7 @@ use HTML::Entities;
 use Osstest::TestSupport;
 
 our (@blessings,@branches);
-our $limit= 100;
+our $limit= 500;
 our $htmlout;
 
 open DEBUG, ">/dev/null";
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 3/9] config: Tiny fixes
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

* Default $c{DebianPreseed} to '' (previously, if it wasn't specified,
  there would be undefined variable warnings).

* Cope with empty <<END-notated config items in the configuration file
  parser.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest.pm |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Osstest.pm b/Osstest.pm
index fc9698b..6d7c083 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -74,6 +74,8 @@ our %c = qw(
     DebianNonfreeFirmware firmware-bnx2
 );
 
+$c{DebianPreseed} = '';
+
 #---------- general setup and config reading ----------
 
 sub getmethod {
@@ -120,7 +122,7 @@ sub readglobalconfig () {
 			$val .= $_;
 		    }
 		    die $! unless length $_;
-		    die unless $val =~ m/\n$/;
+		    die unless !length $val || $val =~ m/\n$/;
 		    if ($qu eq '') {
 			my $reconstruct =
 			    "\$val = <<${qu}${delim}${qu}; 1;\n".
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 4/9] TestSupport: Provide get_target_property
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Robert Hu, LongtaoX Pang, Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

This looks in the supplied $ho, but if that's a $gho (ie it has a
$gho->{Host}) it also looks in its host.

This is going to be useful for a fair variety of host-specific or
infrastructure-determined properties.

It seems to me that whether a property ought to be looked up in the
host if not found in a particular guest depends mostly on the
property, and not on the way the guest is configured.  The easiest way
to represent that in the osstest codebase is probably to call
get_target_property instead of get_host_property in the appropriate
places.

The use of recursion will make this look through a series of nested
hosts if we have nested virtualisation going on.  Indeed, nested
virtualisation may benefit from replacement of get_host_property by
get_target_property in a number of cases.  (At the time of writing
there is no nested virt in osstest mainline, but it's on the way.)

Currently there are no callers of get_target_property.  One will
appear shortly.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Robert Hu <robert.hu@intel.com>
CC: LongtaoX Pang <longtaox.pang@intel.com>
---
 Osstest/TestSupport.pm |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 8aed285..8754e22 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -66,7 +66,7 @@ BEGIN {
                       contents_make_cpio file_simple_write_contents
 
                       selecthost get_hostflags get_host_property
-                      get_host_native_linux_console
+                      get_target_property get_host_native_linux_console
                       power_state power_cycle power_cycle_sleep
                       serial_fetch_logs
                       propname_massage
@@ -906,6 +906,17 @@ sub get_host_property ($$;$) {
     return defined($val) ? $val : $defval;
 }
 
+sub get_target_property ($$;$);
+sub get_target_property ($$;$) {
+    my ($ho, $prop, $defval) = @_;
+    # $ho may be a guest; if so we look for the property in the
+    # guest and failing that the same property in the host.
+    return
+	get_host_property($ho, $prop) //
+	($ho->{Host} && get_target_property($ho->{Host}, $prop)) //
+	$defval;
+}
+
 sub get_host_native_linux_console ($) {
     my ($ho) = @_;
 
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 5/9] Debian.pm: Pass $ho/$gho to preseed_base
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

This is going to be useful soon.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Debian.pm     |    6 +++---
 ts-debian-hvm-install |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index e3e1c90..a044f8f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -503,8 +503,8 @@ sub di_installcmdline_core ($$;@) {
     return @cl;
 }
 
-sub preseed_base ($$;@) {
-    my ($suite,$extra_packages,%xopts) = @_;
+sub preseed_base ($$$;@) {
+    my ($ho,$suite,$extra_packages,%xopts) = @_;
 
     return <<"END";
 d-i mirror/suite string $suite
@@ -813,7 +813,7 @@ END
 
     my $extra_packages = join(",",@extra_packages);
 
-    my $preseed_file= preseed_base($suite,$extra_packages,%xopts);
+    my $preseed_file= preseed_base($ho,$suite,$extra_packages,%xopts);
 
     $preseed_file .= (<<END);
 d-i partman-auto/method string lvm
diff --git a/ts-debian-hvm-install b/ts-debian-hvm-install
index 449b96c..cfd5144 100755
--- a/ts-debian-hvm-install
+++ b/ts-debian-hvm-install
@@ -43,7 +43,7 @@ our $gho;
 
 sub preseed () {
 
-    my $preseed_file = preseed_base('wheezy','',());
+    my $preseed_file = preseed_base($gho,'wheezy','',());
     my $authkeys = join('\\n', split(/\n/, authorized_keys()));
 
     $preseed_file .= (<<END);
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 6/9] Debian.pm: Slightly refactor preseed_base
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

Arrange for preseed_base to accumulate its result in a variable.  This
is going to make it easier to add entries which are determined
programatically.

No functional change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Debian.pm |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a044f8f..315d25c 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -506,7 +506,7 @@ sub di_installcmdline_core ($$;@) {
 sub preseed_base ($$$;@) {
     my ($ho,$suite,$extra_packages,%xopts) = @_;
 
-    return <<"END";
+    my $preseed = <<"END";
 d-i mirror/suite string $suite
 
 d-i debian-installer/locale string en_GB
@@ -572,10 +572,15 @@ d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bi
 
 $xopts{ExtraPreseed}
 
-### END OF DEBIAN PRESEED BASE
+END
+
+    $preseed .= <<"END";
 
+### END OF DEBIAN PRESEED BASE
 END
-}          
+
+    return $preseed;
+}
 
 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
-- 
1.7.10.4

^ permalink raw reply related

* [OSSTEST PATCH 7/9] NTP servers: Introduce new NtpServer host property
From: Ian Jackson @ 2015-02-17 17:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell
In-Reply-To: <1424195431-1493-1-git-send-email-ian.jackson@eu.citrix.com>

Allow the specification of NTP servers in a dedicated NtpServer host
property, which we honour in preseed_create.

Change the documentation to recommend this, rather than use of
ad-hoc text in DebianPreseed.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index a044f8f..cc075a4 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -506,7 +506,7 @@ sub di_installcmdline_core ($$;@) {
 sub preseed_base ($$$;@) {
     my ($ho,$suite,$extra_packages,%xopts) = @_;

-    return <<"END";
+    my $preseed = <<"END";
 d-i mirror/suite string $suite

 d-i debian-installer/locale string en_GB
@@ -572,10 +572,22 @@ d-i pkgsel/include string openssh-server, ntp, ntpdate, ethtool, chiark-utils-bi

 $xopts{ExtraPreseed}

-### END OF DEBIAN PRESEED BASE
+END
+
+    my $ntpserver = get_target_property($ho,'NtpServer');
+use Data::Dumper;
+print STDERR "PRESEED NTP ", Dumper($ntpserver);
+    $preseed .= <<"END" if $ntpserver;
+d-i clock-setup/ntp-server string $ntpserver
+END

+    $preseed .= <<"END";
+
+### END OF DEBIAN PRESEED BASE
 END
-}
+
+    return $preseed;
+}

 sub preseed_create ($$;@) {
     my ($ho, $sfx, %xopts) = @_;
diff --git a/README b/README
index 6e63e97..0a0242c 100644
--- a/README
+++ b/README
@@ -334,6 +334,11 @@ HostProp_<testbox>_TftpScope
    Defines the Tftp scope (i.e. subnet) where this host resides. See
    "TftpFoo_<scope> and TftpFoo" below.

+HostProp_<testbox>_NtpServer
+   NTP server to use.  You should probably have your own local
+   NTP server for production use; the default is to use the operating
+   system's default (normally, Debian's pool.ntp.org servers).
+
 HostFlags_<testbox>
    Defines a set of flags for the host. Flags is a list separated by
    whitespace, comma or semi-colon. A flag can be unset by prepending
@@ -357,9 +362,7 @@ HostGroupFlags_<group>
    merged with the host specific flags. Only used in standalone mode.

 DebianPreseed
-   Text to add to the debian-installer preseed file.  Optional
-   but you will need to set some NTP servers here if your firewall
-   doesn't permit NTP to Debian's pool.ntp.org servers.
+   Text to add to the debian-installer preseed file.  Optional.

 ========================================

diff --git a/production-config b/production-config
index 515bd98..5fbca50 100644
--- a/production-config
+++ b/production-config
@@ -77,8 +77,9 @@ XenUseUser osstest
 #DebianMirrorHost debian.uk.xensource.com
 DebianMirrorHost 10.80.16.196

+HostProp_NtpServer ntp.uk.xensource.com
+
 DebianPreseed= <<'END'
-d-i clock-setup/ntp-server string ntp.uk.xensource.com
 END

 HostProp_Serial sympathy woking
---
 Osstest/Debian.pm |    5 +++++
 README            |    9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 315d25c..7633b51 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -574,6 +574,11 @@ $xopts{ExtraPreseed}
 
 END
 
+    my $ntpserver = get_target_property($ho,'NtpServer');
+    $preseed .= <<"END" if $ntpserver;
+d-i clock-setup/ntp-server string $ntpserver
+END
+
     $preseed .= <<"END";
 
 ### END OF DEBIAN PRESEED BASE
diff --git a/README b/README
index 6e63e97..0a0242c 100644
--- a/README
+++ b/README
@@ -334,6 +334,11 @@ HostProp_<testbox>_TftpScope
    Defines the Tftp scope (i.e. subnet) where this host resides. See
    "TftpFoo_<scope> and TftpFoo" below.
 
+HostProp_<testbox>_NtpServer
+   NTP server to use.  You should probably have your own local
+   NTP server for production use; the default is to use the operating
+   system's default (normally, Debian's pool.ntp.org servers).
+
 HostFlags_<testbox>
    Defines a set of flags for the host. Flags is a list separated by
    whitespace, comma or semi-colon. A flag can be unset by prepending
@@ -357,9 +362,7 @@ HostGroupFlags_<group>
    merged with the host specific flags. Only used in standalone mode.
 
 DebianPreseed
-   Text to add to the debian-installer preseed file.  Optional
-   but you will need to set some NTP servers here if your firewall
-   doesn't permit NTP to Debian's pool.ntp.org servers.
+   Text to add to the debian-installer preseed file.  Optional.
 
 ========================================
 
-- 
1.7.10.4

^ permalink raw reply related

* Re: [PATCH 0/5] HID: sony: misc fixes and cleanups
From: Frank Praznik @ 2015-02-17 18:03 UTC (permalink / raw)
  To: Antonio Ospite, linux-input; +Cc: Jiri Kosina, Lauri Kasanen, Frank Praznik
In-Reply-To: <1424106744-12872-1-git-send-email-ao2@ao2.it>

On 2/16/2015 12:12, Antonio Ospite wrote:
> Hi,
>
> here are a few cleanups for hid-sony.
>
> Changes are meant to follow the patch titled:
> [PATCHv4] HID: sony: Enable Gasia third-party PS3 controllers
>
> Frank, hi, I'd like to have your explicit ack at least for patch 1 and
> 2.
>
> Thanks,
>     Antonio
>
>
> Antonio Ospite (5):
>    HID: sony: Fix a WARNING shown when rmmod-ing the driver
>    HID: sony: Use the minimum accepted size for feature report 0xf2
>    HID: sony: Don't use magic numbers in sixaxis_set_operational_usb()
>    HID: sony: Use __u8 * for the buffer in sixaxis_set_operational_usb()
>    HID: sony: Coding style cleanups in sixaxis_set_operational_usb()
>
>   drivers/hid/hid-sony.c | 21 +++++++++++----------
>   1 file changed, 11 insertions(+), 10 deletions(-)
>

The series looks good to me.  Thanks for tackling the last bit of magic 
constant cleanup.
For the entire series:

Acked-by: Frank Praznik <frank.praznik@oh.rr.com>

^ permalink raw reply

* Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model
From: Eric Blake @ 2015-02-17 18:03 UTC (permalink / raw)
  To: Michael Mueller, qemu-devel, kvm, linux-s390, linux-kernel
  Cc: Gleb Natapov, Alexander Graf, Christian Borntraeger,
	Jason J. Herne, Cornelia Huck, Paolo Bonzini, Andreas Faerber,
	Richard Henderson
In-Reply-To: <1424183053-4310-12-git-send-email-mimu@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On 02/17/2015 07:24 AM, Michael Mueller wrote:
> This patch implements a new QMP request named 'query-cpu-model'.
> It returns the cpu model of cpu 0 and its backing accelerator.
> 
> request:
>   {"execute" : "query-cpu-model" }
> 
> answer:
>   {"return" : {"name": "2827-ga2", "accelerator": "kvm" }}
> 
> Alias names are resolved to their respective machine type and GA names
> already during cpu instantiation. Thus, also a cpu model like 'host'
> which is implemented as alias will return its normalized cpu model name.
> 
> Furthermore the patch implements the following functions:
> 
> - s390_cpu_typename(), returns the currently selected cpu type name or NULL
> - s390_cpu_models_used(), returns true if S390 cpu models are in use
> 
> Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
> ---
>  
> +##
> +# @CpuModelInfo:
> +#
> +# Virtual CPU model definition.
> +#
> +# @name: the name of the CPU model definition
> +#
> +# Since: 2.3.0
> +##
> +{ 'type': 'CpuModelInfo',
> +  'data': { 'name': 'str', '*accelerator': 'AccelId' } }

You didn't document '*accelerator', including mention that it is
optional (why would it not be output always?).

> +
> +##
> +# @query-cpu-model:
> +#
> +# Return to current virtual CPU model

s/to/the/

> +#
> +# Returns: CpuModelInfo
> +#
> +# Since: 2.3.0

We aren't very consistent on '2.3' vs. '2.3.0', so I won't complain
about that.

> +##
> +{ 'command': 'query-cpu-model', 'returns': 'CpuModelInfo' }

Seems reasonable from the interface point of view; I have not closely
reviewed the implementation.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply

* Re: [PATCH 2/2] [PATCH] sched: Add smp_rmb() in task rq locking cycles
From: Paul E. McKenney @ 2015-02-17 18:01 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Kirill Tkhai, linux-kernel, Ingo Molnar, Josh Poimboeuf, oleg
In-Reply-To: <20150217160532.GW4166@linux.vnet.ibm.com>

On Tue, Feb 17, 2015 at 08:05:32AM -0800, Paul E. McKenney wrote:
> On Tue, Feb 17, 2015 at 02:05:23PM +0100, Peter Zijlstra wrote:
> > On Tue, Feb 17, 2015 at 01:12:58PM +0100, Peter Zijlstra wrote:
> > > --- a/kernel/sched/core.c
> > > +++ b/kernel/sched/core.c
> > > @@ -341,6 +341,22 @@ static struct rq *task_rq_lock(struct ta
> > >  		raw_spin_lock_irqsave(&p->pi_lock, *flags);
> > >  		rq = task_rq(p);
> > >  		raw_spin_lock(&rq->lock);
> > > +		/*
> > > +		 *	move_queued_task()		task_rq_lock()
> > > +		 *
> > > +		 *	ACQUIRE (rq->lock)
> > > +		 *	[S] ->on_rq = MIGRATING		[L] rq = task_rq()
> > > +		 *	WMB (__set_task_cpu())		ACQUIRE (rq->lock);
> > > +		 *	[S] ->cpu = new_cpu		[L] task_rq()
> > > +		 *					[L] ->on_rq
> > > +		 *	RELEASE (rq->lock)
> > > +		 *
> > > +		 * If we observe the old cpu in task_rq_lock, the acquire of
> > > +		 * the old rq->lock will fully serialize against the stores.
> > > +		 *
> > > +		 * If we observe the new cpu in task_rq_lock, the acquire will
> > > +		 * pair with the WMB to ensure we must then also see migrating.
> > > +		 */
> > >  		if (likely(rq == task_rq(p) && !task_on_rq_migrating(p)))
> > >  			return rq;
> > >  		raw_spin_unlock(&rq->lock);
> > 
> > Hey Paul, remember this: https://lkml.org/lkml/2014/7/16/310
> 
> I do now.  ;-)
> 
> > I just used a creative one :-)
> 
> The scenario above?
> 
> > BTW, should we attempt to include that table in memory-barriers.txt like
> > Mathieu said? As a cheat sheet with references to longer explanations
> > for the 'interesting' ones?
> > 
> > FWIW, we should probably update that table to include control
> > dependencies too; we didn't (formally) have those back then I think.
> > 
> > The blob under SMP BARRIER PAIRING does not mention pairing with control
> > dependencies; and I'm rather sure I've done so.

And here is a patch for the control-dependency pairing.  Thoughts?

							Thanx, Paul

------------------------------------------------------------------------

documentation: Clarify control-dependency pairing

This commit explicitly states that control dependencies pair normally
with other barriers, and gives an example of such pairing.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index ca2387ef27ab..b09880086d96 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -592,9 +592,9 @@ See also the subsection on "Cache Coherency" for a more thorough example.
 CONTROL DEPENDENCIES
 --------------------
 
-A control dependency requires a full read memory barrier, not simply a data
-dependency barrier to make it work correctly.  Consider the following bit of
-code:
+A load-load control dependency requires a full read memory barrier, not
+simply a data dependency barrier to make it work correctly.  Consider the
+following bit of code:
 
 	q = ACCESS_ONCE(a);
 	if (q) {
@@ -615,14 +615,15 @@ case what's actually required is:
 	}
 
 However, stores are not speculated.  This means that ordering -is- provided
-in the following example:
+for load-store control dependencies, as in the following example:
 
 	q = ACCESS_ONCE(a);
 	if (q) {
 		ACCESS_ONCE(b) = p;
 	}
 
-Please note that ACCESS_ONCE() is not optional!  Without the
+Control dependencies pair normally with other types of barriers.
+That said, please note that ACCESS_ONCE() is not optional!  Without the
 ACCESS_ONCE(), might combine the load from 'a' with other loads from
 'a', and the store to 'b' with other stores to 'b', with possible highly
 counterintuitive effects on ordering.
@@ -813,6 +814,8 @@ In summary:
       barrier() can help to preserve your control dependency.  Please
       see the Compiler Barrier section for more information.
 
+  (*) Control dependencies pair normally with other types of barriers.
+
   (*) Control dependencies do -not- provide transitivity.  If you
       need transitivity, use smp_mb().
 
@@ -850,6 +853,19 @@ Or:
 			      <data dependency barrier>
 			      y = *x;
 
+Or even:
+
+	CPU 1		      CPU 2
+	===============	      ===============================
+	r1 = ACCESS_ONCE(y);
+	<write barrier>
+	ACCESS_ONCE(y) = 1;   if (r2 = ACCESS_ONCE(x)) {
+			         <implicit control dependency>
+			         ACCESS_ONCE(y) = 1;
+			      }
+
+	assert(r1 == 0 || r2 == 0);
+
 Basically, the read barrier always has to be there, even though it can be of
 the "weaker" type.
 


^ permalink raw reply related

* Re: [nVMX] With 3.20.0-0.rc0.git5.1 on L0, booting L2 guest results in L1 *rebooting*
From: Bandan Das @ 2015-02-17 18:00 UTC (permalink / raw)
  To: Kashyap Chamarthy; +Cc: Jan Kiszka, kvm, dgilbert
In-Reply-To: <20150217112426.GL21838@tesla.redhat.com>

Kashyap Chamarthy <kchamart@redhat.com> writes:
..
>> 
>> Does enable_apicv make a difference?
>
> Actually, I did perform a test (on Paolo's suggestion on IRC) with
> enable_apicv=0 on physical host, and it didn't make any difference:
>
> $ cat /proc/cmdline 
> BOOT_IMAGE=/vmlinuz-3.20.0-0.rc0.git5.1.fc23.x86_64 root=/dev/mapper/fedora--server_dell--per910--02-root ro console=ttyS1,115200n81 rd.lvm.lv=fedora-server_dell-per910-02/swap rd.lvm.lv=fedora-server_dell-per910-02/root LANG=en_US.UTF-8 enable_apicv=0

I am not sure if this works ? enable_apicv is a kvm_intel module parameter

>> Is this a regression caused by the commit, or do you only see it with
>> very recent kvm.git?
>
> Afraid, I didn't bisect it, but I just wanted to note that the above
> specific WARN was introduced in the above commit.

You could try an upstream kernel before the recent MSR load/store changes
to narrow down the problem.

Bandan

> I'm sure this Kernel (on L0) does not exhibit the problem:
> kernel-3.17.4-301.fc21.x86_64. But, if I had either of these two Kernels
> on the physical host, then the said problem manifests (L1 reboots):
> 3.19.0-1.fc22 or kernel-3.20.0-0.rc0.git5.1.fc23

^ permalink raw reply

* Re: Breaking chages from 3.13.0 to 3.17.1
From: Kai Krakow @ 2015-02-17 17:59 UTC (permalink / raw)
  To: linux-bcache
In-Reply-To: <CAGCathzXBxg1aOBCJ4cmhEmeMVsdXOScA6kn=eNZeZgOSsSd-Q@mail.gmail.com>

Lucas Clemente Vella <lvella@gmail.com> schrieb:

> Hi, I've updated my kernel from 3.13.0 to 3.16.0, but the new kernel
> wouldn't boot (I belive because of my bcache setup). So I have updated
> a little further to kernel 3.17.1, and now it boots, but I get the
> following log messages:
> 
> $ dmesg | grep bcache
> [    1.156474] bcache: error on 585603df-7dd5-4d6f-a2ab-e80b59cc994d:
> no journal entries found, disabling caching
> [    1.157393] bcache: register_cache() registered cache device sdb
> [    1.157464] bcache: register_bdev() registered backing device sda2
> [    1.157598] bcache: register_bdev() registered backing device sda1
> [    1.157695] bcache: cache_set_free() Cache set
> 585603df-7dd5-4d6f-a2ab-e80b59cc994d unregistered
> [    1.239026] EXT4-fs (bcache1): mounted filesystem with ordered data
> mode. Opts: (null)
> [    1.425166] bcache: bch_journal_replay() journal replay done, 788
> keys in 92 entries, seq 1095169
> [    1.455283] bcache: bch_cached_dev_attach() Caching sda2 as bcache0
> on set 25497b90-14dd-4242-b35a-a15598492902
> [    1.455317] bcache: register_cache() registered cache device sdb3
> [    5.011443] EXT4-fs (bcache1): re-mounted. Opts: errors=remount-ro
> [    7.649948] EXT4-fs (bcache0): mounted filesystem with ordered data
> mode. Opts: (null)
> 
> This first message worries me, and I didn't had it before. Does it
> means that the SSD caching is bypassed entirely? Was there any
> incompatible changes between the two kernel versions? If so, how can I
> safely reenable the caching?
> 
> It seems weird that it is trying to sdb as cache device, because only
> the partition sdb3 was formated as cache.

Did you maybe first format sdb as bcache, then decided it would be better to 
partition it, then formatted sdb3? This could mean there's an orphan 
superblock lying around which is detected when bcache initializes. I once 
had a similar behavior where I formatted sdb as btrfs, then decided it would 
be better to have a GPT partition, and then formatted the partition. lsblk 
or blkid still showed me the wrong device (but also the partitioned one) and 
I decided to better use wipefs on the device and repartition again so this 
orphan superblock doesn't cause any havoc later.

So, essentially the change between those kernel versions could be how bcache 
detects its devices.

If this is the case and you are brave, you could find out which offset the 
superblock of bcache is at and destroy its superblock signature by changing 
a single byte of the raw sdb device with a hex editor. Just pay attention 
that it is not within some partition boundary which holds important data. 
You could also try to wipe sdb1 (write zeroes) after storing its data in a 
tar archive, when recreate its fs and restore from tar. If some orphan 
superblock is within the boundaries of sdb1, it would essentially be 
destroyed. If you are using modern partitioning, there's usually a gap 
before the first partition of 1 to 2 MBs which could also be wiped. But pay 
attention that boot loaders may have put payload into that gap.

I'd check the output of blkid and lsblk from the old and new kernel first, 
best being done from a rescue system. Then compare the UUIDs of the detected 
partitions between old and new kernel. It should give an idea of what's gone 
wrong.

-- 
Replies to list only preferred.

^ permalink raw reply

* Re: [PATCH net] ematch: Fix auto-loading of ematch modules.
From: Cong Wang @ 2015-02-17 18:00 UTC (permalink / raw)
  To: Ignacy Gawędzki, Cong Wang, netdev
In-Reply-To: <20150216185011.GA29935@zenon.in.qult.net>

On Mon, Feb 16, 2015 at 10:50 AM, Ignacy Gawędzki
<ignacy.gawedzki@green-communications.fr> wrote:
> On Mon, Feb 16, 2015 at 10:36:06AM -0800, thus spake Cong Wang:
>> On Mon, Feb 16, 2015 at 10:13 AM, Ignacy Gawędzki
>> <ignacy.gawedzki@green-communications.fr> wrote:
>> > In tcf_em_validate(), when calling tcf_em_lookup(), don't put the resulting
>> > pointer directly into em->ops, if the function is to possibly return -EAGAIN
>> > after module auto-loading.  Otherwise, module_put() will be called by
>> > tcf_em_tree_destroy() on em->ops->owner, while it has already been called by
>> > tcf_em_validate() before return.
>> >
>>
>> Or simply reset em->ops to NULL after module_put()?
>
> Yeah, why not.  I just got my inspiration from what's done in cls_api.c and
> act_api.c.  What do you think, should the same simplification be applied to
> cls_api.c?
>

I prefer the smaller change, we don't have to align with cls_api.c.
Yeah, you can always clean it up for net-next.

Thanks.

^ permalink raw reply

* Re: [review-request] adamian/201502016_download_bugs_72207206
From: Barros Pena, Belen @ 2015-02-17 17:59 UTC (permalink / raw)
  To: Damian, Alexandru, toaster@yoctoproject.org
In-Reply-To: <CAJ2CSBvtr4nnAdmo136hm5=Bt5REHt-Yp+g8h6m9myg_LdMY5Q@mail.gmail.com>

This is working pretty well. The only issue is that the 'download build
log' icon is missing from the project builds page.

There is a bigger problem, though. Downloading the cooker log works, but
all other artifacts (rootfs file, task logs and other artifacts) are
throwing an error. This is the one you get when you try to download a
rootfs file

Environment:


Request Method: GET
Request URL: 
http://127.0.0.1:8000/toastergui/build/1/artifact/imagefile/id/1

Django Version: 1.6
Python Version: 2.7.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'orm',
'toastermain',
'south',
'bldviewer',
'toastergui',
'bldcontrol')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py"
in get_response
  114.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/home/yocto/poky-contrib/bitbake/lib/toaster/toastergui/views.py"
in build_artifact
  3055.             return _get_be_artifact(request, build_id,
artifact_type, artifact_type)
File "/home/yocto/poky-contrib/bitbake/lib/toaster/toastergui/views.py"
in _get_be_artifact
  3063.         file_name = _file_name_for_artifact(b, artifact_type,
artifact_id)
File "/home/yocto/poky-contrib/bitbake/lib/toaster/toastergui/views.py"
in _file_name_for_artifact
  2984.             file_name =
Target_Image_File.objects.get(target__build = b, pk =
artifact_id).file_name
File "/usr/local/lib/python2.7/dist-packages/django/db/models/manager.py"
in get
  151.         return self.get_queryset().get(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in
get
  298.         clone = self.filter(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py"
in filter
  590.         return self._filter_or_exclude(False, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py"
in _filter_or_exclude
  608.             clone.query.add_q(Q(*args, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in add_q
  1198.         clause = self._add_q(where_part, used_aliases)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in _add_q
  1232.                     current_negated=current_negated)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py"
in build_filter
  1125.         clause.add(constraint, AND)
File "/usr/local/lib/python2.7/dist-packages/django/utils/tree.py" in add
  104.         data = self._prepare_data(data)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/where.py"
in _prepare_data
  79.             value = obj.prepare(lookup_type, value)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/where.py"
in prepare
  352.             return self.field.get_prep_lookup(lookup_type, value)
File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py
"
in get_prep_lookup
  369.             return self.get_prep_value(value)
File 
"/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py
"
in get_prep_value
  613.         return int(value)

Exception Type: ValueError at /toastergui/build/1/artifact/imagefile/id/1
Exception Value: invalid literal for int() with base 10: 'imagefile'





On 16/02/2015 18:28, "Damian, Alexandru" <alexandru.damian@intel.com>
wrote:

>Hello,
>
>I have a patch that brings in proper cooker log saving, and downloading,
>after a build.
>
>Can you please review this, see if it works ok ?
>
>
>Cheers,
>Alex
>
>
>-- 
>Alex Damian
>Yocto Project
>
>SSG / OTC 
>
>
>



^ permalink raw reply


This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.