Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5878239ybp; Tue, 8 Oct 2019 09:34:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTM44Pnnc9TltyA3s/Jy1TISREd/W6TN90vIishDA1GIJkAbCOg72663ARiaNeyhVDQSbO X-Received: by 2002:a50:8933:: with SMTP id e48mr34510932ede.51.1570552458680; Tue, 08 Oct 2019 09:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570552458; cv=none; d=google.com; s=arc-20160816; b=f9zNEPk96odYDxLnL5smPeU8bY7gt8e3TZKSrHfuc4DXqWpnXmNysAsDjMykstIfJI 9eCAmIctQUYBWUJsJoPkVzHV4/Z1EFYjoocEwk+hKwuJqPr2rXb3KSR9MqcbpnAcEqc8 Mb5mFQPI5To7E9yvFy+lFT7GBbV5G9jkFCwAm+v0CE3XVfQJrRWi7NBruhPJKtS6oVSU SXi+C+AOgRWiB0g0dVN5ehCTpxmXRWZ/yeX1tYj1ShZ0BSO7LHHJT8J2Gk1uQJOeq3QT 06vKh08zeDvdmy3SsiPZDTQYgSxMGrT5t5AwcGm8IKkgBbRRxk/slLlv7Teo5bOOA26p Qg1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0emuj7ckCeOi2ShbRboaosDgyEFD8QY/GtdLIcv15Yo=; b=tbCFK8BTye/5o/4HDhxjrYJL3Wd7KB3528qyU3r63sVUMMxo8JEIXptk282aVh8VXG x0JA1duG50y66gtxK+cNW77vNH96Mq0z9kVLybNNZ/4qFl5jXQ0w2HiuA0vvtfb4vbLu XoiX/7ybFr4FFmUoEDOI/LvAYoN4Ev+Swbvqeu39T+9Zobt60BaDWlDTp1TZOCz1SIxR dpxISqI9nI8Z8xwfyMpXcnbNcuJnXDeJHu5c6O0D9JKYLZwdjM4TPB1aEr9foo9Nx30s TklQM9jnLyimFPJdmZA9MmmKPOrtEV84AVqKjTdIrSPUHMiiv9uGR/uq0r0paevhJU1t DVsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v57si10869761edc.171.2019.10.08.09.33.54; Tue, 08 Oct 2019 09:34:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728734AbfJHQdS (ORCPT + 99 others); Tue, 8 Oct 2019 12:33:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35338 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfJHQdS (ORCPT ); Tue, 8 Oct 2019 12:33:18 -0400 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (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 D066D121D for ; Tue, 8 Oct 2019 16:33:17 +0000 (UTC) Received: by mail-qt1-f199.google.com with SMTP id y10so19604188qti.1 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=qxwDUnlr/FrV2/nMRc50mO3Js9t7Ow81WtrjO9oFlZLh5LARiakcToDabWYj5EltU5 1bEI9pxBfBjd+Mf32NOyNGFMCGjK+/DagdjOrtmMNOn/vUf+FsQUad97zq4TW3feh6ft SsZoAblsweZuSmsMnQcqmL24tQrKzJu59qr0bimQvdiHjN/+7U+SFd2fDi5f6X/GzoQq PGyqciRgKLvym6fDFG4re3JVmoY9eZAom2Ul57hVnf2BvoYRCg+EWWHHJ8GQ7KTEriGM bjTWZHDf6KL7rRByyk8DJto/1RuH8swNgJV8dvhiwnp66AjL2GVbW+0vhGRWqVaUSBdh 12Zg== X-Gm-Message-State: APjAAAXTn2dUk60D2fYlNHNnrfZSvsXer7OWcpX/E5AmhFKTT2s+X0Z2 lRCIZ3v/L9d7kzHGnddjP1o/sCC97UzY/LGT1zBXQSDN2BNzH26ojZ5EJeeaWROV5xr/mVwqugq qWFyZBL9HtJaSlgPxu/JIdjj+ X-Received: by 2002:ac8:2966:: with SMTP id z35mr37722115qtz.348.1570552397040; Tue, 08 Oct 2019 09:33:17 -0700 (PDT) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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