Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4752243pxj; Tue, 25 May 2021 15:52:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxVEIFZgvS20B2BnlaEyXkZq2Z+5Ygla/7kcdTEc04YQkkeUd9L0lbQ92U1uZ60xoHTOrt X-Received: by 2002:a02:aa97:: with SMTP id u23mr32853447jai.13.1621983136423; Tue, 25 May 2021 15:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621983136; cv=none; d=google.com; s=arc-20160816; b=kGosED95zNUdJmJOtIFjn39Nbir3QQKfw2JfhpSaXyjBVMFTE0VIyZgB61WcikuRBZ mfqVTuMJhpTP2JeZ8JDYAqgium221d6vhdsDfiDlGQppi6U4/sGmGQJUkp6B1zeaV0T9 defNt4Yu8H87tk3b9Gemts5VleXls9uZ63guS/AJxvfW0rpsVN5gu7NRwnWUnZpJ8ES/ 0RDTp0sSv7sf4KkEdWxhdmSECjJ2BpsHFCV/2VM1tVZobDxJsK56rg9BS8liGVwQa8ad cNw9+Utlw+Gw8vzc0BiykH8IPoCfJilTgQ2xz1YfuwzhxYV2bp/M/eFQNfj/nppoU1BQ LHUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:to:from:subject :message-id; bh=ctsk8exuYD4DTYGo2bda48MS3HkqOGQS0pEy4/GCuyw=; b=td9A6VmB2+14M7AUfosTd0bdOYvvC/EpZEL1MGyJWzsBIcFdSAQP/+0KpxLj5qhe/d qve4zTlWYM33b9qfLG3ACrMrVxzVkaDbTViuaoEQpkVlAXTHyMXlCz5oTitJH+44lzGD uVcOPJmBVn8k9cz+KPGQewUByGhJmeVm2CMZXtHXtPYkEjS/BXj2A5hFoXf88S94mdvx IKldS9UWU1V82c7kMlWxaR9ZIomux03UO8Y0mCYG5CZ2Nh/IsXuCgXQec66423DOa5ZR B5o/4RDVAXHz7xTceNMUYouN83rtW/JS5OxDBlq8SA9PJFQbGjos2uQfGlmqqp+Mxb8M iiYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si20068554jap.36.2021.05.25.15.52.03; Tue, 25 May 2021 15:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232452AbhEYVu2 (ORCPT + 99 others); Tue, 25 May 2021 17:50:28 -0400 Received: from cloud48395.mywhc.ca ([173.209.37.211]:55776 "EHLO cloud48395.mywhc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbhEYVu2 (ORCPT ); Tue, 25 May 2021 17:50:28 -0400 Received: from modemcable064.203-130-66.mc.videotron.ca ([66.130.203.64]:52988 helo=[192.168.1.179]) by cloud48395.mywhc.ca with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1llev2-0003aX-85; Tue, 25 May 2021 17:48:56 -0400 Message-ID: <6133244fb6181420b27694abdfe3f42d43df8868.camel@trillion01.com> Subject: Re: [PATCH] io_uring: Add to traces the req pointer when available From: Olivier Langlois To: Pavel Begunkov , Jens Axboe , Steven Rostedt , Ingo Molnar , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 25 May 2021 17:48:55 -0400 In-Reply-To: References: <60ac946e.1c69fb81.5efc2.65deSMTPIN_ADDED_MISSING@mx.google.com> <439a2ab8-765d-9a77-5dfd-dde2bd6884c4@gmail.com> <2236ed83-81fd-cd87-8bdb-d3173060cc7c@gmail.com> Organization: Trillion01 Inc Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud48395.mywhc.ca X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - trillion01.com X-Get-Message-Sender-Via: cloud48395.mywhc.ca: authenticated_id: olivier@trillion01.com X-Authenticated-Sender: cloud48395.mywhc.ca: olivier@trillion01.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-05-25 at 17:26 -0400, Olivier Langlois wrote: > but the pointers should be hashed by trace. > > That would be nice if someone more knowledgeable about the tracing > system could jump in and comment about the hash-ptr option and tell > when it is applied and when it is not... My concern about hashing pointers directly in the io_uring code directly. It is that by doing so will make it impossible for a sufficiently priviledged user to get the raw pointer values without reverting back the pointer hashing stuff. that would not be the right way to address the security concern if the tracing subsystem already hash them by default and is configurable to display raw pointers if desired. My issue is that I haven't been able to see hashed pointers output from trace. The only way that I know to get the traces is with 'sudo perf' and I have never seen hashed pointers with it. but the code is there... If you grep 'TRACE_ITER_HASH_PTR' in kernel/trace/trace.c I just haven't spent days in studying the tracing code to figure out how it all works...