Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1868520ybv; Thu, 6 Feb 2020 11:15:52 -0800 (PST) X-Google-Smtp-Source: APXvYqznyG+pRjctHMbf/qB4mzhvglcs8mRKYbUTxuKztaTtieRF3x03AScz+S1qSUFLiQlwzeYe X-Received: by 2002:a9d:6045:: with SMTP id v5mr29996873otj.252.1581016552832; Thu, 06 Feb 2020 11:15:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581016552; cv=none; d=google.com; s=arc-20160816; b=YrpmXDgGQ0O8MqoDqxjVNQTNCNtSNPgxO1w34fDbRvevLkQaRsINu+F8F9RvO2ofgv 61DS7eJvLgH7QMUerJx5vSm25OBvKaIKo+rDEBAnFTpPXt4TxU+ISCx+zippboW9pRen 8JCJAHcwQOLAcsDja4ZE2+DULzi/+dTAMXRd6KN/czPN9R4UCcZq0xm64Al1K53OtSwk JELGVgxK208b+URXlvC8TOB2sqYCnfc7pP71+oLFFo/VZIjHi0QGxPNxrQ6jf7O/nLri QhTivf+J9Jvquzs1mWyKgbX8RlPO+jP7jTxjIPOrHWB/pUU25Sc2KPlA1c3+QnRF577A KYjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=DaMzmdp9KPwoYdjy52GXeRjHpG71fTyHHrhWGiOklGo=; b=uZpsIzIq9dEAWGjg2nc1YVb9Me/HtnJb7El6w6vzkDfIYlLI8YLo5AsRysfYJze7AG JM90NIq0L9fuI/6Ixnp+O4yQXNlqfm6a8pN8/fI14EuvDLjqMqmwNbqHHu6h6unZpawr Ti6UXH+CWyZdDIakSFGReHtpex8+ESs/Z6uDfD0lgYVZ+5nx98EZVOw4wuIysWjIaog4 G6+QtNHj2ywkmQqBarqdPscfv2dO6mWDOMmvh/1YxdAKbMT6Vb1vc71EIQr1ygK+UsTP yInbxuYDRf15a1hX8ij0ys75SW7gT3MiJWBYTuECxk1DcGRQwJ2RXf3oM3cxTyHlh78z MwNg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16si324341otj.7.2020.02.06.11.15.39; Thu, 06 Feb 2020 11:15:52 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbgBFTOj (ORCPT + 99 others); Thu, 6 Feb 2020 14:14:39 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:40576 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726990AbgBFTOi (ORCPT ); Thu, 6 Feb 2020 14:14:38 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1izmbg-005xA3-5k; Thu, 06 Feb 2020 20:14:32 +0100 Message-ID: Subject: Re: [RFC PATCH] UML: add support for KASAN under x86_64 From: Johannes Berg To: Patricia Alfonso Cc: richard@nod.at, jdike@addtoit.com, Brendan Higgins , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-um@lists.infradead.org, David Gow , aryabinin@virtuozzo.com, Dmitry Vyukov , anton.ivanov@cambridgegreys.com Date: Thu, 06 Feb 2020 20:14:31 +0100 In-Reply-To: (sfid-20200206_192212_045280_EBE78060) References: <20200115182816.33892-1-trishalfonso@google.com> <4f382794416c023b6711ed2ca645abe4fb17d6da.camel@sipsolutions.net> (sfid-20200206_192212_045280_EBE78060) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Patricia, > I've looked at this quite extensively over the past week or so. I was > able to initialize KASAN as one of the first things that gets executed > in main(), but constructors are, in fact, needed before main(). They're called before main, by the dynamic loader, or libc, or whatever magic is built into the binary, right? But what do you mean by "needed"? > I > think it might be best to reintroduce constructors in a limited way to > allow KASAN to work in UML. I guess I'd have to see that. > I have done as much testing as I can on my > machine and this limited version seems to work, except when > STATIC_LINK is set. I will send some patches of what I have done so > far and we can talk more about it there. I would like to add your > name, Johannes, as a co-developed-by on that patch. If there is a > better way to give you credit for this, please let me know. I think you give me way too much credit, but I'm not going to complain either way :-) I'll post in a minute what I had in mind. johannes