From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DACBC35280 for ; Tue, 8 Oct 2019 16:33:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0CC9E206C0 for ; Tue, 8 Oct 2019 16:33:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CC9E206C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 822468E0006; Tue, 8 Oct 2019 12:33:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D24F8E0003; Tue, 8 Oct 2019 12:33:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 699798E0006; Tue, 8 Oct 2019 12:33:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0020.hostedemail.com [216.40.44.20]) by kanga.kvack.org (Postfix) with ESMTP id 4888D8E0003 for ; Tue, 8 Oct 2019 12:33:21 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id E15C1442A for ; Tue, 8 Oct 2019 16:33:20 +0000 (UTC) X-FDA: 76021162560.20.earth30_3a1bb55f6b656 X-HE-Tag: earth30_3a1bb55f6b656 X-Filterd-Recvd-Size: 4503 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 16:33:19 +0000 (UTC) Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF11780F7C for ; Tue, 8 Oct 2019 16:33:17 +0000 (UTC) Received: by mail-qt1-f197.google.com with SMTP id c8so19564689qtd.20 for ; Tue, 08 Oct 2019 09:33:17 -0700 (PDT) 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=0emuj7ckCeOi2ShbRboaosDgyEFD8QY/GtdLIcv15Yo=; b=LviTF6L18bb8WKGdvNAtmd9ydx9HAADBec01sOrc1bfhZfYOjNSFTKjfacXFjYpqE5 QJnvGbfus6yNdr6jol/P02Gczx9cXS0uOBcAmmiUYur4EmxQgIJSKZIbRT6dLLhxCXwe ZoV0ANFxqFDpHWE0/YrbjMZ280zf4uPckpqhgASlEYe+13/v16HTp6iqJXX1rezEFzAI c1Kc5l+wQd9H8YH1M8UyqJozvrFtd41uZX9MoYV6+TPPJeGbfARP+UGNgEZZFVm2qDMg V22CxNVoGj7SrZ1KG2klneNnpXFAp4kgbzfc8rBlodzxZCiYFtUW+Fz+9R+Q0qKTbPq6 9fGg== X-Gm-Message-State: APjAAAVVndlgawq7ek56ieW8slW7IfAb+nM6j1wvDgHZ/LoOHdniQlzY QDMSZ1Y3ysuQ8Cbf523JE8bATw8Q2EVEzVYfPkMma9lYrHABoVrl9Dugy5j3Z8d/06BNcJph8br K2xMJPXL5iC8= X-Received: by 2002:ac8:2966:: with SMTP id z35mr37722110qtz.348.1570552397038; Tue, 08 Oct 2019 09:33:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqygwcCLbNfX37PFFgvJBMHiAJ+4DIe1+sjK4nzF87cpY0peuIfCoM/lAQubKQGhuVDDY9RmBw== X-Received: by 2002:ac8:2966:: with SMTP id z35mr37722061qtz.348.1570552396613; Tue, 08 Oct 2019 09:33:16 -0700 (PDT) Received: from [192.168.1.157] (pool-96-235-39-235.pitbpa.fios.verizon.net. [96.235.39.235]) by smtp.gmail.com with ESMTPSA id n192sm8999408qke.9.2019.10.08.09.33.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Oct 2019 09:33:15 -0700 (PDT) Subject: Re: mount on tmpfs failing to parse context option To: Al Viro , Hugh Dickins Cc: David Howells , Linux-MM , Linux Kernel Mailing List , linux-fsdevel@vger.kernel.org References: <20191008012622.GP26530@ZenIV.linux.org.uk> From: Laura Abbott Message-ID: <9349bbbe-31fe-2b0a-001d-2e22ee20c12f@redhat.com> Date: Tue, 8 Oct 2019 12:33:15 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 MIME-Version: 1.0 In-Reply-To: <20191008012622.GP26530@ZenIV.linux.org.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/7/19 9:26 PM, Al Viro wrote: > On Mon, Oct 07, 2019 at 05:50:31PM -0700, Hugh Dickins wrote: > > [sorry for being MIA - had been sick through the last week, just digging > myself from under piles of mail; my apologies] > >> (tmpfs, very tiresomely, supports a NUMA "mpol" mount option which can >> have commas in it e.g "mpol=bind:0,2": which makes all its comma parsing >> awkward. I assume that where the new mount API commits bend over to >> accommodate that peculiarity, they end up mishandling the comma in >> the context string above.) > > Dumber than that, I'm afraid. mpol is the reason for having > ->parse_monolithic() in the first place, all right, but the problem is > simply the lack of security_sb_eat_lsm_opts() call in it. > > Could you check if the following fixes that one? > > diff --git a/mm/shmem.c b/mm/shmem.c > index 0f7fd4a85db6..8dcc8d04cbaf 100644 > --- a/mm/shmem.c > +++ b/mm/shmem.c > @@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data) > { > char *options = data; > > + if (options) { > + int err = security_sb_eat_lsm_opts(options, &fc->security); > + if (err) > + return err; > + } > + > while (options != NULL) { > char *this_char = options; > for (;;) { > Yes the reporter says that works. Thanks, Laura