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:   Wed, 25 Oct 2023 11:55:02 +0000
From:   Vincent Whitchurch <Vincent.Whitchurch@...s.com>
To:     "johannes@...solutions.net" <johannes@...solutions.net>,
        Vincent Whitchurch <Vincent.Whitchurch@...s.com>,
        "anton.ivanov@...bridgegreys.com" <anton.ivanov@...bridgegreys.com>,
        "richard@....at" <richard@....at>
CC:     "linux-um@...ts.infradead.org" <linux-um@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kernel <kernel@...s.com>
Subject: Re: [PATCH] um: time-travel: fix time going backwards

On Mon, 2023-10-23 at 09:33 +0200, Johannes Berg wrote:
> Do you have a specific workload that tends to reproduce this?

I've been seeing it when running roadtest, but it's easily reproducible
without that by using the attached config and the following program as
init.

  cp repro.config .config
  make ARCH=um olddefconfig all
  gcc -Wall -static -o repro repro.c
  ./linux time-travel init=$PWD/repro rootfstype=hostfs

With the above commands I usually see the panic in a few seconds.  This
is on an unmodified v6.6-rc7.

----8<-------
#include <time.h>
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>

int main(void)
{
        if (fork() == 0) {
                while (1) {
                        nanosleep(&(struct timespec){.tv_nsec = 330 * 1000}, NULL);
                }
                return 0;
        }
        
        while (1) {
                struct timespec ts;
                clock_gettime(CLOCK_MONOTONIC, &ts);
                nanosleep(&(struct timespec){.tv_nsec = 22 * 1000}, NULL);
        }
        
        return 0;
}       

View attachment "repro.config" of type "text/plain" (2784 bytes)

Powered by blists - more mailing lists