Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2648843rwd; Fri, 26 May 2023 09:13:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49+4jy9xKScl3OhnPp3Ojz7yZozqC5Bp/OjDz//3R0SrISdI0YKYPj0nn66qIeydgnuSS6 X-Received: by 2002:a17:90a:a101:b0:256:ab7:b670 with SMTP id s1-20020a17090aa10100b002560ab7b670mr3374518pjp.1.1685117602208; Fri, 26 May 2023 09:13:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685117602; cv=none; d=google.com; s=arc-20160816; b=It86ALBv4OVg+TagPM0l0eVxTIpUUKygkBuo7Hun+8reN9FAJOwPhf7lKIZC9DZxVC TNd3mqHhyEYIm628us+eQyFavhH5bfXD+2QbxmU1/sGg+Rp1Zfl5E5ECKTndMdBiaTjm GhIU5uBQyAhE8UOMgwYB6YcDBzbAAFZbXqWHhnfUeX+AXmrYc2OkObqKKEvklq2PWkPi M/hcJPO9Mza7PUnKBIvm2O8ZAxCzu2uNfWtHOqlQNhBI1IoQUJRw3BccmYhywzaoUsua N7Jj1EZjo+FTu2lpMXQ1ISbRXHuY/xJP4MfDl73ujGP4IRfBw6fKveyA5M0+VJqHFTWV o8FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pBm9om1gVlyiRiPA3dFftZ3tknsWP2R2Yor9M3SqwDA=; b=mPx8kJPC2DE8v2IBS2lM5ofoiMcV5JtOahyMexlcseEWq+pYY28eWBTEfbTCdogfMF apsG27KuB6VN0wyluek+IsBDJ4zyGMgPrV3KOsR73HYnSCeX2My0Q1R2hNCTvAOLwhJD ONzjfY9zMMPrGfZrIUJDadsNRdk1FG8HJekwrflDl2oUGieCtt4HfoQSFQYMKM0CWvfM Qsq52HeDl4dXWFF/5rQD52mSr3MoB4VUkk4TafJLp28LRbmp5sxEpiqiVOtyza4xsCoA 4YZ0upQaDywBCCyPXz5bS0htJL85XFF8/n8szgnm2DqqK5SxaqP41e9yBoxOuIAwz0mN W5gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=LRaY3JDZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fu22-20020a17090ad19600b0025346cf794dsi3391104pjb.134.2023.05.26.09.13.06; Fri, 26 May 2023 09:13:22 -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=temperror (no key for signature) header.i=@alien8.de header.s=dkim header.b=LRaY3JDZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243990AbjEZPxw (ORCPT + 99 others); Fri, 26 May 2023 11:53:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237160AbjEZPxu (ORCPT ); Fri, 26 May 2023 11:53:50 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84475F3 for ; Fri, 26 May 2023 08:53:48 -0700 (PDT) Received: from nazgul.tnic (dynamic-002-247-249-230.2.247.pool.telefonica.de [2.247.249.230]) (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 60FEB1EC041F; Fri, 26 May 2023 17:53:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1685116426; 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=pBm9om1gVlyiRiPA3dFftZ3tknsWP2R2Yor9M3SqwDA=; b=LRaY3JDZlGX5YW13A4BN9vAoKcbuhqcp0H9WQq8aDjrGG8NBtS6YhDZTI1EuhiO2uLERrJ GXDqsbjdM/Hol+CJ6eLr5UcrHxHr4Xkm0N1Xa9Zzz6l7W2bS/E221ufT4c83KWs84Z7CEo liQe8Zql9RBZHXnoUbrtclOusdFyA+I= Date: Fri, 26 May 2023 17:53:36 +0200 From: Borislav Petkov To: Nadav Amit Cc: Dave Hansen , Jiri Slaby , Thomas Gleixner , Ingo Molnar , Dave Hansen , X86 ML , LKML Subject: Re: [PATCH v2] x86/lib: Do not use local symbols with SYM_CODE_START_LOCAL() Message-ID: <20230526155336.GAZHDWAFi1FRqq83TP@nazgul.local> References: <20230525184244.2311-1-namit@vmware.com> <38e24fd4-9213-229d-9919-7ae3bfb113bb@intel.com> <24E47178-C177-425F-A8EF-CFFAE22597D4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <24E47178-C177-425F-A8EF-CFFAE22597D4@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Thu, May 25, 2023 at 12:39:47PM -0700, Nadav Amit wrote: > I do not think in this tradeoff not exposing local names worth > preventing profilers (and their users) from understanding where a > sample/trace is was taken. If for instance you look at a branch > trace (e.g., using Intel PT) you want to see the symbol to which a > branch goes to. If those functions were written in C, you wouldn't see any exception-handling symbols either. It is the fact that they're asm and the exception labels are defined "out-of-line" so that you don't have code duplication and thus are symbols outside of the respective functions. So you'd have to give a lot more detailed example where making those symbols global, helps. And if those symbols are going to be global, then they better have more descriptive names as they're gonna be pretty much independent functions. Something like __get_user_handle_exception() or so. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette