Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp349358pxb; Wed, 13 Jan 2021 05:23:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxs3urEoY+5bvU5avheAJoK081Yg8hhcvb+MHlCVPieQdl9g1p7ve9h4hU7a64WgfS3AUnB X-Received: by 2002:a50:998f:: with SMTP id m15mr1763825edb.342.1610544222255; Wed, 13 Jan 2021 05:23:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610544222; cv=none; d=google.com; s=arc-20160816; b=SIeEx6fqOI3i8JKECtK0tp81E6L4632LCsvk7kmQikJwnT2Fu7FysATZeNqrkn+wO+ 51RTSidhZI+mnPc6P/dqIlNn58ut6jnyf6mY0Tuz23P8HBX/VDOyIuSep9Qweb3h54yQ ERUbXmiyo88+gee50PH3tnR5lyW9QO0KEA1gNE9tXPzzz7OKFisoCcawr71E2GoWfQ6e vEl5ZdS7HNI7A45gsFvKlhE9ze3s5ineuQZFXd/r2j2Q6oqqcAmKs/fU7h1mmADyBkTr RmTqHrOkmY+1kk7hzs+eqXtP47o0PBj340LWRFKRO2v1zUsvqLDHobUsIY28f5qUttVM JgDg== 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=3JD89k7BnaFkCxd9yT63sXZyIitUOMm882RsLJUjG0Q=; b=TBRp6SXt/1gCJhFtkLc8W9scHuLSJGyuHn1nm6Dhmty2Sw85cD2kHb5GFfmeJVxBQE kXQd5icVJ+FZlkSmzrTEkkxN+j6jWDoHnYdKGU4wAl4b86RB9FkGAQcRp3cjsXqdloJT 7wZ0ods/yGtOdJGbEabiv2RODd2zRR/05jINCSFrNWjAwCJ+qkpLgc+jgWPy1TFWlQhH /vhcE4FNVDRicCTuHabotBQsmXXq4gqLZ7jpayOlNfZD0SuwC8ozrB7oJ0UIafaCqmO5 2Dn+ABnr4mailbwVDobh8T6ios4DCm7+qnCbcODPHavyl8Q8+/P5ByOMV7BXbXiKjiaf GPBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ieee.org header.s=google header.b=PxteV1Px; 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 q23si876083ejn.17.2021.01.13.05.23.35; Wed, 13 Jan 2021 05:23:42 -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=PxteV1Px; 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 S1725773AbhAMNWd (ORCPT + 18 others); Wed, 13 Jan 2021 08:22:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbhAMNWd (ORCPT ); Wed, 13 Jan 2021 08:22:33 -0500 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E237C061575 for ; Wed, 13 Jan 2021 05:21:53 -0800 (PST) Received: by mail-io1-xd2e.google.com with SMTP id d13so750723ioy.4 for ; Wed, 13 Jan 2021 05:21:53 -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=3JD89k7BnaFkCxd9yT63sXZyIitUOMm882RsLJUjG0Q=; b=PxteV1Pxepa99VqgkN+SAmS2Hb9e87FlMCs+vF75g9a1fNtxg5l5gsLKhrZFZSslDu fGu330AHjFqvm6/9YkDXKvW1HEovalwkDkycUVZWNCEFHmIzf4m1cE68idaQXB7nyoh4 LQ1DupbnuaBznY1M0d/87KUTgF5jRVss27PKE= 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=3JD89k7BnaFkCxd9yT63sXZyIitUOMm882RsLJUjG0Q=; b=dKZiu3FlTER6IMiHyB5w8g1Ij85lLhveIZ5I7aSJm33Z+zz3n4qVip2OK72P5P8plL Ilhv/DRRqqmwlHPhL1PPj1rYP8NguZZTir39IjPOaBYDYyBAxSET3hI2br4TxfXD97Jr OU73qKRgU4yDaR9Ai0mpknEHgkoDWJy1YFAr/v6S4zDeGtGZyQL5L3LlEmUTEUtCprTg 4IUqWURYPO7T3Iu4mtTmk9QrcIAtMUoxD/U+N7tdBFMsAi7uNUMATSYUJoxuFS5SkA/r bmdLcL3qkQkMtXmZI0aSGI9eRF65IICwYbRTR3vAbLZ/9BGvzpWAAdImSqJenpghnmSV oW0g== X-Gm-Message-State: AOAM532E2otocAoiO0nGZ+/GPWAbKwvHYX6fWVPYBj+6JPrsCoslAxne pJOnhbRUY4YZFKPrrQnAoObxCIBrJYzK2A== X-Received: by 2002:a05:6e02:1311:: with SMTP id g17mr2159206ilr.223.1610544112207; Wed, 13 Jan 2021 05:21:52 -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 j2sm694217ioo.19.2021.01.13.05.21.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Jan 2021 05:21:51 -0800 (PST) Subject: Re: [RFC] Purging dead modules To: Topi Miettinen , Russell Coker , Dominick Grift Cc: refpolicy References: <352607e8-2de0-fc71-8403-15942d65c837@ieee.org> <3283555.42QHSe7XtN@liv> From: Chris PeBenito Message-ID: <86e9b2ce-22ab-3de2-25f9-8e2f485e88c8@ieee.org> Date: Wed, 13 Jan 2021 08:21:49 -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/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. -- Chris PeBenito