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 43FD1ECE58C for ; Tue, 8 Oct 2019 01:26:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D7B10206C0 for ; Tue, 8 Oct 2019 01:26:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7B10206C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D4298E0005; Mon, 7 Oct 2019 21:26:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 484548E0003; Mon, 7 Oct 2019 21:26:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 39AC48E0005; Mon, 7 Oct 2019 21:26:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0065.hostedemail.com [216.40.44.65]) by kanga.kvack.org (Postfix) with ESMTP id 185AD8E0003 for ; Mon, 7 Oct 2019 21:26:28 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id B15F0824CA35 for ; Tue, 8 Oct 2019 01:26:27 +0000 (UTC) X-FDA: 76018877214.17.tooth84_8fabcab9bb33a X-HE-Tag: tooth84_8fabcab9bb33a X-Filterd-Recvd-Size: 2361 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 8 Oct 2019 01:26:27 +0000 (UTC) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iHeGc-00054z-D2; Tue, 08 Oct 2019 01:26:22 +0000 Date: Tue, 8 Oct 2019 02:26:22 +0100 From: Al Viro To: Hugh Dickins Cc: Laura Abbott , David Howells , Linux-MM , Linux Kernel Mailing List , linux-fsdevel@vger.kernel.org Subject: Re: mount on tmpfs failing to parse context option Message-ID: <20191008012622.GP26530@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 (;;) {