Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp4006031ybd; Tue, 25 Jun 2019 12:18:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiGhMaAhFRMNJ3Ha/40T+IjLsoVgtij3of6wub4HouSgIDb8PMQhYJHNczS9B7Bq16IPiZ X-Received: by 2002:a17:902:2862:: with SMTP id e89mr332366plb.258.1561490280637; Tue, 25 Jun 2019 12:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561490280; cv=none; d=google.com; s=arc-20160816; b=jpsllueO6nemsQjNcxfrk5c/GggG/o2H4/nd/xAq2ztGSCpowo8o11Jb/AYGfyCCCR 7Nfr6cGAQAmBwf7EPSUXpUMOO332sHha36zVYNBZDjwbc66TVaAriTjodTTsFY2oWPxA KzgiMQxyQtR9bBOQFUbLHjwlTHHQDMn9+NH0hfh+qND9HXSbZRIzqEcgUQu2iP3V+ipo Rd8CphQKzSKnJ8jU4PRpgbkS/OsDfvJ5rVAIfumBHCjprDGp1aMyGxf3cDMuxWB8L1dp rSfDP3d8yq+VPgV4pUQU24aGuf2ms7xJLeulSfA/Dg6G6wtgxCT7F7b/C1gtZA3y2QqN kpAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0F3/IGgCCwnd7hMlU99ncUwqiOLR40qKHSq5IP68Mzc=; b=EbEvqxmjcAP3CJV4C9w4A2fPZ9aoqCMaqoJPsugLjXbPxTK++p7SvuUeXmf+ZAU9eB qHXLyzVQ7As7jtg40kiWL2dzm0dN1UnQVDdAZi8m9maxpgYB4SBC6rrBhOwNtGKcMF6b 1yrlOFueZ6N/KATHMTg002wsWDQ14nGvmlesZUTOUS2Kn6jgKRNGgAXdllpqmLZ6KCfX vGB7RzmQRpT1aOpzsrgyCInrtMZGH2I70781q9QNCAvqyjS3xjkvbHzItWiOgkOCGfyv s+4wwQcijeiqX3ng2nflsgRPPPFBeH9tsxyL20jcQkX7NowTRjEO4UelTJiNF9xPUbnO KdOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H9QY044u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37si1011512pla.288.2019.06.25.12.17.44; Tue, 25 Jun 2019 12:18:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H9QY044u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732446AbfFYPnC (ORCPT + 99 others); Tue, 25 Jun 2019 11:43:02 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:33318 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726443AbfFYPnB (ORCPT ); Tue, 25 Jun 2019 11:43:01 -0400 Received: by mail-io1-f67.google.com with SMTP id u13so796385iop.0 for ; Tue, 25 Jun 2019 08:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0F3/IGgCCwnd7hMlU99ncUwqiOLR40qKHSq5IP68Mzc=; b=H9QY044uJRljFFwHucCOhLc4TlUNtF2kHhYxC7nwwj7+e/tHCH4wBUIrhXlWTyiEPu PemUAXZSYwJZtlfHJffVKvEOyXZqKhI/6jkT+ttlb2ujT+zSE9te3oFPz9WcsfrzevMg w7ExozMJAmIxfzxm3rh1o8NUDYrCpAyma1xsD7D8kUP4QTmKwdDZ1rrftq0x9sDAC8+b HTRVZlWxj4GDLZ3IWSfyUMSyqULhoSvLKmAzYgpKskjXpAuW/uK49oAWdRpxHsKfnYyd 7fcMfy+qWWNQBnrF9892tr5yKgaPtSiWUPxKnOFQLCmEU/QWVaBSGGuyKR9hVMIQk3xk Z+Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0F3/IGgCCwnd7hMlU99ncUwqiOLR40qKHSq5IP68Mzc=; b=uYYT9Dw6rNNyKXlQ10qMUnX6PN0eAZyzLV1jUcYvZK9+XYQAjyJwxb5C8K8ili7TzM uAJoeCmwtuTZRgeXevCaNyLuW/ARJL2YawnwoLHwavekhBO2wuqO8csfzEx79MTnz566 6+qh+m9MBfubHTV08I2rlBOaF2Sf1EdH/nm0J26SwDbo15y1kKemyYtf+LUCaWGjxYIw eNO9LsfO3Rmuq8O1toW+6wocC5kZ6lu480RK+5V4K0KZt96S2JyyQgdi2bJCkatqHCAY xB4wjtMsqBxeEPrqKB1ualwURT7IZgKOf2AbLp6v0z7q552M6AnC56Rm0BDIs/mE9jQX SwwQ== X-Gm-Message-State: APjAAAW7IhLE4/5dJ5POLaifwzhh80MbhSGk7qJOqrPBHe1KR9Qbus3A o7IEJ2eIbCpkZy3qgO9kj9YFMXwwlWTlpgMCDLic1A== X-Received: by 2002:a02:5a89:: with SMTP id v131mr25486364jaa.130.1561477380793; Tue, 25 Jun 2019 08:43:00 -0700 (PDT) MIME-Version: 1.0 References: <20190620003244.261595-1-ndesaulniers@google.com> <20190620074640.GA27228@brain-police> <20190624095749.wasjfrgcda7ygdr5@willie-the-truck> <20190625153918.GA53763@arrakis.emea.arm.com> In-Reply-To: <20190625153918.GA53763@arrakis.emea.arm.com> From: Ard Biesheuvel Date: Tue, 25 Jun 2019 17:42:49 +0200 Message-ID: Subject: Re: [PATCH] arm64: defconfig: update and enable CONFIG_RANDOMIZE_BASE To: Catalin Marinas Cc: Will Deacon , Nick Desaulniers , Kees Cook , Sami Tolvanen , Jeffrey Vander Stoep , Mark Rutland , Enric Balletbo i Serra , Arnd Bergmann , Maxime Ripard , Will Deacon , Linux Kernel Mailing List , Bjorn Andersson , Dinh Nguyen , Mark Brown , Jagan Teki , Olof Johansson , Shawn Guo , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 25 Jun 2019 at 17:39, Catalin Marinas wrote: > > On Mon, Jun 24, 2019 at 12:06:18PM +0200, Ard Biesheuvel wrote: > > On Mon, 24 Jun 2019 at 11:57, Will Deacon wrote: > > > Thanks for having a look. It could be that we've fixed the issue Catalin was > > > running into in the past -- he was going to see if the problem persists with > > > mainline, since it was frequent enough that it was causing us to ignore the > > > results from our testing infrastructure when RANDOMIZE_BASE=y. > > > > I had no idea this was the case. I can look into it if we are still > > seeing failures. > > I've seen the panic below with 5.2-rc1, defconfig + RANDOMIZE_BASE=y in > a guest on TX2. It takes a few tries to trigger just with kaslr, > enabling lots of other DEBUG_* options makes the failures more > deterministic. I can't really say it's kaslr's fault here, only that I > used to consistently get it in this configuration. For some reason, I > can no longer reproduce it on arm64 for-next/core (or maybe it just > takes more tries and my script doesn't catch this). > > The fault is in the ip_tables module, the __this_cpu_read in > xt_write_recseq_begin() inlined in ipt_do_table(). The disassembled > sequence in my build: > > 0000000000000188 : > ... > 258: d538d080 mrs x0, tpidr_el1 > 25c: aa1303f9 mov x25, x19 > 260: b8606b34 ldr w20, [x25, x0] > This was fixed recently by arm64/kernel: kaslr: reduce module randomization range to 2 GB (and arm64/module: deal with ambiguity in PRELxx relocation ranges to some extent)