Received: by 10.213.65.68 with SMTP id h4csp4060653imn; Tue, 10 Apr 2018 08:39:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/OdekhJMF1i+uO543mOjfynhRcD9IG2uFLn6pWNIaUrrQpmXbxlXtW/fmGEhTZ9pI4H11P X-Received: by 2002:a17:902:244:: with SMTP id 62-v6mr973246plc.125.1523374754518; Tue, 10 Apr 2018 08:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523374754; cv=none; d=google.com; s=arc-20160816; b=QwkjJ+vi7opv1KuzLpgWYvtqAjgBGBuNVDYkY3juufEJ42U+dxrFjjP8Zd2c6sGo7J YDZvp7dEq0Nm+G1hJmFCUA8qg9ZlZp0dm943MTnvxQ6JnoWPQxP6qjfbltuCSMsYaBTC Ap/Kxtl+CXDSvtQjtD3CYtxJW4GLa2LLYfFslmXyXghffxd0gB+ZXFq+il0zxGl3i14p OURmZMIrPQgcJepBRs0edeYmwKiGfvxZroLKhcVAOKDi6yKlzbzpBkcyZkttG8ubJosy KDBYiNVPTcPxGUnUTxvZIWeC+nFJQHrlU9OnB430TvOCQynY7+J5n6sYvT2SEFqdmizl oXlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=3IVGwFnh/g+p472iDndCWir5TiOu8eRmvZSo3vUPkYI=; b=DjMleTmgadFjs2OYB6Hxx6FnRbAbJPOr1gIoE/XyEUcoo1ce9iYKoKm6N8OXUvN/rS f7v9IJxAAM4kyhZ2WXoKU/kC3CiusfGcKF8twffhRC4jY5/WlgvxwTofME787hLE3lga 44e+PPI0pNofc1n4mRwrK8a4eiyO/yR4gNRwYKhRfIAVLYc4BIvuts3hPW79qd4L/U9n tLmLtNsNKbveFQYW9ivM8JCRnAm9ESgGaCc5ST0b8IdN+TZIhqNoNZS3fRmJDyNP47oo vDsiCn09X/0KQ/jQavwPYJheUpNR8AcSa0hwfY32/hki4waRHN/wSnSAVG8zFfT53eED v4NA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si2316132pfe.132.2018.04.10.08.38.36; Tue, 10 Apr 2018 08:39:14 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751886AbeDJPfl (ORCPT + 99 others); Tue, 10 Apr 2018 11:35:41 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34088 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751471AbeDJPfk (ORCPT ); Tue, 10 Apr 2018 11:35:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D7640406E96B; Tue, 10 Apr 2018 15:35:39 +0000 (UTC) Received: from treble (ovpn-120-110.rdu2.redhat.com [10.10.120.110]) by smtp.corp.redhat.com (Postfix) with SMTP id DC6982166BAD; Tue, 10 Apr 2018 15:35:38 +0000 (UTC) Date: Tue, 10 Apr 2018 10:35:38 -0500 From: Josh Poimboeuf To: David Laight Cc: "'kpark3469@gmail.com'" , "kernel-hardening@lists.openwall.com" , "catalin.marinas@arm.com" , "keescook@chromium.org" , "will.deacon@arm.com" , "mark.rutland@arm.com" , "james.morse@arm.com" , "keun-o.park@darkmatter.ae" , "psodagud@codeaurora.org" , "mingo@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 3/3] x86: usercopy: reimplement arch_within_stack_frames with unwinder Message-ID: <20180410153500.shqpjemlsfp63yu5@treble> References: <1523275156-29087-1-git-send-email-kpark3469@gmail.com> <1523275156-29087-2-git-send-email-kpark3469@gmail.com> <1523275156-29087-3-git-send-email-kpark3469@gmail.com> <1523275156-29087-4-git-send-email-kpark3469@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 10 Apr 2018 15:35:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Tue, 10 Apr 2018 15:35:39 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 09, 2018 at 01:14:58PM +0000, David Laight wrote: > From: kpark3469@gmail.com > > Sent: 09 April 2018 12:59 > > > > The old arch_within_stack_frames which used the frame pointer is > > now reimplemented to use frame pointer unwinder apis. So the main > > functionality is same as before. > > How much slower does this make the code? > Following stack frames using %bp is reasonably quick. > I can't imagine some of the other unwinder APIs being any where > near that fast. > While fine for fault tracebacks, using them during usercopy > is likely to have measurable performance impact. Agreed, using the unwind interface is going to be quite a bit slower than the current manual approach. So this patch has only drawbacks and no benefits. The only benefit would be if you used the unwind API in a generic manner, such that it also worked for the ORC unwinder. But even then I think we'd need to see performance numbers, with both FP and ORC, to see how bad the impact is on usercopy. -- Josh