Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1188876iob; Thu, 12 May 2022 13:15:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTRoanRDudZTYg2lTQOK20gkZMCqnyMtHGFkXbfbs72YGbMquzGq75oJTkHSHsD1rTTm3v X-Received: by 2002:a17:907:a0ca:b0:6f8:5bef:b9c with SMTP id hw10-20020a170907a0ca00b006f85bef0b9cmr1418796ejc.630.1652386528358; Thu, 12 May 2022 13:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652386528; cv=none; d=google.com; s=arc-20160816; b=op9mN4QvBH9aomqInoVuzivpEAv5VhpI5F3aefe44s0VvCE2l7MFvIwxHFrLn//OuP qy7w3BGCQPiEhwuezhPkBBU5ePRsuferRasG04ONjxcJZcnNGgXUFaW4qaR4xieyGzHE 1ruXZUC75y+sFRzncIz7W5r6zyrNoft/SGouff67aQqz61zMKli3DJHTIAzgTcoj21zC qi8agPb3ZD8bbfXLRxfaK41jW/fqvNpNpeYkEbJ0sdiJZYLKGaNij3h4nH3IYhI1t/FV VBmukN27QlwJimOavzPGah3xMTnqKgwQitgn61csrgMFKI63LFjHEN2Y0aHapl6gepUn VAPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :date:message-id:in-reply-to:cc:to:from:sender:reply-to:subject :mime-version:dkim-signature:dkim-filter; bh=GirDdQEslfbySicVoQGet6fAqxxqlgyh1Y0KbsS0OHc=; b=HK4bZ/ZpQhsyH394kdfy7/yPzHUYvJxPHZcGI6N1In5MXIFh6hhsQJfQO7SnjLB9tk H+QUGiYW0K75OqZOBuKZyzt7T2sntbirBxd0lHLZN6gh7I4JBIrX0quz5j2V1h6oOVJ/ kIYtQRbcQ6I7WbQV5ezzuA3iDiAmtefLgf6veJL/4htzH6EVa0B9BiJVNDryvfTYXOk4 J2FADNySx/DJB2JAuw/4WQEWYGl//T7EOYd5R54V6EsrTUyRqVqWn7+pjCSXmM5nX+Av DdGdbS8YqQsUrqDW+7xW2cEWim9n7oOuPztC+4ZrFJRzC0cXLegZ0FwkoEnYV4tMdHPX r+CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mFQ1cHXM; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020a17090613c500b006f4a749f49asi241406ejc.512.2022.05.12.13.15.00; Thu, 12 May 2022 13:15:28 -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=@samsung.com header.s=mail20170921 header.b=mFQ1cHXM; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345309AbiELDrm (ORCPT + 99 others); Wed, 11 May 2022 23:47:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345368AbiELDr0 (ORCPT ); Wed, 11 May 2022 23:47:26 -0400 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25792D80AB for ; Wed, 11 May 2022 20:47:06 -0700 (PDT) Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220512034701epoutp047c3bd4d90377898fa79cfd71e267110d~uPtp2MIPw1154411544epoutp041 for ; Thu, 12 May 2022 03:47:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220512034701epoutp047c3bd4d90377898fa79cfd71e267110d~uPtp2MIPw1154411544epoutp041 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1652327221; bh=GirDdQEslfbySicVoQGet6fAqxxqlgyh1Y0KbsS0OHc=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=mFQ1cHXMghMiq5wdXiOOrtgZdKHnfIM19AOKZK3/WWMwEe/t1ehXaMEVzaygKpc2I lVrqoaBiWEKS+wDk0xobzmWtqc1udRVZNHx83mmL/5eWweGgQbOpaD78h78zaKfW7n XOvVt5jZoq9j1hGDntH86nNBT2lqdig8diRN3XO8= Received: from epsmges5p2new.samsung.com (unknown [182.195.42.74]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20220512034700epcas5p3377189b67258e82c3d3222ef5aaede3d~uPto-yY8U1006110061epcas5p3W; Thu, 12 May 2022 03:47:00 +0000 (GMT) X-AuditID: b6c32a4a-b3bff70000002663-1a-627c8334f8b4 Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p2new.samsung.com (Symantec Messaging Gateway) with SMTP id AA.30.09827.4338C726; Thu, 12 May 2022 12:47:00 +0900 (KST) Mime-Version: 1.0 Subject: RE: [PATCH 1/2] kallsyms: add kallsyms_show_value definition in all cases Reply-To: maninder1.s@samsung.com Sender: Maninder Singh From: Maninder Singh To: Kees Cook CC: "mcgrof@kernel.org" , "avimalin@gmail.com" , "ast@kernel.org" , "daniel@iogearbox.net" , "andrii@kernel.org" , "kafai@fb.com" , "songliubraving@fb.com" , "yhs@fb.com" , "john.fastabend@gmail.com" , "kpsingh@kernel.org" , "pmladek@suse.com" , "rostedt@goodmis.org" , "senozhatsky@chromium.org" , "andriy.shevchenko@linux.intel.com" , "naveen.n.rao@linux.ibm.com" , "davem@davemloft.net" , "mhiramat@kernel.org" , "anil.s.keshavamurthy@intel.com" , "linux@rasmusvillemoes.dk" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Vaneet Narang , Onkarnath X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <202205111525.92B1C597@keescook> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20220512034650epcms5p3c0b90af240d837491fff020497f389e5@epcms5p3> Date: Thu, 12 May 2022 09:16:50 +0530 X-CMS-MailID: 20220512034650epcms5p3c0b90af240d837491fff020497f389e5 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOJsWRmVeSWpSXmKPExsWy7bCmlq5Jc02Swd9pfBZz1q9hs/j+ezaz RW/TdCaL3S9us1h8+Xmb3eLBwevsFosXfmO2mHO+hcWiaccKJosXH54wWpzpzrV4vq+XyeLy rjlsFo9nzWOzuDHhKaPF4uVqFqun/GW3OLZAzGJFzwdWi/+Pv7Ja7Ot4ADR24yI2i5+HzzBb HDo5l9HixZIZjA6SHrMbLrJ4bFl5k8ljYvM7do+ds+6ye7Tsu8XusXjPSyaPrhuXmD02repk 8zgx4zeLx4RFBxg95p0M9LjQle3Rt2UVo8f6LVdZPD5vkgvgj+KySUnNySxLLdK3S+DK2Nxx k7VgNk9F76YDjA2MUzm7GDk5JARMJF49a2LtYuTiEBLYzSix4c1Oli5GDg5eAUGJvzuEQWqE BUIkLn1bzQRiCwkoSlyYsYYRpERYwEDi11YNkDCbgJ7Eql17WEBsEQFVie+XmplBRjILzOSU WHt2HSPELl6JGe1PWSBsaYnty7eCxTkFdCXunn/NDBEXlbi5+i07jP3+2HyoXhGJ1ntnoWoE JR783A0Vl5FYvbkXama1xNPX59hAFksItDBK7NsNU2QusX7JKrChvAK+EnenbANrYAG69PDN SVA1LhKzf9xnA7GZBeQltr+dwwzyJLOApsT6XfoQJbISU0+tY4Io4ZPo/f2ECeavHfNgbFWJ lpsbWGF+/PzxI9RtHhI/H/9ghoTzSkaJo93bWSYwKsxCBPUsJJtnIWxewMi8ilEytaA4Nz21 2LTAKC+1XK84Mbe4NC9dLzk/dxMjOO1qee1gfPjgg94hRiYOxkOMEhzMSiK8+/sqkoR4UxIr q1KL8uOLSnNSiw8xSnOwKInznk7fkCgkkJ5YkpqdmlqQWgSTZeLglGpgqsl6d79lbom+SfV9 jk+l7Yf/T720507t3e+//jNPCe5++jD1Tm7sN8OAtDovvSXH/jyouOTseXdP0hPxBqNzCbaL NV5PeHvQMO92Ivtyl/frbuZV9UQ26l+/Hzutjyf/wezTcnNe/997XfmXiIvvkx+TBU9MyAo5 bxL2wK5qe+Vzu4Xn2dm+tOxuYGk6Uh9wpT5we7ZJ9C/5DJe/U6e4ZWjmJM6tPnnlquiH7IjM NtXFFXmTl36Z/PvmXIUvKnvs1UzqS16tX/I10jLU6KtL+dqXx3dYznwzd6JEU9Di2zKnnApr N838s4Vh3a07Af8VpqnkLH01U2PZnht8q9hUL08RP1Bzmqd0em1AaZrzYgklluKMREMt5qLi RAC3vJP+KgQAAA== X-CMS-RootMailID: 20220511080722epcas5p459493d02ff662a7c75590e44a11e34a6 References: <202205111525.92B1C597@keescook> <20220511080657.3996053-1-maninder1.s@samsung.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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, > On Wed, May 11, 2022 at 01:36:56PM +0530, Maninder Singh wrote: > > kallsyms_show_value return false if KALLSYMS is disabled, > > but its usage is done by module.c also. > > Thus when KALLSYMS is disabled, system will not print module > > load address: > > Eek, I hadn't see the other changes this depends on. I think those > changes need to be reworked first. Notably in the other patch, this is > no good: > > /* address belongs to module */ > if (add_offset) > len = sprintf(buf, "0x%p+0x%lx", base, offset); > else > len = sprintf(buf, "0x%lx", value); > > This is printing raw kernel addresses with no hashing, as far as I can > tell. That's not okay at all. > yes same was suggested by Petr also, because earlier we were printing base address also as raw address. https://lkml.org/lkml/2022/2/28/847 but then modified approach to print base address as hash when we are going to show offset of module address, but when we print complete address then we thought of keeping it same as it was: original: [12.487424] ps 0xffff800000eb008c with patch: [9.624152] ps 0xffff800001bd008c [crash] But if its has to be hashed, will fix that also. > Once that other patch gets fixed, this one then can be revisited. > I will check detailed comments on that also > And just on naming: "kallsyms_tiny" is a weird name: it's just "ksyms" > -- there's no "all". :) Ok :) Will name it as knosyms.c (if it seems ok). Thanks, Maninder Singh