Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6928948ybe; Wed, 18 Sep 2019 11:21:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW5+m+j2v6PyXVlLfeXGQMWUa8M7e4SAAL0YenNjJu4nWeapDw5eBxRdSSqGDmaaDl28Qm X-Received: by 2002:a17:906:4890:: with SMTP id v16mr10859048ejq.3.1568830894626; Wed, 18 Sep 2019 11:21:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568830894; cv=none; d=google.com; s=arc-20160816; b=NiuV0YwOv1f6ZRmLGGFJVDSYicLMiUfghlhJO406aO2SuKrW58B4uI2BC1HcPYG0dF vbP5rVT9nO7GH6sg3OaKblCJVYY5TgoWhVKUJbQD9BbDyxpkfoODNkK3d9MdAfyHk0gG X5a17RbjWTUUXXEL2KNGgqzzWEAnbNE7tyFPovEOCOiGHWmWHiMDhz3I57Ua3WrH6cTz 07+Rh14gpIEkFwHPe3iz6tNpxkiKdPsyN7ufgPjMLJee87Pm0EBagdUxnW0jfLdymL3z viP4ySQvAE6D5n0knr+fCYOsU2Ia9V105qvSd/0bjcUpg3JVeAI2+SlBF5LjzH6si9cN YsbA== 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=k2oOr71X6Pjfs9SNiCU0JrFU1FSbjiKu2U5QbxU1Pa8=; b=MlJpDeBOkPHhshywxe1aRjWzvkoqfiDFCqo0awBUypvsPOEjFK2HuGqi1S8mIku+Ik GPbO4DOg6FsHGSRedbmcO27ORuwgnp0jBi9vCey0mpX1TCBSzHXxbBOnPgIsmjnBGT61 R5aoMhNk8yB7P+vhVMyKUv7zwVoVnepjL3qkaRNWJraC3mJR1LZRrsV9Nqi5B+Cr+lOV YbSJJk3EolzRg3lh8XTCivxr6TfeE9F7YPG5PXQE8wGSJx2wvD/4Bq97WQKjb3rWGiTp frtufnGgmpRpmgLvcP0EohDwsdgrUl+V8vHPYDscCkedK82CqdpsSLpxunryyETpBry/ 2jKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=fk975P4W; 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 qo6si1613116ejb.386.2019.09.18.11.21.09; Wed, 18 Sep 2019 11:21:34 -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=fail header.i=@gmail.com header.s=20161025 header.b=fk975P4W; 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 S2387527AbfIRSRP (ORCPT + 99 others); Wed, 18 Sep 2019 14:17:15 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:40516 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728468AbfIRSRP (ORCPT ); Wed, 18 Sep 2019 14:17:15 -0400 Received: by mail-ot1-f67.google.com with SMTP id y39so703725ota.7 for ; Wed, 18 Sep 2019 11:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=k2oOr71X6Pjfs9SNiCU0JrFU1FSbjiKu2U5QbxU1Pa8=; b=fk975P4WEJwwIbRGuJqSyHCBWsyh0aLwiOhzexuxZNdGsSsBvRxHViEfJ1ZPMVCd9n ZRndqvK0/xymsQvUMmllwrbL/SGnZp4EEKYo2LViilu2CdPO5S3skS47Z7aBD40a9hB8 wNdan7JRG4vjc1UhnZQbFMqkxcA2wA3GtErly7V2srWHXeOaXXEgnIF+qVGEPTQ6kB7h RP7znsT3QwMVBSQlR/VQ6CSN5rGNNX3BJVpTwGaaD6H4kqMlPB4RdEg2c14Vna/cJnPj MkVQbhjX/55Lx1Y75NleAWPjEdJbzjCbcFiW7gmzEeXeSaDpduJcMPSoI+1QbdiNicd/ YQEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=k2oOr71X6Pjfs9SNiCU0JrFU1FSbjiKu2U5QbxU1Pa8=; b=Pb8gRPkiwC5uMrVayT8FoOp0znF3j0SQJZYcngv2k+LWlhb+1/elNPISMLv1gIEMY1 yhCv1lzTRuWUg/r3QsZY/AkmNkU7PkUslPNGj8L/q2TL2sEAYLhs8Btqxf9hYJFJZTJL JnTauK3hnk1xz5OjCtnudKi9nBDGSLPJY0BrhgHiRHCm68BnaZtdGXtIdwf8L+mjkNT0 pEoMQl6bM3IYYRahkwfnah0kW6q8Gly96y0eECmonRZjpNvRY8oT6k7ZqdZJ+SeBZc3n vxtyemo1GMq1bazru17NkVEbqAwoybaWRI65zmboNrab4zINiCTf/ahs4ucvYxcM+bQY TwPA== X-Gm-Message-State: APjAAAVq2Mbq/wRL2MVnQjXPvA6bfHnjkV9FkkM6HOaMtTNrJDknDLIb DIdnIcIR5Er5eHwi/M4NEfRYRxjX X-Received: by 2002:a05:6830:16d2:: with SMTP id l18mr3823891otr.271.1568830634671; Wed, 18 Sep 2019 11:17:14 -0700 (PDT) Received: from [192.168.1.112] (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id b5sm1971593otp.36.2019.09.18.11.17.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Sep 2019 11:17:14 -0700 (PDT) Subject: Re: [PATCH] x86/mm: Remove set_pages_x() and set_pages_nx() To: Linus Torvalds Cc: Christoph Hellwig , Linux List Kernel Mailing , Peter Zijlstra , Ingo Molnar , Greg Kroah-Hartman References: <20190918164121.30006-1-Larry.Finger@lwfinger.net> <20190918164518.GA19222@lst.de> From: Larry Finger Message-ID: Date: Wed, 18 Sep 2019 13:17:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 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 On 9/18/19 12:53 PM, Linus Torvalds wrote: > On Wed, Sep 18, 2019 at 10:50 AM Larry Finger wrote: >> >> Is there approved way for pages to be set to be executable by an external module >> that would not be a security issue? > > Point to what external module and why. > > Honestly, the likely answer is simply "no". Why would an external > module ever need to make something executable that isn't read-only > code? That's pretty fundamental. Marking data executable is fairly > questionable these days. > > Instead, what might work is to have some higher-level concept that we > actually trust, and that isn't about making data executable, but about > doing something reasonable. > > See the difference? Making things executable is not ok, but perhaps a > "alternative runtime code sequence" is ok. > > Linus Linus, Yes, I do see the difference. The external module is vboxdrv, which is part of VirtualBox. The setting of pages to be executable appears to have been added in kernel 2.4.20. I am now testing with the former calls to set_pages_x() and set_pages_nx() disabled. Thus far, VMs seem to be running OK. I will contact Oracle to discuss the matter with them and see if there is some special case that requires this facility. If there is one, then they will need to discuss it with you and Christoph. Larry