Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1598198rwd; Wed, 31 May 2023 16:45:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fPeHpqvxqR4GGeBW2tu9Kh7EhY8fBykdg7YwdbcdcAygqNnu9xtJSCjy7mtlwGFhPe3b6 X-Received: by 2002:a17:902:ecc2:b0:1a6:a405:f714 with SMTP id a2-20020a170902ecc200b001a6a405f714mr8032009plh.63.1685576715039; Wed, 31 May 2023 16:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685576715; cv=none; d=google.com; s=arc-20160816; b=swH+f6AHtu3tSy/ofu1za2x6lglK6ysv8Mthgx9i8VryyswelB1b4hZ12OmCmcca9S e9yYaItMzPffo3t0YTlk0qlTOLdA+77T/XY+eDTiuGv4k2pVW7g7QbeEB3fuRbm7ABTG aCxxAqhFPRqhceAoQR6YvK0CMZqU420dUtZByAFWqmqAQYrmNKQeVIq2rI3fk2r4aQxe nbFC613Me7fTe6vZUJVDXHnj1hHAioiQHrrEAgSMtb00Co1iwecraw3/6v+n9OlCIJYg hREaOyq80mZEc+Me6RuRpNAUiEulfbwSo7ZZqOPqHcJ4+Gz3qJ+x6YcGL60mXbUFjEeF Dv2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0nzIRRbGx22h7W4dzVmFren/95lkctbr3Uctdnt7nnU=; b=cWS/jDLYI7EAPalArbfkhsY8KSzXuO65ZApCS7T6um4SZVfL5O8z8OmZRozvOKHUsY rvef736Ase4us1c1Pv8kiDqWKZ7wWIf0MG3Voi+cdeMsGQuPXzdAzoK4b/hXc++4In1d hiJonUVMPgE1Or9WHcp0HxdmbE/kkuLKUNoNzFjhFfAk2hkgrTHrQBMDncCh3hVfSljc Q7K9LoS/Sj53/u45vryi7AxwDA1NVFN5OwgC4V2ZrfevoEmpXMLVQTCgPrLMb20q8vGx NJO/E0X2LyJezBBYFGdGEAUrFwhvn7PGruJhqThC3qf3kFq0jJwKNF/lCqyNOdN+CHHo f+ZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WmPDmQ1h; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a170902ecc100b001affb6af161si1861379plh.175.2023.05.31.16.44.59; Wed, 31 May 2023 16:45:15 -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=@chromium.org header.s=google header.b=WmPDmQ1h; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbjEaXCo (ORCPT + 99 others); Wed, 31 May 2023 19:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjEaXCn (ORCPT ); Wed, 31 May 2023 19:02:43 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E363E13E for ; Wed, 31 May 2023 16:02:38 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-bb167972cffso180910276.1 for ; Wed, 31 May 2023 16:02:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685574158; x=1688166158; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0nzIRRbGx22h7W4dzVmFren/95lkctbr3Uctdnt7nnU=; b=WmPDmQ1h0qMnUeHvgUMsjpTh6VPEpTtOoNQ11MIJWu8Yqw0fd3oAGLpJdpSMotScGS spn0YANEwG/lKK1g4Gi1omZBv815jXYv6S6kCYbkEuBs2j/MYKV3FUNEHcvO7f+QbHQM Z8eo/LSR+Uy2F4fCrZWf5thKAUw2VrOtPnSl4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685574158; x=1688166158; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0nzIRRbGx22h7W4dzVmFren/95lkctbr3Uctdnt7nnU=; b=CS78jpKWIfZyL91HVzKnSIlDIu1G3SJbk9xutJH+5NlRrhCplwJjUZ1hfAKQJwPrYX pTXsniOf7ODSlxa5h8iUvWVRnPi69UqBcFeqEaioSSKhWbL6TAsqlkjfNYSwzN0rzVoH 7oJ6vv7XjOXBjjA5BSw7Rpxby0dqJlAyFH+yitOpz9kAAl4BksyxyO1zDCl/FsebUya+ whS39lCCOFRQcWbDXXYp84kUJHFjqZP1lWwAQMNFK97SgP2+8e4XdeVcpVVj+OdCbYf2 A9hkElyQnm4P9wf3feM4yoM4TY1r3VM0tbSKUHUt6/BGlMB1I2GOhZvRbORkAHUIPJyS uSUw== X-Gm-Message-State: AC+VfDzDVyaTUBGMsFd+Vw0C1DWwVH5GUnxis2kkeXal0DMMiQkVLjI/ /+S5KEXZZr5NzvDxtlcpjbbMrGVtaKxuidnPYPKvZw== X-Received: by 2002:a25:7303:0:b0:bab:ab4a:83e0 with SMTP id o3-20020a257303000000b00babab4a83e0mr7718310ybc.26.1685574158132; Wed, 31 May 2023 16:02:38 -0700 (PDT) MIME-Version: 1.0 References: <20230515130553.2311248-1-jeffxu@chromium.org> <2bcffc9f-9244-0362-2da9-ece230055320@intel.com> <2b14036e-aed8-4212-bc0f-51ec4fe5a5c1@intel.com> In-Reply-To: <2b14036e-aed8-4212-bc0f-51ec4fe5a5c1@intel.com> From: Jeff Xu Date: Wed, 31 May 2023 16:02:00 -0700 Message-ID: Subject: Re: [PATCH 0/6] Memory Mapping (VMA) protection using PKU - set 1 To: Dave Hansen Cc: Jeff Xu , =?UTF-8?Q?Stephen_R=C3=B6ttger?= , luto@kernel.org, jorgelo@chromium.org, keescook@chromium.org, groeck@chromium.org, jannh@google.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Hi Dave, Regarding siglongjmp: On Thu, May 18, 2023 at 8:37=E2=80=AFAM Dave Hansen = wrote: > > On 5/17/23 16:48, Jeff Xu wrote: > > However, there are a few challenges I have not yet worked through. > > First, the code needs to track when the first signaling entry occurs > > (saving the PKRU register to the thread struct) and when it is last > > returned (restoring the PKRU register from the thread struct). > > Would tracking signal "depth" work in the face of things like siglongjmp? > siglongjmp is interesting, thanks for bringing this up. With siglongjmp, the thread doesn't go back to the place where signal is raised, indeed, this idea of tracking the first signaling entry doesn't work well with siglongjmp. Thanks for your insight! -Jeff -Jeff