Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2216393ybb; Mon, 30 Mar 2020 01:39:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsb+K+FYkKgRZowgWdnJY4nlkXLRXpowb481HGJ/uZ4//laeHf1fgFZjQ463RP7g/4+EYbG X-Received: by 2002:a9d:5cc8:: with SMTP id r8mr8729009oti.18.1585557585601; Mon, 30 Mar 2020 01:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585557585; cv=none; d=google.com; s=arc-20160816; b=lDc6a7SGmHYnsfbHqOg8boyaKfddQnwTm7Bv+4EuajeydpYxpWvdVbpXlOu4g0LLZ0 +xAU9R7CfOij7xCeT3//KH2bPZ7Vxy1zg4r+5HqT38ejqdo9Jrg4hIitVmj3xrQsRvAB bxr7+Qu88wSP98inEcjsvZ+KSm/folLRZ6WBQATGG87GcH+gbDnTCW5e/+OSbRgioxef AhZC1KC5DZ5qNSkndNtX2dtVrDB0VDfdbrYRv6ghK8JUKPiznH8sOUy3Sqg/sDViu2vx cKC0q7CFxkMjyJNFtoWP5n38bqc2g7zNqZr/md1aZP9dXKm78XBhh4+V+AuSJJRVsd0G r3ow== 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=4xCc6G1fjYHS6JfynXvIUwvrt/yvbN0xlTjIkaNy98k=; b=bljKS1Lcuasn0bxwPH8hGGRzzN2IZTRT89koNKQwwYRlYv6KIEYBtA5y24CPYTjHVC XE5/fNqgmECMWUMQRFyc+VOW7LFYBqzI7FuC40NNXLinFllIq7re2z11FXeMJuXIQ3ho YqGwfQn9sMuHg4uhjTzcK4TtgM9k9JudMX1/MFfu3x/FXK34tzG6ns7MjGPpZyDoq2Cn JZd8ryjhVvZZ27KlB1whLfTrwHosevu5Qlye/I6z8WcaWSXujZa/minX4jUsydE9qu15 VtcEbnuSLgk/dpArAGza41sdVIVMvMBHKD+QRxH2L5KyK6KaWxc1RZb3ev7zAEnKE+Rr j4uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wLmWxuLq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s63si5661302oig.69.2020.03.30.01.39.33; Mon, 30 Mar 2020 01:39:45 -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=@google.com header.s=20161025 header.b=wLmWxuLq; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729757AbgC3IjF (ORCPT + 99 others); Mon, 30 Mar 2020 04:39:05 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:45714 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729743AbgC3IjD (ORCPT ); Mon, 30 Mar 2020 04:39:03 -0400 Received: by mail-qk1-f196.google.com with SMTP id c145so18031971qke.12 for ; Mon, 30 Mar 2020 01:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4xCc6G1fjYHS6JfynXvIUwvrt/yvbN0xlTjIkaNy98k=; b=wLmWxuLqn8KyJaQMB7X5bKCXwFjzc5aFDK54p9NPQtlgVlF2qRui1Xn+J/PqS4qYdz AxLC7N7UABn9fGxFWDIPvFekDu1Jaj4Qqquj0+qYV0+jNm47Nrh9Q+ql9OERMuHOW64I fXbROUpYZvtnx4heJlLaJK3lpjs7IcUK32hoVLJ7BhWF+SlCKPVU69yTC3EVQ/ag7puD TAF29OMOzh0T0AXrI6jehsr68PwCEZaIJQTR7XzZ74rB7ZNyGsC60Z+W+p8LcQD5e4lu HgU3SCJiO2lyWPfTmxhKfiTLO37E6vKkEY4EpCU7mbYrmffaw03ZICFZK8CGiE9d08mH iIwg== 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=4xCc6G1fjYHS6JfynXvIUwvrt/yvbN0xlTjIkaNy98k=; b=dPWuCOyUBJ0OLWFU4eU8nP+vyZXVrmxFrBQKbpyFi9eEEPYKilvB5gehJ5TIP7pFWI j8ysgtKTti7w+kjyx1YxZ8RLlTQM7puUogXGCSJHXgWOAmGB6FPu+WC621wMVIzGOCzu YV8DMliVnMrCjXdbvfFqS1WAc5TjqGWy0Srx2pwPRTLbKIPZ1Vm8EtUzabNhobUijZqg 1EIw7h3LpYGGm1EPPwU4j6Ukt/cUD5CNgmSLjV6M4hQbIeHw/dpeXH6vRaI/CrkzwLnG 7joqYez5Daq9Z5raz5t76NhpBDfGA8tGsg42W3+rWTwWWKnah76nv/ZZZOOSs/wG8u7z AXCQ== X-Gm-Message-State: ANhLgQ2ui0hpuYYFbHrz0SxJqH+wd1xfoGq3sk/oO0fX2BJJfx1X5ofQ rr8xc5+DmbOzCIH7GYJwP26vgQ2plgGcczd5X64l2A== X-Received: by 2002:a37:bc47:: with SMTP id m68mr10748443qkf.8.1585557542372; Mon, 30 Mar 2020 01:39:02 -0700 (PDT) MIME-Version: 1.0 References: <20200226004608.8128-1-trishalfonso@google.com> <4b8c1696f658b4c6c393956734d580593b55c4c0.camel@sipsolutions.net> <674ad16d7de34db7b562a08b971bdde179158902.camel@sipsolutions.net> <2cee72779294550a3ad143146283745b5cccb5fc.camel@sipsolutions.net> In-Reply-To: <2cee72779294550a3ad143146283745b5cccb5fc.camel@sipsolutions.net> From: Dmitry Vyukov Date: Mon, 30 Mar 2020 10:38:50 +0200 Message-ID: Subject: Re: [PATCH] UML: add support for KASAN under x86_64 To: Johannes Berg Cc: Patricia Alfonso , Jeff Dike , Richard Weinberger , anton.ivanov@cambridgegreys.com, Andrey Ryabinin , Brendan Higgins , David Gow , linux-um@lists.infradead.org, LKML , kasan-dev 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 Mon, Mar 30, 2020 at 9:44 AM Johannes Berg wrote: > > On Fri, 2020-03-20 at 16:18 +0100, Dmitry Vyukov wrote: > > > > > Wait ... Now you say 0x7fbfffc000, but that is almost fine? I think you > > > confused the values - because I see, on userspace, the following: > > > > Oh, sorry, I copy-pasted wrong number. I meant 0x7fff8000. > > Right, ok. > > > Then I would expect 0x1000 0000 0000 to work, but you say it doesn't... > > So it just occurred to me - as I was mentioning this whole thing to > Richard - that there's probably somewhere some check about whether some > space is userspace or not. > > I'm beginning to think that we shouldn't just map this outside of the > kernel memory system, but properly treat it as part of the memory that's > inside. And also use KASAN_VMALLOC. > > We can probably still have it at 0x7fff8000, just need to make sure we > actually map it? I tried with vm_area_add_early() but it didn't really > work once you have vmalloc() stuff... But we do mmap it, no? See kasan_init() -> kasan_map_memory() -> mmap.