Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp862359pxb; Fri, 22 Apr 2022 12:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxonSncN7pQ5E/sL/ac5Hjx0OOmu5jL4CdpHjX1VGKcrYlRmN8DKtgOYXBixyZlqCpcKP3z X-Received: by 2002:a63:9203:0:b0:386:3b37:76b5 with SMTP id o3-20020a639203000000b003863b3776b5mr5391404pgd.234.1650657258457; Fri, 22 Apr 2022 12:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650657258; cv=none; d=google.com; s=arc-20160816; b=wItXFGQlyeYpy9bTPZTJOrHVv/7pAmFgj+bgk3M2Sl1POvoh6MyE9luNZul7qX701E vZlJ+Y5bKX5E+2WzGtbCDUSHtDU7I8aTbtojomqAR83NnrcNCvInzG8mGWiFXC0KNueA W+EHh3Q7OP3aORoUL7EajEEqzACxpZwlp0antF7iewp/79Vk4+JaiPIpcUXo/bvbVeVk uenLpg4DWXP2auC7+yKtoM+xfgii3BjINlUY/nrFVlj6ScALdOIKhTQ0wKpOe4PYa5g3 CSm2j87xVBk7oVVYGcnePB98m5K+reiqXpYlKWOSQIXRyUNxm0tq+m/szGGy5AewH8+v uSyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZpxzPv/VNPSFFJzHgOyJspdBlRG9sPvMn3UJZCXP8fg=; b=k+6RlzqlfPPUyuR/vHj25UdkbQ0J9w4cevdQT+C97T1nKHV/sCFxLiMgZwIAol3mIc NXsxbJlb7272Mnr31umlCXxOH4gqJpk92T11oroxlyw2oWPaXOj1D8t04yYr43mELAKJ 6PhvVMUgKm6cW/qTO31iMegwQVEaK6EmM2kOQR+/ZYe1YF4LtqaT1hvzY6icIg51yUin kGqA6UukssaxzyHBLYaRRjufayTpqrVykQFZ7Lj2grhTveeqqIXgg6HHRu9weoazgi0Q MhNpbXGM/2BDONRfl16BT9ynQznIGykM4LOWtI/j3KTzZDgHCHp2oELi889fdN2OkHTl QtDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x6-20020a170902ec8600b0015b55ac4017si4516655plg.265.2022.04.22.12.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:54:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 93F2E18D692; Fri, 22 Apr 2022 11:59:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233850AbiDVM5j (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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