From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87712 invoked by alias); 9 Oct 2019 12:01:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 87697 invoked by uid 89); 9 Oct 2019 12:01:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=mistakes X-HELO: mx1.redhat.com From: Florian Weimer To: Christian Brauner Cc: Adhemerval Zanella , libc-alpha@sourceware.org Subject: Re: [PATCH] [GLIBC RFC] clone3: add CLONE3_RESET_SIGHAND References: <20191008134417.16113-1-christian.brauner@ubuntu.com> <5cab2cbb-e72b-4eb0-5271-1a90c4e8de95@linaro.org> <20191009104830.w2fkr4m3lrkfowxq@wittgenstein> <87bluq18po.fsf@oldenburg2.str.redhat.com> <20191009111200.rfqlk5lgityhi6rl@wittgenstein> <87zhiayvxc.fsf@oldenburg2.str.redhat.com> <20191009115846.xs4uou6c2x67pqz7@wittgenstein> Date: Wed, 09 Oct 2019 12:01:00 -0000 In-Reply-To: <20191009115846.xs4uou6c2x67pqz7@wittgenstein> (Christian Brauner's message of "Wed, 9 Oct 2019 13:58:47 +0200") Message-ID: <87v9syyvpd.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-10/txt/msg00248.txt.bz2 * Christian Brauner: >> With this construct, the application programmer needs to remember which >> flags are old and new (predate and postdate known_flags). It's too easy >> to make mistakes there. >> >> What about this? >> >> pid_t pid = clone3 (&args, sizeof (args)); >> if (pid < 0) >> return -1; >> >> if (args.known_flags == 0) >> args.known_flags = CLONE3_INITIALLY_SUPPORTED_FLAGS; >> >> if (args.known_flags & NEW_FLAG_I_CARE_ABOUT) >> /* Kernel does support the known_flags extension and does >> support the feature I care about. */ >> >> We could hide this in the clone3 wrapper for glibc if we start out with >> a struct clone_args that has this member. > > So the kernel semantics I suggested but when the kernel does not support > it have and doesn't set it have glibc set this? Exactly. > Yeah, that sounds like a good idea to me! Good. Please get this into the kernel. 8-) Thanks, Florian