Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp2174208ybm; Sun, 31 May 2020 11:04:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRNBj03HtjyM1kDsV3fvEBeyW1+dahtthz52KcsNRrl5KwcbApz5p7wdnMKHLNvhOYf/TB X-Received: by 2002:a17:906:7c58:: with SMTP id g24mr5358173ejp.205.1590948285530; Sun, 31 May 2020 11:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590948285; cv=none; d=google.com; s=arc-20160816; b=H0D0s+LyKQM92/Pzh45T3ChvR968U4baZw36/Hqdmbfr/2AQSFk6oTjucLrioAmfKC Y4rLsGyB/xyFpd64njjTt6eiBRbfhJHlVCaNvkPwSQAtlvl/bhCna6WXlE8frdvW4jE9 Ni3h25LG524KUL3BHcir4XEi9H7U4YNGJ7hfxlhCZtR3Aq+wd+E/d5yep5YV+CUSmv+k k3uh2Mdvi5TPjRWPtDXbY9kw4g5sfsRv7nsiuZW0eNmBH8ERrRbA6fQilzV28Gsi0Iqj ecaZCxkLJ2mGT9WFcMJYMcPAIM+H3/ef+LQ7ldPGzQE5Mk6i4aEFmHYE1RCYU0+5x/BG mkmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject:dkim-signature; bh=leydVdt4TGLLVijp27gSVK5CDfMn9AxENzgQ1l1jI5Q=; b=qoQNkWYKleg1vUpmAbgrWjG65JKcflui0QhVlAm9Ksse2ZcRcnQ56Gccq8o7OUdabG 11yglolHM9oi0Mn5MC7zG02p4nww0UIccdVcCshixeIj/qXUSfIT4v0B9/WsrpGwkjwy /y6WQh3/m5IGsV+1HcP1RlJ5xPh2u2jHHguSKpZmtwj16AoXqaQAbiD3QP7AQzFBDEPr EQE795J6VyCrgPXGHQQxwpUxEENaV7v1yRuVURZY8j24GCdgCDFw917UMTQsBtwfcsJe eKmRYHvRs1ffZLh9CXQ/+9gkzXr+xnhlGf51ZzU6KaBSa8eO7tN79u+in537QldQhQD1 yC9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=maQ8aI2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y89si8576296edy.357.2020.05.31.11.04.22; Sun, 31 May 2020 11:04:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=maQ8aI2X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728232AbgEaSBy (ORCPT + 99 others); Sun, 31 May 2020 14:01:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbgEaSBx (ORCPT ); Sun, 31 May 2020 14:01:53 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81D21C061A0E; Sun, 31 May 2020 11:01:53 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id g28so6335443qkl.0; Sun, 31 May 2020 11:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:autocrypt:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=leydVdt4TGLLVijp27gSVK5CDfMn9AxENzgQ1l1jI5Q=; b=maQ8aI2XRyhRs7Vxwii2Uil8AMlfuhWjXFH4wq4U+FuTp7cl38ifFW4S4mM04tNHeh fs3rnQjwRYkYorYedAxRSQUb2t5pQeIWWzLptmCUYX18ohgVeA8xzTS0rLfDtMn1yD74 Pr6HIpDB86MKImrHKbeRoyKObFtusmEMDsY1iwT+Bq5ikqAptHxt5GVX2K7bNk4hefnZ 4nuF1FkCw6RrB7w6F8o+6RMx/6pnHaTq4jUUphNcdSWUM/mm32F901RSnhEH2XMX6y6J Pre1dcq7HC0SJ9x/UH/sSX3al2407f5izf196kBJal6ZQvbqeBNd3krkp6M6TAAxV3KC QSqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=leydVdt4TGLLVijp27gSVK5CDfMn9AxENzgQ1l1jI5Q=; b=XkV6jO6zHO9Yhi+BtdK+WirwsJRPNFV2Z9W+9ExnjhIy3Dtp8wBHyCyPbHN/v/W1TZ ijchKVGq+YfBYqyAx5s8ceag6BqiXkGWh6gDz85bn4/lHy0skHoaTOI22Azd8j00Tiej J8qU9QPICALZAKco4EbaaX7Bj1fnQTXXb8rXSLN9qGB7UZUWEpcOx3BtDqlUgIaPrw15 9oEXZ6JHgMyn9u1SRtrGH0EhnkKckExW3OhaVSDmcn+2sqS7QBEFUIiVL2tYQlo2l6vL 20OivfiK3KJ69bF+l/KYPp4bdKDp0zXRdNCnKhhyxSXw3RPf19Aayi2KYNx7mli4ciFU haEg== X-Gm-Message-State: AOAM530qqIBa7onfp13lRypld4TO028MzJ0i4+iAkR3aXZLflSkfu5vi HRi+oq8WjHsARYXP+8ZmFrs= X-Received: by 2002:a37:ef12:: with SMTP id j18mr15757439qkk.306.1590948112570; Sun, 31 May 2020 11:01:52 -0700 (PDT) Received: from [192.168.1.62] (89-178-168-199.broadband.corbina.ru. [89.178.168.199]) by smtp.gmail.com with ESMTPSA id p17sm11957631qkg.78.2020.05.31.11.01.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 May 2020 11:01:52 -0700 (PDT) Subject: Re: [PATCH RFC] seccomp: Implement syscall isolation based on memory areas To: Matthew Wilcox Cc: Gabriel Krisman Bertazi , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Thomas Gleixner , Andy Lutomirski , Will Drewry , "H . Peter Anvin" , linux-security-module@vger.kernel.org, Zebediah Figura References: <20200530055953.817666-1-krisman@collabora.com> <202005300923.B245392C@keescook> <851rn0ejg9.fsf@collabora.com> <9a512096-7707-3fc6-34ba-22f969c0f964@gmail.com> <20200531164938.GF19604@bombadil.infradead.org> <20200531173157.GG19604@bombadil.infradead.org> From: Paul Gofman Autocrypt: addr=gofmanp@gmail.com; prefer-encrypt=mutual; keydata= mQINBF0Dv54BEAC1ATtFV/oNVw7bEH41UKUhzGR3FkorCsQuLZmSV8/ztVoukgl16O9FTd+Z T3nMiT5hEo4EfO7IcmXPputpKnxBAcAxW78i3kd6dgYs56/F56R5g+0RGqojuA+nx1ij+Cg3 erbaq6Zrg3jMjiSIiT1O9fHEj1xT5QCX3IhEyMX+Gg5HAM/fw5O059S7i9Dmz9d/7FgkLsr8 PS/pA+dQcC3R59/Be8MqjtnnfTlp+X7JFrcfJ50bGdMf4Cs3L3OsaUtydO/Znp3snPPBJktE fti9DCPcJskwN14S9yyRVj75pib2thLHmcWOTbFw+MOHzhk1K47QOSQgoHPd7QvegmDiUOJa 8gCCCLnNY+oIRP93a1lIm7YOab3TeImU5DcJ6S/+kyXw9qlJxhrzKdERJDGkEXP/3/tsnD8q 5sEO8GM9AppAxzkthZV98gKPOs+AA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/haWLcCmxWgQvXBmHb1FuTgSw1BO0ni/F6gzDZW1CPmbcsPO/ KEwkIMCF3/JzNDLiTC1cfnaSIDeMsPyU16Nv5v849Tkh1GvikyfDk49QVqjph/tQ8lKg1Imu ciR6z5o1avxdf4+E7IkJyDItxCxo0rNrZoLb9qvwgRcI4XP0Y4pw01iHXRff8/RDVTCmxUau Qhr4fPQqB3v+P2iWtyEPiT2jiUiASeHprY0PJzz/X4uIcJM4286D6f2Lxt4XPZBfM4h6082p lhxeUnfUGYARdiQF6hVUmmXaXkCZPoakovWwbGmL2l7bbAPdcwlrsqM95wqJ72WFxxYP96OO 2YVmrcr1e5NKsu7izqjiu+JS70BAHhy2BOyqI4f89DzW0u3jfMNC9jqliWwo7zRCPA== Message-ID: <9c1f9db8-5680-cd1a-37aa-5f494b034825@gmail.com> Date: Sun, 31 May 2020 21:01:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200531173157.GG19604@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/31/20 20:31, Matthew Wilcox wrote: > If it's the cost of the syscall that's the problem, there are ways > around that. We'd still want a personality() call to indicate that > the syscall handler should look (somewhere) to determine the current > personality, but that could be issued at the start of execution rather > than when we switch between Windows & Linux code. Sure, we can call personality() at start and specify the location to look at, the only thing is that the location should be thread specific, that is, based on fs: or gs: or whatever else which would allow us to have different threads in different "personality" state. If anything needs to be set up at thread start we can do that also of course. If there will be any proof of concept solution I will be happy to make a proof of concept Wine patch using that and do some testing.