Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag
From: Jason A. Donenfeld
Date: Mon Oct 10 2022 - 22:58:10 EST
On Tue, Oct 11, 2022 at 12:53:17PM +1100, Michael Ellerman wrote:
> "Jason A. Donenfeld" <Jason@xxxxxxxxx> writes:
> > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote:
> >> Hi Michael,
> >>
> >> On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote:
> >> > powerpc updates for 6.1
> >> >
> >> > - Remove our now never-true definitions for pgd_huge() and p4d_leaf().
> >> >
> >> > - Add pte_needs_flush() and huge_pmd_needs_flush() for 64-bit.
> >> >
> >> > - Add support for syscall wrappers.
> >> >
> >> > - Add support for KFENCE on 64-bit.
> >> >
> >> > - Update 64-bit HV KVM to use the new guest state entry/exit accounting API.
> >> >
> >> > - Support execute-only memory when using the Radix MMU (P9 or later).
> >> >
> >> > - Implement CONFIG_PARAVIRT_TIME_ACCOUNTING for pseries guests.
> >> >
> >> > - Updates to our linker script to move more data into read-only sections.
> >> >
> >> > - Allow the VDSO to be randomised on 32-bit.
> >> >
> >> > - Many other small features and fixes.
> >>
> >> FYI, something in here broke the wireguard test suite, which runs the
> >> iperf3 networking utility. The full log is here [1], but the relevant part
> >> is:
> >>
> >> [+] NS1: iperf3 -Z -t 3 -c 192.168.241.2
> >> Connecting to host 192.168.241.2, port 5201
> >> iperf3: error - failed to read /dev/urandom: Bad address
> >>
> >> I'll see if I can narrow it down a bit more and bisect. But just FYI, in
> >> case you have an intuition.
> >
> > Huh. From iov_iter.c:
> >
> > static int copyout(void __user *to, const void *from, size_t n)
> > {
> > size_t before = n;
> > if (should_fail_usercopy())
> > return n;
> > if (access_ok(to, n)) {
> > instrument_copy_to_user(to, from, n);
> > n = raw_copy_to_user(to, from, n);
> > if (n == before)
> > pr_err("SARU n still %zu pointer is %lx\n", n, (unsigned long)to);
> > }
> > return n;
> > }
> >
> > I added the pr_err() there to catch the failure:
> > [ 3.443506] SARU n still 64 pointer is b78db000
> >
> > Also I managed to extract the failing portion of iperf3 into something
> > smaller:
> >
> > int temp;
> > char *x;
> > ssize_t l;
> > FILE *f;
> > char template[] = "/blah-XXXXXX";
> >
> > temp = mkstemp(template);
> > if (temp < 0)
> > panic("mkstemp");
> > if (unlink(template) < 0)
> > panic("unlink");
> > if (ftruncate(temp, 0x20000) < 0)
> > panic("ftruncate");
> > x = mmap(NULL, 0x20000, PROT_READ|PROT_WRITE, MAP_PRIVATE, temp, 0);
> > if (x == MAP_FAILED)
> > panic("mmap");
> > f = fopen("/dev/urandom", "rb");
> > if (!f)
> > panic("fopen");
> > setbuf(f, NULL);
> > if (fread(x, 1, 0x20000, f) != 0x20000)
> > panic("fread");
>
> Does that fail for you reliably?
>
> It succeeds for me running under qemu ppce500, though I'm not using your
> kernel config yet.
Yes, every time without fail, across two systems and two qemu builds.
Jason