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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 575D1C43381 for ; Fri, 19 Mar 2021 09:28:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2775C64E6B for ; Fri, 19 Mar 2021 09:28:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbhCSJ2O (ORCPT ); Fri, 19 Mar 2021 05:28:14 -0400 Received: from mail.skyhub.de ([5.9.137.197]:51268 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhCSJ2J (ORCPT ); Fri, 19 Mar 2021 05:28:09 -0400 Received: from zn.tnic (p200300ec2f091e00ccf0bdf306f8eebc.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:1e00:ccf0:bdf3:6f8:eebc]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 3FBE41EC0598; Fri, 19 Mar 2021 10:28:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1616146087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=x5iZs50qGLJl3wWJ6Z8Q/HzduN81imNbW0pU6JloYuo=; b=h9c+OWSFsKDiriwZ4T3n4NNMY19803vt4GuW/AcaffbPxaSNUfNucDuudBqw1YPqk5BYqz sVoCdpmAtrWjKbk7Y/cMI1PahAmEIY49jZAhreJVMI3B8oH1aWYVvsgzIewg+mmcuDlTV+ 3Sw5pKWCvU+z2Xj55irdKup90tXAYFU= Date: Fri, 19 Mar 2021 10:28:06 +0100 From: Borislav Petkov To: "Yu, Yu-cheng" Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang , Pengfei Xu , Haitao Huang Subject: Re: [PATCH v23 22/28] x86/cet/shstk: User-mode shadow stack support Message-ID: <20210319092806.GB6251@zn.tnic> References: <20210316151054.5405-1-yu-cheng.yu@intel.com> <20210316151054.5405-23-yu-cheng.yu@intel.com> <20210318123215.GE19570@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 18, 2021 at 12:05:58PM -0700, Yu, Yu-cheng wrote: > Maybe I would add comments here. Yap. Also, looking forward in the set, I see prctl_set() and that is also done on current so should be ok. In any case, yes, documenting the assumptions and expectations wrt current here is a good idea. > If vm_munmap() returns -EINTR, mmap_lock is held by something else. That > lock should not be held forever. For other types of error, the loop stops. Ok I guess. The subsequent WARN_ON_ONCE() looks weird too but that should not fire, right? :) Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette