From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E78ADC282C4 for ; Tue, 12 Feb 2019 22:39:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EFD6222C9 for ; Tue, 12 Feb 2019 22:39:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="fCfFjWCV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728330AbfBLWjR (ORCPT ); Tue, 12 Feb 2019 17:39:17 -0500 Received: from mail-ua1-f68.google.com ([209.85.222.68]:46711 "EHLO mail-ua1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbfBLWjQ (ORCPT ); Tue, 12 Feb 2019 17:39:16 -0500 Received: by mail-ua1-f68.google.com with SMTP id j8so109097uae.13 for ; Tue, 12 Feb 2019 14:39:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YFMKNvnJ3kQYFBT3u+6m2xpocwP0rFyQ6m2jTIkI53g=; b=fCfFjWCVZvK//Azw02gHCq2Wf+TZyzQo67PjdK4cZacIFv71S2Z88FtQXX3fKTBpKP 09egXjQE+WgB9m24FrKqUeXC9Wmv7R1TozcnA7aWOgsJazvsA8JJftiYgf64Zajp4I0D vPdV4Vxq+YQkzTFZITS1EP8feXnIFOX9/9N+s= 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=YFMKNvnJ3kQYFBT3u+6m2xpocwP0rFyQ6m2jTIkI53g=; b=FqkkMyVpgv2y4se9J6/VuV2a3keLk3fCVXTt03njSwZCiPWw0SJvX1Y5j3fiiJanKs LyQGE8SrHvvk9B9gLDC/zI5hRFYipgMWSbACA3P++KLwoBteX3cZIzBTmxs3iMgDLXku 5OCRMZU+KrTQW4DJkUvHmD25Wjh5iRloXeqEfEu3aip71pIiBOcZ8v85nj+z3zPGbHfQ CMiPu2oatRWUEM7+k0RHrS1AsrpA3eOIft2FHp/z4178kl4vOPOBFlQ+Y41JeFJ/SHVS AwCzs2YiuvHWJeuANfSGITpx6AIn7MthDmih3czKUfRbqTcjtPiaDUjhlqtUpLNJHHDh nnzQ== X-Gm-Message-State: AHQUAuZu5YCw7WarNEP8yJkvskTCwNgzBpgX43AWGuDiH8bi5kEXxE29 TyqmnhCSgtb0N+dvUrqSBDttbrshKpA= X-Google-Smtp-Source: AHgI3IYRXFJDzj7LxB//TY7eofBDr8rCkfLItQRIcRWrGwEyv8FQQdXfNA9QLdqSwhbSgQvbOUjsmQ== X-Received: by 2002:ab0:5484:: with SMTP id p4mr2539076uaa.102.1550011155208; Tue, 12 Feb 2019 14:39:15 -0800 (PST) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com. [209.85.217.47]) by smtp.gmail.com with ESMTPSA id x185sm13075359vkd.27.2019.02.12.14.39.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 14:39:14 -0800 (PST) Received: by mail-vs1-f47.google.com with SMTP id e16so223157vsq.6 for ; Tue, 12 Feb 2019 14:39:14 -0800 (PST) X-Received: by 2002:a67:eb4a:: with SMTP id x10mr2523974vso.172.1550011153602; Tue, 12 Feb 2019 14:39:13 -0800 (PST) MIME-Version: 1.0 References: <25bf3c63-c54c-f7ea-bec1-996a2c05d997@gmail.com> <29cd9541-9af2-fc1c-c264-f4cb9c29349a@gmail.com> In-Reply-To: <29cd9541-9af2-fc1c-c264-f4cb9c29349a@gmail.com> From: Kees Cook Date: Tue, 12 Feb 2019 14:39:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v4 00/12] hardening: statically allocated protected memory To: Igor Stoppa Cc: Igor Stoppa , Ahmed Soliman , linux-integrity , Kernel Hardening , Linux-MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Mon, Feb 11, 2019 at 11:09 PM Igor Stoppa wrote: > wr_assign() does just that. > > However, reading again your previous mails, I realize that I might have > misinterpreted what you were suggesting. > > If the advice is to have also a default memset_user() which relies on > put_user(), but do not activate the feature by default for every > architecture, I definitely agree that it would be good to have it. > I just didn't think about it before. Yeah, I just mean you could have an arch-agnostic memset_user() implementation. > But I now realize that most likely you were just suggesting to have > full, albeit inefficient default support and then let various archs > review/enhance it. I can certainly do this. Right. > Regarding testing I have a question: how much can/should I lean on qemu? > In most cases the MMU might not need to be fully emulated, so I wonder > how well qemu-based testing can ensure that real life scenarios will work. I think qemu lets you know if it works (kvm is using the real MMU), and baremetal will give you more stable performance numbers. -- Kees Cook