From patchwork Mon Mar 1 18:56:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Aur=C3=A9lien_Aptel?= X-Patchwork-Id: 12110503 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS 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 7718FC433DB for ; Mon, 1 Mar 2021 19:00:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 337FA60C3D for ; Mon, 1 Mar 2021 19:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238052AbhCATA3 (ORCPT ); Mon, 1 Mar 2021 14:00:29 -0500 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:51788 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240797AbhCAS6E (ORCPT ); Mon, 1 Mar 2021 13:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1614625008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=lVIKG+2t1tY05X+GALt4z+9vjuNrQK2jXCua8/q45tQ=; b=fs0P8+cPOiDqi7mInp6P7HCpkSjyyoc75fh4gDguoykEyaYLMHXU/oaHmJY6gwDQaiXzub KlF1dGArWCsaux7bilYp0oRySB2TfrsTXGrY7D/2GySGJkeUW2JHrevtTt+y9G4tqAYVsO i3xBsuLOItq2mxHm93WPKzepWLC8Kj8= Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01lp2059.outbound.protection.outlook.com [104.47.2.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-7-BpQU9-IONFKWbhqGeZ9oTA-1; Mon, 01 Mar 2021 19:56:47 +0100 X-MC-Unique: BpQU9-IONFKWbhqGeZ9oTA-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bYcOKHAbVEm4CbPI+DZ4XI7RRMRwGFMQbnhvwQJkc9wc049wFAC9kip/y/nlrwMQ+77pQoeU28C6pEog6iRcLp7OaPG9zD6bHJyM/ouUikH5EkSf2agPqYkcSmJJOmX3BHW3vR4nAN25MaDNciRRcm+qBnXdrZ2MfmlooZ9JO/IsEBzLVyc9+ubRH8gG9e/z49fetTyKlWAiUssGGAHuTnVfX5jyHWiCI7ch89GkQy751wemFrUoBGQQOkdrUQOBaHKZ5SS/Ns1iUeJNu6c+UKLmU0zQOabDTRnOus6wdDH0JR59P1aUDenm3MqDYgPeR2Q3t1Uu6rOTcyb3Hruiug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lVIKG+2t1tY05X+GALt4z+9vjuNrQK2jXCua8/q45tQ=; b=VXH7wzCVQ1GAEsQcjblQXz73v3dr+nAeEr/NW8o3HV41MJoN4inl/v+LIeXcvQfvdfkyx1l1wckWnFndBgbG//z18Zq1jE3yKti+8mm1ffVRzes1z+A+M084gHt47ZyLywGgkrjTtcp+7yjAWGB7zJfWNq9A3+OH9kJPpdPRoVvuMHIgfMZY2TyZsnVS52go8RxFTPpqgztYmYucz/XWVqIRUKDSXqWFW+viYR4T2PtB0nxtZxUVZ6Sn+gIJAPjNQQlxnmr5BfzNJTZ9H4jVwUPiDgh0f8yYHTjfUotDvkcPJ6jCkG3ABz1og/pF/oQCdzO5KpNX0f3dLyaeyBNxOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3359.eurprd04.prod.outlook.com (2603:10a6:803:3::28) by VI1PR04MB4320.eurprd04.prod.outlook.com (2603:10a6:803:49::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Mon, 1 Mar 2021 18:56:45 +0000 Received: from VI1PR0402MB3359.eurprd04.prod.outlook.com ([fe80::9c1d:89de:a08e:ccc9]) by VI1PR0402MB3359.eurprd04.prod.outlook.com ([fe80::9c1d:89de:a08e:ccc9%4]) with mapi id 15.20.3890.028; Mon, 1 Mar 2021 18:56:45 +0000 From: =?utf-8?q?Aur=C3=A9lien_Aptel?= To: linux-cifs@vger.kernel.org Subject: [EXPERIMENT] new mount API verbose errors from userspace Date: Mon, 01 Mar 2021 19:56:42 +0100 Message-ID: <87tupuya6t.fsf@suse.com> X-Originating-IP: [2003:fa:70b:4a92:20ca:256:2191:52c5] X-ClientProxiedBy: ZR0P278CA0123.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::20) To VI1PR0402MB3359.eurprd04.prod.outlook.com (2603:10a6:803:3::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (2003:fa:70b:4a92:20ca:256:2191:52c5) by ZR0P278CA0123.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.20 via Frontend Transport; Mon, 1 Mar 2021 18:56:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da7cebc6-abc0-4c84-e3de-08d8dce3c297 X-MS-TrafficTypeDiagnostic: VI1PR04MB4320: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KTfnfyFo8XFWWcRl0lChuBys+9XMWb31lMUhMJZ2tlLcF9YLgKZw16CSGSTbjQCE8f0/ee/NuZ9saOJfYa6TaFg8NK8NKSN3CF0BdfYsbBIp4DAE06EaoY06Pjsv/+ubhK5alkwqEs0EBuOgx4goaLgtgSg8J6nOq0wtJnqaSBh6QytI9oztAUW6W+Bt5zFE0Qcm+e/oxnkjxUsTT1Pdi6FF0+iqmQNVeqPyYmKRhw0lkGMmgrFDbOXj1vgdR+/2pjHoKNnu4eiJbWqFpLnZdMURoA+lbigOgZvi5586Fed5TTgw3ELwO/Vw0HnjbyOUYwEBDzwbhEXlUrXVMEfxG3U9Xyot6xDpV631Cgdw6WuLiwHBAaOaQtAV1V6YeE8CgRVDaVEcOntP9YA9JPrygQV551lFNc8GnqEqmue2P/ooxjlFkkEhFzjcpvc7OKLpHFa7mZYcNOcpQ5bhoYxgZTCpQG07ohi4MmWmCQUn7IH/nEvKU/51iPQZv4qeAq2qkzzVzYDp9Ys164TTkgeipw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3359.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(376002)(39850400004)(136003)(366004)(396003)(316002)(36756003)(86362001)(83380400001)(6916009)(66556008)(2616005)(66476007)(6486002)(235185007)(66946007)(2906002)(66576008)(5660300002)(8936002)(6496006)(478600001)(8676002)(33964004)(186003)(6666004)(52116002)(16526019);DIR:OUT;SFP:1101; X-MS-Ex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O6xRpFNg/5l3HrV+ilRlHDqs6SCrNlruGPm0esKWOa3kObVd3Oc3VYzvDCV7qRrPcW5yFvR4KbJrBSyUe1drKP7sYIQpcqFEKD1LlcEiZsMJ2FbwLFfoinTue68zzFCgwGdkvFmUwOsq4qAZTQur6UZqdTbqEQBzc9BRAWRfQ2QAzgse4SpNrA3P6wt0cDnBgR7WqC/kKS8oMaOHEG5OsQ/yDa3WkoME90JJ2FfAwUkwmNZYypEQ9psUwvf42oOCH+naY8aiB86QTH8irK220+YZS6J0az8ZfzYXBxNZejQ11tj2MtwBkC3DQdsuu0jzvJzCrO415EyKtSgx+LzEVJ X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: da7cebc6-abc0-4c84-e3de-08d8dce3c297 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3359.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2021 18:56:45.6174 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j2gWq9hULOeaGsqAu8VNV4bo0swnQW897VzPv1ySUiffekKg/9pZD+4V9AmwU6DY X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4320 Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org Hi, I have some code to use the new mount API from user space. The kernel changes are just making the code use the fs_context logging feature. The sample userspace prog (fsopen.c) is just a PoC showing how mounting is done and how the mount errors are read. If you change the prog to use a wrong version for example (vers=4.0) you get this: $ gcc -o fsopen fsopen.c $ ./fsopen fsconfig(sfd, FSCONFIG_SET_STRING, "vers", "4.0", 0): Invalid argument kernel mount errors: e Unknown vers= option specified: 4.0 There are some cons to using this API, mainly that mount.cifs will have to encode more knowledge and processing of the user-provided option before passing it to the kernel. Where previously we would pass most options as-is to the kernel, making it easier to add new ones without patching mount.cifs; we know have to know if the option is a key=string, or key=int, or boolean (key/nokey) and call the appropriate FSCONFIG_SET_{STRING,FLAG,PATH,...}. The pros are that we process one option at a time and we can fail early with verbose, helpful messages to the user. Cheers, From fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 28 Feb 2021 16:05:19 -0800 Subject: [PATCH 1/3] Linux 5.12-rc1 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b0e1bb472202..f9b54da2fca0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 -PATCHLEVEL = 11 +PATCHLEVEL = 12 SUBLEVEL = 0 -EXTRAVERSION = -NAME =