Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp666491ima; Wed, 24 Oct 2018 07:25:22 -0700 (PDT) X-Google-Smtp-Source: AJdET5fCR7ylJ+BMlnx+Wj/4gk9IoMPyT8dXaK8GhkX4wmwFl60Lvog0HWGwe1bMs4ADkzFTWzNj X-Received: by 2002:a17:902:744a:: with SMTP id e10-v6mr2752807plt.61.1540391122597; Wed, 24 Oct 2018 07:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540391122; cv=none; d=google.com; s=arc-20160816; b=mmmM9KGtPIxYGE/wP4Mt6uNhsmj11BoQxdw8Ok/4xNeeGEbKM1VY71hEJys8AhvmMp khPbqtE1IdL3xsbOpRlxQthylIXTN8P8zh7QWxy4C1AqHPH3Zh3hB5fHiuGzEfqW+tN5 FlwLvIr7kZJuqc5DDCC0ZzqMOE2LkRO+QHEwCJNh6ksGTXorX0GsOYPqAMEVsNmJqq2d AeKYxg/j9/gZleo1w8sWJGvUKuiRRgxERuz/A7wpLw8NXCdNR9x63W0cCr7IT0SFp8G8 LGI4/ioYZ/yvtw73E4Mizv31KY2jIrAUx5OURIcfJ01HdlERUsO0KaoJQiE9CoKMDw2q Z2Pg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=EacAJt177YLzPE8oeya/HZifyz3262DmkdK5FVCZxak=; b=klfNPb2gsYy6OFvicWhh9EDPv9L0hiZJyc0kCYrwtopyarpcaobGAcRNb/SMayZ/Bn XwjfdbYK0fxozfZ8iwWLzWF+Jb5dtWl9OhmpS6gH5J1ogjKJ57R+VBgOdfH8qcVjHkhE y38EyjoxDZEnCG+uh1MferbV+e3h0meaDVbjgmQ/uWbxbt81XDzxVzLfG+EDlhSlnE4y iLZYyCMzR79Sut9rkdsZ/ud4zWUvLnST5st2dsxvzdPTNvAFE9MtL4oVuutOwjmt/ElG TdEOSUZP/O7XHgc3JjXPoRB9mRz6GzDGOXpDfCvjamcqOm8T5z6rHbovZVyLYMEVw/hc wQ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fq4xOPit; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 76-v6si4694909pfv.135.2018.10.24.07.25.06; Wed, 24 Oct 2018 07:25:22 -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=@gmail.com header.s=20161025 header.b=Fq4xOPit; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbeJXWw2 (ORCPT + 99 others); Wed, 24 Oct 2018 18:52:28 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:40250 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726426AbeJXWw1 (ORCPT ); Wed, 24 Oct 2018 18:52:27 -0400 Received: by mail-lf1-f67.google.com with SMTP id n3-v6so4125907lfe.7; Wed, 24 Oct 2018 07:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EacAJt177YLzPE8oeya/HZifyz3262DmkdK5FVCZxak=; b=Fq4xOPithePGaeg35/vJrK9nJS5UZ2GgnIZ6h4wUg/fCMTfD+fFsWimmX8c+OW1diu YgVrk214QPrbcJgRxBgYcLkifBsIe+1Z4MMzAxmhJzOLIOPoFoujBKn25IuPF2knOhaC snjq4gOte+Y7fDPqTjAEdTgnbIcnmuPCgubAhCVC03dhBq91vX8Q9BFAng3ADN6/5DvO FNuqKCNCRvBuVskYqvn1ZsbPI26g2EwRcqj7fWA8nBi2dYfu6CF0kFBMBnLhuOhJ0qab ntqaBG/H4vy4RF23pL5iQiQ+UJVDVuc/xwHEiBRvcYKetGrt89CNOgQJMxYOu+66Djv5 aI8g== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EacAJt177YLzPE8oeya/HZifyz3262DmkdK5FVCZxak=; b=PlWp90SuK7oOUBlLO43ZAvcoAVgFVs9D7nR58xrtPH0YRRAgoAiyUthNRiHAh+pL5Q i0fMj/LRR/DHkzn2tBtyrpV7IVgQZGfZ6luuidyQnI92MnCbhopOvM/8PdzmPT+mmjj9 g2hS9B/efgtUG2TspgwbfTYN9/aPfLue+wmXJAvk75j9MFYiZ5S/0pwixw/5NwuMVssp 9MHoHnPzu1XtR20uQM5bODcjzIGwV99+SrEgNip61NoRUs+VKg/dN5N/oN/rbly5GRMt T8VwWDpfcoN60pxSbxkCp5ibGK9xCnwa9XeDYx0oVkziU5mnk4e1ZKHwJJAag1wQgu1K MZwQ== X-Gm-Message-State: ABuFfojTrMNBGTIPsLjxGXQcamZXQocD+KMO9mlkJGYbs3+BpvrWbxIc BIASu5nWLwf5gZ+3EjNmyxtyYhPKV8E= X-Received: by 2002:ac2:41d8:: with SMTP id d24-v6mr14643936lfi.138.1540391045923; Wed, 24 Oct 2018 07:24:05 -0700 (PDT) Received: from [10.222.93.64] ([212.213.198.112]) by smtp.gmail.com with ESMTPSA id q5-v6sm760455ljh.60.2018.10.24.07.24.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 07:24:05 -0700 (PDT) Subject: Re: [PATCH 06/17] prmem: test cases for memory protection To: Randy Dunlap , Mimi Zohar , Kees Cook , Matthew Wilcox , Dave Chinner , James Morris , Michal Hocko , kernel-hardening@lists.openwall.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Cc: igor.stoppa@huawei.com, Dave Hansen , Jonathan Corbet , Laura Abbott , Vlastimil Babka , "Kirill A. Shutemov" , Andrew Morton , Pavel Tatashin , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20181023213504.28905-1-igor.stoppa@huawei.com> <20181023213504.28905-7-igor.stoppa@huawei.com> From: Igor Stoppa Message-ID: <00461c0a-a214-1984-5614-c7a4a2a7ff83@gmail.com> Date: Wed, 24 Oct 2018 17:24:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 24/10/18 06:27, Randy Dunlap wrote: > a. It seems backwards (or upside down) to have a test case select a feature (PRMEM) > instead of depending on that feature. > > b. Since PRMEM depends on MMU (in patch 04/17), the "select" here could try to > enabled PRMEM even when MMU is not enabled. > > Changing this to "depends on PRMEM" would solve both of these issues. The weird dependency you pointed out is partially caused by the incompleteness of PRMEM. What I have in mind is to have a fallback version of it for systems without MMU capable of write protection. Possibly defaulting to kvmalloc. In that case there would not be any need for a configuration option. > c. Don't use "default n". That is already the default. ok -- igor