Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp491943ybk; Fri, 15 May 2020 06:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFzpd7dzbo1RIB7VKciy7u5bLtgEnhVh5Qg5HIkov7D3bP9MsR6OyWUhAdO2lB+CMsa/z4 X-Received: by 2002:a17:906:1915:: with SMTP id a21mr2785014eje.44.1589548158835; Fri, 15 May 2020 06:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589548158; cv=none; d=google.com; s=arc-20160816; b=CvqcSmFnZD0Z8ge+/dAKEEzf1FnTkvEkioGTOqiSamjiAT3RRl1aUhNrno9F7Hxbhf 4jDxZ3Iu330wiTJ+MKnzAmvB+85aN1v4WSQ0bPdhirhwGKNlUK07V3wvDozK7xKia1pW 8AX3vdJZh4q+pc+MpekfQr2JhcomoCN+oHNlH4XbUPBndmEU46P4wkdqrE2tuwF3BXTM ZBiTjLHq5oG6fvRsCFFzircegH2R76MjfWtg8fAknoV+gqb7Z+WTF2gysU1edSYn82g2 v6Lnknh+TB1BG09V55QE7LlO5ORBG00gdotFUKFH6lh6w9ysEokXBz28kaJh103Tt6e2 7fhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=W9P1wHySLzxRU4jlM3CaGwEcVH4Xc+9sJuJmZ3RkQbQ=; b=TvauBkLx5d1/9FZVHYOYEqQ4xRuFUV5WyQWqqqwliJQ5HQgM1RlpOXXuaoY/4Xue8T vm0mGVadxHAO5//fexuOP+MnuhAe1SIqHNZz584goeuII10piRFxn2NO5db+Y3bpWD8Z ulYGEJoDNlEoG9MRwA1PBN0+p53FNWAWtSItojOB7oIRhj0FlqqpjfklZQUo9J8F2nsN E49TbFQcts5aNmUAG3s0wnObgIZiA0sLCe935bKyoEj9FRlldTIPWbe/1607QhtN8Q0z NBhzGWjCH340THS1d3dJoiESxJF1C3FVBxnafLFqOJTpKxLPrKEMyTBUnxtOfpvkGEC7 yoWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hdB/1CGA"; 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 m24si1121233eji.423.2020.05.15.06.08.48; Fri, 15 May 2020 06:09:18 -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="hdB/1CGA"; 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 S1726263AbgEONEW (ORCPT + 99 others); Fri, 15 May 2020 09:04:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42475 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726141AbgEONEV (ORCPT ); Fri, 15 May 2020 09:04:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589547860; 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=W9P1wHySLzxRU4jlM3CaGwEcVH4Xc+9sJuJmZ3RkQbQ=; b=hdB/1CGAZRjVDhqG0dlixJqEISZyGlc7p0vgt04sLwWqOUb0zH/ZOMyk8qSSx+N5MOBNKP I6u8hHL5jngXvA4PlfoZdxlD1vxpYTc44xgy4sdeTtNdROqj+BkpCEO5kTzFIbI6pRYOPj d6SHrra+nDdHnyfBP2m9kIwKsDm2orU= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-21-1BKl-PSFPRyCRLQPwKBL7Q-1; Fri, 15 May 2020 09:04:14 -0400 X-MC-Unique: 1BKl-PSFPRyCRLQPwKBL7Q-1 Received: by mail-qt1-f198.google.com with SMTP id t57so2345184qte.7 for ; Fri, 15 May 2020 06:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W9P1wHySLzxRU4jlM3CaGwEcVH4Xc+9sJuJmZ3RkQbQ=; b=WdrN47rTDVQdpSRBsE1lzJO2tuGzLleJIyyWmu579jcgTYDotEhJkntq1jgH5BbVzA Tluo4XFokbgvrlgjnty1+gA2JV1Y6pDyTf8EoWV4TP0SJKngHOXh/Kpq21YKNiOntzHJ Gm1aUdtUqLw8+xvSzNDszEPGjPXd8Rozgnny+z93Os9sf5mchAxZ/xZYITMFqFGQAYf4 NINfTOHmWTCSOLOLAULSu48rO8lqfwWac+RwOzwea/tPz0XPQGh/KXNJ27oV9XV0YRy5 1mDrRAAED06kMST+gmf/38ITOKtaZjafQPkJNfabu1/uyTOzO6PNTVuhxyaYXBM0vHUf Pz8w== X-Gm-Message-State: AOAM533/idPjZs2qlu1I9xsCdelX/l+EnuDz6Qz2jox84XAxDX6Hwa44 7fjBBNivxNogACNpT+3IqHGgNh8bfBmZkWCioggh4kwp19lIn0GujZ7ZagA6p3d/1GyykhVmLcC blcieFRB9zUcmRIGfH/vX00pL10O02FSOcyJaSVc5 X-Received: by 2002:a05:6214:13d4:: with SMTP id cg20mr3360614qvb.214.1589547853898; Fri, 15 May 2020 06:04:13 -0700 (PDT) X-Received: by 2002:a05:6214:13d4:: with SMTP id cg20mr3360586qvb.214.1589547853602; Fri, 15 May 2020 06:04:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Miklos Szeredi Date: Fri, 15 May 2020 15:04:02 +0200 Message-ID: Subject: Re: Setting mount propagation type in new mount API To: "Michael Kerrisk (man-pages)" Cc: David Howells , lkml , "linux-fsdevel@vger.kernel.org" , Petr Vorel , linux-man Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 1:40 PM Michael Kerrisk (man-pages) wrote: > > Hello David, Miklos, > > I've been looking at the new mount API (fsopen(), fsconfig(), > fsmount(), move_mount(), etc.) and among the details that remain > mysterious to me is this: how does one set the propagation type > (private/shared/slave/unbindable) of a new mount and change the > propagation type of an existing mount? Existing mount can be chaged with mount(NULL, path, NULL, MS_$(propflag), NULL). To do that with a detached mount created by fsmount(2) the "/proc/self/fd/$fd" trick can be used. The plan was to introduce a mount_setattr(2) syscall, but that hasn't happened yet... I'm not sure we should be adding propagation flags to fsmount(2), since that is a less generic mechanism than mount_setattr(2) or just plain mount(2) as shown above. Thanks, Miklos