Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp139591ybk; Tue, 12 May 2020 17:59:13 -0700 (PDT) X-Google-Smtp-Source: APiQypK5o8WOnDN1Gl+2+PaEgLN9reV5dY6KbTbF7dGFgZ5mvG1jpJ9H1qTklFjrSF3/Tfjbtcu9 X-Received: by 2002:a17:906:1a06:: with SMTP id i6mr19877065ejf.90.1589331552977; Tue, 12 May 2020 17:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589331552; cv=none; d=google.com; s=arc-20160816; b=sibyU689IuiF2KuL7SNSLW3HSX2kB1Dp7Lce3NFiv15fA56pB7dESBQspJ6wVPpw/p L5r4K1yLsB5WRXK6RTl9p7VWLKdGGliMOh0fMyurjHIZenspILmTj0dViyrRfBLNmA6Z IEHqSDdfOqZBvuJf7yHLRItA8Uukd7pDNryGvk0QJVwJda4XbYfaW5OFuc5blhU8b073 YJl/WnUT7X868thUp1GgmX7lNrGUhAszV3UACFYOYRl3k2qBmAvPy0/aGrTjCQqaPGVN wzitqx8C3feJtOxJLLKRZh33qbH6JTIBw6OeCKcl0EYMJkf14rtP28z53zmFG7RC+pC1 OTxw== 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=NJeD/aOrfIoQ//ti865M5edH2b+NJXDkUCbs0+81Jmo=; b=Tun1DPVoRXCJ6Y+9to4XN1AVcg0fS+Av1J7HiThvDDeOPyspB13DAvhsxZvCTPEeLP vKV9R81+1rYbY5Gv0XkUXm4ibU8M7SrL0e8kWcwyU3KQOSs3QWbG9sF910q3dVURGNX1 pDM6+1v3dHs3zmBWk0zVeZi1WpTIdUF3CiPbci3czD4y0HISlWa8arva8dilGuZozhaP aCKZEnrisrA5xJMiv0FznKMvHpuCCx4MTqvtWhEvUkIjpL9Si5tRAQTq+iacnPL6uYBX urx1U2BT73rTYyc2rpA7Da7jkKzOTUdOy4VULO54c2M2NmBhHw+vUVHwAd5WpPvRUG8A N56g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LH3F3jR9; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j92si1349084edc.199.2020.05.12.17.58.49; Tue, 12 May 2020 17:59:12 -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=@redhat.com header.s=mimecast20190719 header.b=LH3F3jR9; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732035AbgEMAzW (ORCPT + 99 others); Tue, 12 May 2020 20:55:22 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:52497 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731909AbgEMAyw (ORCPT ); Tue, 12 May 2020 20:54:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589331291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NJeD/aOrfIoQ//ti865M5edH2b+NJXDkUCbs0+81Jmo=; b=LH3F3jR9otWKyCi2N1ANooQG/6JjDCv97cLOMmQBqAS9yV5nf4jIbRQEkmTsHuF3xEUAWv m2wjIKf94Ww/oHicSC3VPZkJq5rqYXubTMIQTIhwKRaDicJeHgqylrSXrsOMG/2wNEqsEb Na+AM8XdF+L3vKkX5BqCFslicSGJFoI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-356-VlDqez_TPr2jz7vpNF2Jwg-1; Tue, 12 May 2020 20:54:47 -0400 X-MC-Unique: VlDqez_TPr2jz7vpNF2Jwg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 133FA835B40; Wed, 13 May 2020 00:54:46 +0000 (UTC) Received: from optiplex-lnx (unknown [10.3.128.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 223CC1000079; Wed, 13 May 2020 00:54:43 +0000 (UTC) Date: Tue, 12 May 2020 20:54:40 -0400 From: Rafael Aquini To: Luis Chamberlain Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, keescook@chromium.org, akpm@linux-foundation.org, yzaikin@google.com, tytso@mit.edu Subject: Re: [PATCH v2] kernel: sysctl: ignore out-of-range taint bits introduced via kernel.tainted Message-ID: <20200513005440.GK367616@optiplex-lnx> References: <20200512223946.888020-1-aquini@redhat.com> <20200513003953.GK11244@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513003953.GK11244@42.do-not-panic.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 12:39:53AM +0000, Luis Chamberlain wrote: > On Tue, May 12, 2020 at 06:39:46PM -0400, Rafael Aquini wrote: > > Users with SYS_ADMIN capability can add arbitrary taint flags > > to the running kernel by writing to /proc/sys/kernel/tainted > > or issuing the command 'sysctl -w kernel.tainted=...'. I just notice 2 minor 'screw ups' on my part in the commit log: > > These interface, however, are open for any integer value This one probably needs to be reprhased as: "The interface, however, is ... " > > and this might an invalid set of flags being committed to and I'm missing a verb here, as it should read: "and this might cause an invalid ... " I hope these are easy fixes, in the pre-merge step. (Sorry!) > > the tainted_mask bitset. > > > > This patch introduces a simple way for proc_taint() to ignore > > any eventual invalid bit coming from the user input before > > committing those bits to the kernel tainted_mask. > > > > Signed-off-by: Rafael Aquini > > Reviewed-by: Luis Chamberlain > Thanks! -- Rafael