Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2837178pxb; Tue, 19 Jan 2021 07:18:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhDJkaRuTPaZteKfhjT/wY11eeAvuCagx8olCZcayO+yYN7uxH2DgMiGn5BnVFlwSw/g5d X-Received: by 2002:a05:6402:318e:: with SMTP id di14mr3789664edb.223.1611069537848; Tue, 19 Jan 2021 07:18:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611069537; cv=none; d=google.com; s=arc-20160816; b=coggdmZNNrlVgBRuI6mEbRT80F2zkLLI/5Ml6cxn7Cvc3bj39rm+4uC7eWPZkabYVi bXKQeepkw2qvvmQVO06PH7GPzp5+KMTeHW3Zfq5S6CAB3d4NhNcO+XfipdJlRQ2ag39o WEqojL3oipkml+1BQhnKfQAGP/O7GZ7LnKtfGJi/aciriq38JVYICkAc1VDlrd/IQA49 DS+A3MaIRcVALXV2rI7W0IiFP+zjSSN0Ac68ncqvcIwjiQaZJ6cEVnAX5luuf/G46bCb XiVnHh9DyyF2vPVorC+/gzqttXykqyVyPv6WcZpxmDUhJdAfBVz40eeaiMGQyIDT6c8U ufbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=2vCBP7rHE7RSzz8Cy7M7Ov+Qv973934nlenTDzX2mlI=; b=L1IvowTB/NPUmmEwd5CGsDRba5HLXRQULjiRNA/Lj2b1BDjFwDbHeNmLwdzR5MKUol eX1xjoDRlFUJRSV9oWipa0Teliou6rhoWx51ao7Jw9bEJklxNdB85/LFxFGSI6LcP3CZ AZ64Op1BzNtVi0k/vvpb8cQN/QD998tF6joKxeKtYTLB1G1sqeWVvmW6eV0/omqKT7sV tMy1tqirDohU+L0td4FhzS1UXoqhV1Gjl49JTtDFG0q3+1c0Qdu15T1qqW6cL5h9W4bO /billKnCp50VVZWAqAz3vt9AIAW/hdC7RPrXALb00EUbHlXGshEdHXV/F3e0FY9vdyRx J7ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=JbAKWLNp; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g24si6554308ejc.176.2021.01.19.07.18.53; Tue, 19 Jan 2021 07:18:57 -0800 (PST) Received-SPF: pass (google.com: domain of selinux-refpolicy-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=@ieee.org header.s=google header.b=JbAKWLNp; spf=pass (google.com: domain of selinux-refpolicy-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=selinux-refpolicy-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ieee.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390554AbhASPRw (ORCPT + 18 others); Tue, 19 Jan 2021 10:17:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391052AbhASPLw (ORCPT ); Tue, 19 Jan 2021 10:11:52 -0500 Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E11AC061573 for ; Tue, 19 Jan 2021 07:11:12 -0800 (PST) Received: by mail-qv1-xf2b.google.com with SMTP id l7so9262137qvt.4 for ; Tue, 19 Jan 2021 07:11:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ieee.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2vCBP7rHE7RSzz8Cy7M7Ov+Qv973934nlenTDzX2mlI=; b=JbAKWLNpZRSBT2jy/qkljNpnsP21bGVo4ZxvdtFei+xwBb5jY8BxEs6r1+2mu2ICxr 7WGyClDFktC+V18ADG1rNcHdKKkoI8GZyM06KOSwFqY/KLbgD0lXgkLg7GNuInubMQZL 1HTEbn0QWFeDBl7iQT/O00JlweY/273UndXlE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2vCBP7rHE7RSzz8Cy7M7Ov+Qv973934nlenTDzX2mlI=; b=qBhu1qZMzVEQRlPaO67IYburRmi+aTYSneVTqep1BotEmCaXX00k0JatfLax4WzwaL t02wN55RuD/tVCgj7uKfUq+WBo6674a3e06AO2R3sTaC7xPFFBMhrNQ7msJOilkvWUD4 rCJ6lvbWZNHVPcHNUyHezf9o5o0bvdYfSXp8ows/uhdvKy3lnMn0aPiDdAnABXrn/AKR EoyToPiEk7zivTT6oJtTcx85+LSPnPRYHkKrKqfRbsNar/Ze8068neRT7oQJ+fcsDiLj Vy24hfU+6/wV4jYm3Hk5HLnImv/D7Wn/jNkYGoQWmI3qCiLc3UBAbWKAL6uwfyeZWw5u F8SA== X-Gm-Message-State: AOAM532iMOab5/65AS9G9IHHEqRXeNRtGxtZrYdAhsAwZDP4CCvrfsdR Dh56JG7FmT3vHQG2ZBJJbU7C8rVH5v8inw== X-Received: by 2002:a0c:fa4c:: with SMTP id k12mr4870185qvo.16.1611069071044; Tue, 19 Jan 2021 07:11:11 -0800 (PST) Received: from fedora.pebenito.net (pool-96-234-173-17.bltmmd.fios.verizon.net. [96.234.173.17]) by smtp.gmail.com with ESMTPSA id c17sm13093491qkb.13.2021.01.19.07.11.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Jan 2021 07:11:10 -0800 (PST) Subject: Re: [RFC] Purging dead modules To: Dominick Grift Cc: Topi Miettinen , Russell Coker , refpolicy References: <352607e8-2de0-fc71-8403-15942d65c837@ieee.org> <3283555.42QHSe7XtN@liv> <86e9b2ce-22ab-3de2-25f9-8e2f485e88c8@ieee.org> From: Chris PeBenito Message-ID: <5b759422-3f04-1818-b043-65b420150439@ieee.org> Date: Tue, 19 Jan 2021 10:11:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: selinux-refpolicy@vger.kernel.org On 1/13/21 8:33 AM, Dominick Grift wrote: > Chris PeBenito writes: > >> On 1/11/21 6:52 PM, Topi Miettinen wrote: >>> On 11.1.2021 17.48, Russell Coker wrote: >>>> On Tuesday, 12 January 2021 2:23:47 AM AEDT Dominick Grift wrote: >>>>>> I'm looking to remove modules for dead programs, such as hal and >>>>>> consolekit. The question is how long to keep modules for dead >>>>>> programs?  I'm thinking something like 3-5 years. >>>>> >>>>> Agree >>>> >>>> I think we should drop them when the programs aren't in the latest DEVELOPMENT >>>> versions of Fedora, Debian, or any other distribution that supports SE Linux. >>> I think this could be automated. If no file contexts in a module >>> match any files in a list of all files of all packages of the >>> selected distros concatenated, the module is probably obsolete >>> (which could be also verified by looking at old releases) or it's >>> for 3rd party software (never found in earlier distro releases). I >>> tried to do this locally to disable unused modules, but it took way >>> too long time with shell scripts. I suppose with a database or other >>> proper tools it would be trivial. >> >> This is a good idea, but may be a problem for the Gentoo guys. >> >> I'd probably simplify it to only looking at labels for executables, >> since a package's manifest might not hit all of the data files' >> entries. > > Not sure if it is worth the trouble to automate this. The list of candidates I came up with > were also verified by just using `dnf whatprovides /usr/bin/app` to see > if it returns. Most modules though are still relevant and it's is pretty > obvious that they are still relevant. So I would argue that spending > half an hour perusing the refpolicy and looking for candidates, then > verifying is enough to atleast identify the most obvious candidates for > removal. > > In reply to Russell Coker and kerneloops: Does kerneloops not depend on > kerneloops.org? AFAIK that site is offline so not sure how Debian still > expects kerneloops to still work? I've created a pull request on GitHub to remove modules: https://github.com/SELinuxProject/refpolicy/pull/335 I will be merging it at the end of the week unless there are any further objections. -- Chris PeBenito