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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46F62C433F5 for ; Fri, 22 Apr 2022 12:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233944AbiDVM5j (ORCPT ); Fri, 22 Apr 2022 08:57:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233098AbiDVM4q (ORCPT ); Fri, 22 Apr 2022 08:56:46 -0400 Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A328B527F5 for ; Fri, 22 Apr 2022 05:53:53 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-Bd_z2wt5MJGVJ2gBpQCfPQ-1; Fri, 22 Apr 2022 08:53:49 -0400 X-MC-Unique: Bd_z2wt5MJGVJ2gBpQCfPQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 53F1A38337E2; Fri, 22 Apr 2022 12:53:48 +0000 (UTC) Received: from comp-core-i7-2640m-0182e6.redhat.com (unknown [10.36.110.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC8A3C28107; Fri, 22 Apr 2022 12:53:45 +0000 (UTC) From: Alexey Gladkov To: LKML , "Eric W . Biederman" , Linus Torvalds Cc: Alexander Mikhalitsyn , Andrew Morton , Christian Brauner , Daniel Walsh , Davidlohr Bueso , Kirill Tkhai , Linux Containers , Manfred Spraul , Serge Hallyn , Varad Gautam , Vasily Averin Subject: [PATCH v1 0/4] ipc: Remove extra1 field abuse to pass ipc namespace Date: Fri, 22 Apr 2022 14:53:36 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These patches are made on top of branch: git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git per-namespace-ipc-sysctls-for-v5.18 After discussion, I took into account Eric Biederman's fixes. With these changes, the hacks of passing namespace through .extra1 are not required. With the current design of sysctl dynamic memory allocation is necessary. Yes, Linus, these changes are not the refactoring you were talking about, but I plan to try to do such a refactoring in the my next patchset. -- Alexey Gladkov (4): ipc: Remove extra1 field abuse to pass ipc namespace ipc: Use proper ipc namespace ipc: Check permissions for checkpoint_restart sysctls at open time ipc: Remove extra braces ipc/ipc_sysctl.c | 108 +++++++++++++++++++++-------------------------- 1 file changed, 49 insertions(+), 59 deletions(-) -- 2.33.2