Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp349672ybt; Wed, 24 Jun 2020 00:26:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuuAorIC5MJd9rr9iTAjl2YT7t6izoD/g1Skgxaa6agMd7QrygmiWBMjdsNFTM3SwBG8F4 X-Received: by 2002:a17:907:1190:: with SMTP id uz16mr10054015ejb.385.1592983577158; Wed, 24 Jun 2020 00:26:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592983577; cv=none; d=google.com; s=arc-20160816; b=NJEtlUdPF/cDkrnWundG6JKFZwP9fMr1VW0tAsd232fVKXTHyKyPlTJptqUryoGrNT lPRtG5rCC9xqMB/YXZcT9kLvf/xbu7UqGKzHku5uaGJD92/BnAmPaSBwsKgO4qfdqkCg vdkbJISvvHHZQNPvDvrhnbgPW7jsEk9aYWdttDlUJckdCMWWBAf/6jHquglr9o3zjkD4 tPtbcQ5R1auM6Lf5LC+CAT6KbeKjLtM9Pq/hvniYQLcfmnWYFfsKnWVXrhqSPPTbAnl6 yVr+jXf9Ou3qIpaXJOAKIudcelQPneFu/1agdbanrvadT6SoqG7imGunYbOIGnzfb+97 m8tw== 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=ZLkF71JTsTxhhhiydtS3Dg3wcvXwv7lzeN1c+2LHTkY=; b=y67Dy6IcHzP19RXDGXRJ6NfVY+b8hTJ5TPjcistadNwVN9R9Th0yW+6MjDcGEKcXS5 GYRvc0fhjHSkcgGSZg3hZNJmwsJIYxSVHrGDQJA7sa6JWsYItsu3j0j9ZWn5F3F3axQa lY+qBwuY7zg6fk1DrNke/NVZM1Yk7UK7BBMAegUDYQigsXLYrNTqDNIqTGex19HitHdW kDysevzwL6q5VDo9mSJNWz+TtKwvoHJnIurNmERK5lCGosHjxFvne+2rq/SfE5Tm+3nA a931lVHXOy+5rrtDW7S96inaXQY2MEJ0VrzjF/x8GCOwwZApFhgrvnS9+kyIBQjcw5CJ oQ7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WAZ4doPa; 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 u18si1703328edx.489.2020.06.24.00.25.54; Wed, 24 Jun 2020 00:26:17 -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=WAZ4doPa; 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 S2389334AbgFXHZM (ORCPT + 99 others); Wed, 24 Jun 2020 03:25:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728858AbgFXHZM (ORCPT ); Wed, 24 Jun 2020 03:25:12 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D969C061573 for ; Wed, 24 Jun 2020 00:25:12 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id x11so701964plo.7 for ; Wed, 24 Jun 2020 00:25:12 -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=ZLkF71JTsTxhhhiydtS3Dg3wcvXwv7lzeN1c+2LHTkY=; b=WAZ4doPa04qJ8iercAU2kv0gGs9+d0zRO+9jTotCyRd1mUumDg6pjjtJJbAqaOXV1f IzGN3l1C41FxYt2/9Q9RwmWb4Bp5WOXeEyyA5OAvCmhz/RdqRrlORZmZMjpbFRdElhH+ l9bcuI7JNngNM/rwemvFrHhTFWgmEpdXa3QS4= 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=ZLkF71JTsTxhhhiydtS3Dg3wcvXwv7lzeN1c+2LHTkY=; b=UvY8Bfc3ikwvLhJy/SxehOA+1hnO2wt670v1tFnoaF0dA5LxVvnwVBIrKU4RBQBmL5 kLA35c8U2LI4CWZ7PyhyOHTcJ7GgBsL4VP0Yc3bPY05T479ED1UukNcKTScttBwDqWLH RxNHkCDhxgLOI4oWudGZUKN1FlIYZwdSTq5dWTicHLS38ssfVu98o6x6MW0xOtoIc0nA LP0KP5fiKX91b9PPCznSs0oZc04rOkqLnne9OUpuXe/HbpUvLv95MrWdT+YkBtzaZqkc ZijEfjdHRfPJBVEeJgwzD7PEG3Mrycv2+VwrBN0REigIrwozE3hvGPL0pgAh2p6qvDza eW5w== X-Gm-Message-State: AOAM5332RhOPikJPOyQZooPXn2n3HGw1dYLYzi8yRjojKj+YBouARVRY SDdSobiShr29CC0hjXJMbMKsOA== X-Received: by 2002:a17:90a:356a:: with SMTP id q97mr12932118pjb.213.1592983511481; Wed, 24 Jun 2020 00:25:11 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e12sm19999633pfj.137.2020.06.24.00.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 00:25:10 -0700 (PDT) Date: Wed, 24 Jun 2020 00:25:09 -0700 From: Kees Cook To: Kristen Carlson Accardi Cc: 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, Tony Luck Subject: Re: [PATCH v3 09/10] kallsyms: Hide layout Message-ID: <202006240022.E5FB4E08F3@keescook> References: <20200623172327.5701-1-kristen@linux.intel.com> <20200623172327.5701-10-kristen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200623172327.5701-10-kristen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 23, 2020 at 10:23:26AM -0700, Kristen Carlson Accardi wrote: > +static int kallsyms_open(struct inode *inode, struct file *file) > +{ > + int ret; > + struct list_head *list; > + > + list = __seq_open_private(file, &kallsyms_sorted_op, sizeof(*list)); > + if (!list) > + return -ENOMEM; > + > + INIT_LIST_HEAD(list); > + > + ret = kallsyms_on_each_symbol(get_all_symbol_name, list); > + if (ret != 0) > + return ret; > + > + list_sort(NULL, list, kallsyms_list_cmp); > + > + return 0; > +} Oh, wait, one thing! I think this feedback to v2 got missed: https://lore.kernel.org/lkml/202005211441.F63205B7@keescook/ This bug still exists, and has the same solution. -- Kees Cook