Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2323390pxa; Mon, 3 Aug 2020 13:12:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYSW6Wls0JGxzme+XgvFVsJ0nLQj+Et8IhMWAmnRo6JAQ18vsN2vQ8dNeWZT8zGFEoiL1D X-Received: by 2002:a17:906:b08:: with SMTP id u8mr18854342ejg.401.1596485567552; Mon, 03 Aug 2020 13:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596485567; cv=none; d=google.com; s=arc-20160816; b=TAQ7np1tNPw8hnfBCTCJ2tqpjNRoVFvoaRR80BxVvmoE95OOcjeFUOz2UGhmu3t86N 5iLymNxV8ij/TD/j26mcw90TLUVPC9IjKq0qkghnaSrQTDkeyOa3vTNBSHLDdah65UoV fxDmJToHwo52mUmZt3j3TLb8zpirecLSmKd7uzs0gCk47KUqJhJSZrxjBCh2yUGRMm4U ga+NTZTVueK5Vyg+9wC7V0kBkpwSoEGaa95ElWRUXavNd6EyzY3J4CGdWRjr1abZroZl pygVn5f6d9mYOStZPOc1s14j9kQvT3cUHgnMy722l749IlWJOKIV7+d+oxrX/m8A191R 1+2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TfiyLaiiytHrMlT6oh4IsfhQ9YFyy5wx3zu6IU7BZNY=; b=xWOYJ2xueWhrsfyuuYX+cxnWADQVeepeLSaKukjZXVpQMeV6+9uyVukVXzSvlZNbjp CEn7Pu2gQYpamiquh0FLJK38e6MWQUBtiHbR6IghvbP9EnpWPD0bJzKD4+CkbutSwy67 03r9wCl0mRKEaN0Z10ABg+VoBOQtWuRRwRuvj0TaGYkuOaHNVWyImUS26LYZLw2q6Vy0 AZJ3J+Ll2uhGQSLmx9KQgNxBLgG9H71IoR3KE9cWbXKhl/FsCViUMJHMtwALcKSzUcwn ZbcfvlUvXzM4qWjCyNcRmsd/+Z7IffeqnvsSTqOFl00Nx6dyGXdzg3nmYSre1ISYsodR HmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HeAvcOEz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si10611242ejh.394.2020.08.03.13.12.25; Mon, 03 Aug 2020 13:12:47 -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; dkim=pass header.i=@chromium.org header.s=google header.b=HeAvcOEz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgHCULa (ORCPT + 99 others); Mon, 3 Aug 2020 16:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727083AbgHCULa (ORCPT ); Mon, 3 Aug 2020 16:11:30 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F384AC061756 for ; Mon, 3 Aug 2020 13:11:29 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id g19so8921814plq.0 for ; Mon, 03 Aug 2020 13:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TfiyLaiiytHrMlT6oh4IsfhQ9YFyy5wx3zu6IU7BZNY=; b=HeAvcOEzYgF+GPngOCTfUbepzuEHkx+8qRmbejrCRY0MMmgn7UeyBWYdJzytoGD/Ta qJv07CPlJcF29ETgPuWONUktPZBp3nwXCAW6eRZRISbnRUQRb/KL+l6+49U1G00uxaJ2 G8Xq9iIuiiHpWvLKYqRaN87kEr5QcIdg7wdbc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TfiyLaiiytHrMlT6oh4IsfhQ9YFyy5wx3zu6IU7BZNY=; b=YEa7rx7THGfkEcSk+PyVnuHk+o26UpPepgoYK8N/hSt3dtRYGmOLl9Ys7G+53LbyW2 6zrq7ARdkMRbULrg9TTNu0/Ag+xjOCd4YFtO8PVUJuWXL7q9Q7sJ7EXWCS6XRme04Phx 32tK8J2JjtTO6pBxdL+4zKsDniXt1Lf7D9flVRgbji5zmCRxQAXoe+y9KRdnTG3UU863 b7OICAGO7BOPw+0/0ChB2dAIa80t4IpAwAgWDyqgZRYC5I8RhbT7BrrpJ343O3Nk5k7N OSWqyjsUif0aOrRzj8LjoyDoZAU/9tSvsHWRXfy7taFTu9mOcfn4HypEpX8F9XUH7yae EKyQ== X-Gm-Message-State: AOAM530KOYDD0f+bcovi5cF8Gc2aHYabdKVlOg5ascIrIpAfYj5bEprt comyjQXN2Et2EAt3rLYoAOlWjw== X-Received: by 2002:a17:90a:7f02:: with SMTP id k2mr942128pjl.196.1596485489540; Mon, 03 Aug 2020 13:11:29 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d2sm18527244pgp.17.2020.08.03.13.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 13:11:28 -0700 (PDT) Date: Mon, 3 Aug 2020 13:11:27 -0700 From: Kees Cook To: "Frank Ch. Eigler" Cc: Joe Lawrence , Evgenii Shatokhin , Kristen Carlson Accardi , Miroslav Benes , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, arjan@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com, rick.p.edgecombe@intel.com, live-patching@vger.kernel.org, Josh Poimboeuf , Jessica Yu Subject: Re: [PATCH v4 00/10] Function Granular KASLR Message-ID: <202008031310.4F8DAA20@keescook> References: <20200717170008.5949-1-kristen@linux.intel.com> <202008031043.FE182E9@keescook> <20200803193837.GB30810@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803193837.GB30810@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 03, 2020 at 03:38:37PM -0400, Frank Ch. Eigler wrote: > Hi - > > > > While this does seem to be the right solution for the extant problem, I > > > do want to take a moment and ask if the function sections need to be > > > exposed at all? What tools use this information, and do they just want > > > to see the bounds of the code region? (i.e. the start/end of all the > > > .text* sections) Perhaps .text.* could be excluded from the sysfs > > > section list? > > > [[cc += FChE, see [0] for Evgenii's full mail ]] > > Thanks! > > > It looks like debugging tools like systemtap [1], gdb [2] and its > > add-symbol-file cmd, etc. peek at the /sys/module//section/ info. > > But yeah, it would be preferable if we didn't export a long sysfs > > representation if nobody actually needs it. > > Systemtap needs to know base addresses of loaded text & data sections, > in order to perform relocation of probe point PCs and context data > addresses. It uses /sys/module/...., kind of under protest, because > there seems to exist no MODULE_EXPORT'd API to get at that information > some other way. Wouldn't /proc/kallsysms entries cover this? I must be missing something... -- Kees Cook