Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp496719pxa; Thu, 27 Aug 2020 07:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOhaCFxfP0wcqlhnCuytPafj04eNlCVmjW1H8U2+nd3Cr6tQc0DOyobDp2mrVzYN5JfFGa X-Received: by 2002:a17:906:a89a:: with SMTP id ha26mr18393074ejb.391.1598540324082; Thu, 27 Aug 2020 07:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598540324; cv=none; d=google.com; s=arc-20160816; b=pPR9TWeFaZ+rsrEDb7+SbkEajXPWuj9g7ma4EYjIi38AJyK/FrgVNRR8LaLdBjeUbh IFGHR9lLoyU5WtTGWp7RnkynpxLcBjwLoG1JkaRUvFn2tSvOPIBe6fIlo9ntX6o3IYko NVf1ApPE58+CbbpFUml6kdRtEgpw0zVMolyEAP6TKy89xziD9cfvGmH5i8uDw4Y6W7T8 uN7XuS9dLpn8KfSDaLyc10emKZHLuuXaAmoWfoyQrxZS07ZKc/6jVyWRnql9epjmKG8F ajJhXxtuiZzNqImKErB7J+0WVy79a5WJH2oRJo5ldN+qKNKZTtV76nDOxsnSjaEzGwRj jRFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=mvhoYX4+JbAX1kvw4eesPtR0Ht263x0krc3C+DiPh3g=; b=JvLi89eLID/jk+pyPlb1oVf5W3YbmR2vaLGN/vCBGekuGfjDzH7EsYQwMgf8hQ1G8D v7L/cxicIvuBEa4ModZ0A2ZS8UOq0h9/jhCj1xTepDif+TQGmDjM6ZLTGxNiz8Y6mrPI +oLBjzOcNf1trxPqGEWUPevYoArdt9Y8a+EJpCoOKgs0BdsmJ+oGVSvjDUNExP3JD14c LPouXZ73HmT/7Wh2doymbHS8eDJn0LlSx8Eh0pRa7UZ4ap3Sh2jUvwG6HZbqmV8f6K5C cSKw7rmowZQv/4kI4MHfL1iaLAGqrzqRI/0nWLXcspnkoeMTSaBY93qNkd82XRxtkAdG YsXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rce3B+tW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si1858860edr.66.2020.08.27.07.58.21; Thu, 27 Aug 2020 07:58:44 -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=@kernel.org header.s=default header.b=rce3B+tW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgH0O5q (ORCPT + 99 others); Thu, 27 Aug 2020 10:57:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:50128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729019AbgH0MZ2 (ORCPT ); Thu, 27 Aug 2020 08:25:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7F3B222CAE; Thu, 27 Aug 2020 12:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598530768; bh=US6B5uc+zGUz3cqdCuABlRgDweW1qyTBY8615Hnz5oY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rce3B+tWvgfEgfvlMb5RmczGZT5J+fmgYyXymlnc6GLeWD+Z+5o3wcnw9+f5ze47H a1HnkQDaZSznaaSYu/8jIl+xXvbUoZreIJQpuAmqL8VS4Wihzjqb5KrTYMYjhZcCSQ lQbt8IWlAGdz3aSFJB1+IPax4S3OvUbimej4p1S0= Date: Thu, 27 Aug 2020 14:19:41 +0200 From: Greg Kroah-Hartman To: Kees Cook Cc: Allen Pais , torvalds@linux-foundation.org, akpm@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, "James E . J . Bottomley" , Jens Axboe Subject: Re: [PATCH] linux/kernel.h: add container_from() Message-ID: <20200827121941.GC420527@kroah.com> References: <20200827013636.149307-1-allen.lkml@gmail.com> <202008261929.A50D0DB3E8@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202008261929.A50D0DB3E8@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 07:31:40PM -0700, Kees Cook wrote: > On Thu, Aug 27, 2020 at 07:06:36AM +0530, Allen Pais wrote: > > Introduce container_from() as a generic helper instead of > > sub-systems defining a private from_* API > > (Eg: from_tasklets recently introduced in > > 12cc923f1ccc: Tasklet: Introduce new initialization API) > > > > The helper is similar to container_of() in argument order > > with the difference of naming the containing structure instead > > of having to specify its type. > > > > Suggested-by: James E.J. Bottomley > > Suggested-by: Greg Kroah-Hartman > > Suggested-by: Jens Axboe > > Signed-off-by: Allen Pais > > Acked-by: Kees Cook > > Who can carry this so it can get used by multiple trees? Should I keep a > git branch folks should merge when taking Allen's conversion patches? I can put it in my driver core tree, and give everyone a stable, signed, tag to pull it from so that it can get propagated everywhere, if that makes it easy for others to use it now. thanks, greg k-h