Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2138898rwd; Mon, 15 May 2023 07:46:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5h4YbeyvER4S1IhK5O+cNFk+S5FjPwIMHvHLqLklC4+GrZlJqf6ldw/BLQeOB9Cv0HLeDQ X-Received: by 2002:a05:6a00:148b:b0:648:8c0d:6e4e with SMTP id v11-20020a056a00148b00b006488c0d6e4emr24845431pfu.19.1684162001785; Mon, 15 May 2023 07:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684162001; cv=none; d=google.com; s=arc-20160816; b=PGdLE05nLRRlkPoTOKIJq+jwm2FOSGDirSJAZUMQ3rk7h4N+qwRx0tSrGj7UdRZVNe SnMPZoFbvcx7gQ+QHOlD5J89HGwd9x5V/SIrVNjrl+oK270lVfUJvu3nOChQ3SnOTehA vYguJbJwU8nt28z368mf8AD6NGeJ7QjhDow7yhAq9J5gy+LHtww9FEMOVvscG5iJ7SB3 nFDg9ahjmv++t6fGOCUdkzO3rHH2X3G/5q4MeRQs5fHdajPxQGsXE041wK19en9Cp+Y2 P+d/nWXVA0UvDIYrybqkn6ZOJLi966kZCE2Jvt5ZDkpvCCToonsCSqBypk7KxtfBqqKV Tdrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QN9RhwORxAG/aP7/kp6kBHRyhjUF7RylPHPAjK6l7vo=; b=pqphQwwuQC9wyME9jZh6YrnMxNRToe6dS/cv0v5tTiEY9ABMTH9IFGTFgrqBwzIZbv D+KSJKjYhmU03jR4ObOUNUJuQJSmY2ZPH1JBcrJz2akjJ4nUazgYD9f0hLSOIXzlZCMq 0rAF44oL2I210xc9BSo+EgfQFDzyZ3DMmTeqnIEBF3NunJIzXhiyg7SlL7tLMHEVMlH9 ryB1hm2KF6zWLWYgOROKYn6/gjnM7zjla7O1pVbFd+LtTV2hnVrXluhSmvpicqEtLvay muMkPgSY1PnGsf5WkoSKKV+wBs24o8xD+Oz5/pTDCY1npCX0pYdeg+2GF9bP0RLEdS4/ QjJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MgJzIN65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020aa78e8f000000b00643aa8d2548si16989738pfr.120.2023.05.15.07.46.26; Mon, 15 May 2023 07:46:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MgJzIN65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240543AbjEOO2d (ORCPT + 99 others); Mon, 15 May 2023 10:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232072AbjEOO2b (ORCPT ); Mon, 15 May 2023 10:28:31 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B4E135; Mon, 15 May 2023 07:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684160910; x=1715696910; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=xfYqN7JzCkoWyoq5r778vSA22m35h9Rh/Z7ivVg+D70=; b=MgJzIN65On4PRivQcdUiaKv9uI/ANGlIdE1FenyRi2tmeqLONzMYQS9p R7082gQymCIssLyq1uuKBqh/KwOb5RIfBAICi4XJqRWTY1g9A2VOQiPti uPXjydQ8/hu1EjraE3SlR6cOxwu2HyhGt9EyTo048mKFSV7o0eBKTAuSi CCf4/agoo8hqHFGiTrZtj6pZd1p2XhtMpIeg9pB1wMFlgC9ZFVHKXbsXr c8X0s8j3ciQPhq4lAUqrq9PGJSMnllrLqc01xCNzjtjvFGbz9D4JfWVUj whM2n/+HPK06qNWfjiMoGr4+IqA9r4Pffm7Ie2jQflL3nkRca5XFnjrj0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="354372400" X-IronPort-AV: E=Sophos;i="5.99,276,1677571200"; d="scan'208";a="354372400" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2023 07:28:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10711"; a="733897472" X-IronPort-AV: E=Sophos;i="5.99,276,1677571200"; d="scan'208";a="733897472" Received: from satwikja-mobl.amr.corp.intel.com (HELO [10.212.213.112]) ([10.212.213.112]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2023 07:28:30 -0700 Message-ID: <2bcffc9f-9244-0362-2da9-ece230055320@intel.com> Date: Mon, 15 May 2023 07:28:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 0/6] Memory Mapping (VMA) protection using PKU - set 1 Content-Language: en-US To: jeffxu@chromium.org, luto@kernel.org, jorgelo@chromium.org, keescook@chromium.org, groeck@chromium.org, jannh@google.com, sroettger@google.com Cc: akpm@linux-foundation.org, jeffxu@google.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org References: <20230515130553.2311248-1-jeffxu@chromium.org> From: Dave Hansen In-Reply-To: <20230515130553.2311248-1-jeffxu@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/15/23 06:05, jeffxu@chromium.org wrote: > We're using PKU for in-process isolation to enforce control-flow integrity > for a JIT compiler. In our threat model, an attacker exploits a > vulnerability and has arbitrary read/write access to the whole process > space concurrently to other threads being executed. This attacker can > manipulate some arguments to syscalls from some threads. This all sounds like it hinges on the contents of PKRU in the attacker thread. Could you talk a bit about how the attacker is prevented from running WRPKRU, XRSTOR or compelling the kernel to write to PKRU like at sigreturn?