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 X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8FE7C433DF for ; Fri, 29 May 2020 11:49:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86D2E20814 for ; Fri, 29 May 2020 11:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590752957; bh=9xQnbSRA4p8fwbkgB2zUKlTJHTtcFIyTjp/UVhOIUHI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=m58EybybgJX/NmLSOo/hDF6Pe9d1Y4XSNRzVugZVX+J8vNQaiGHRP/OB+WQwMYwiQ lOVWvDr1bWzNpJi6jMWOw4EzLMVIh1cxJWAbFW3fUQu0HHCDOr7CiwG4LdDBiQIK+5 Ehqyp7/Po2NIY2hONyhu+jVS2TeeDwp2KCS11Py0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726687AbgE2LtQ (ORCPT ); Fri, 29 May 2020 07:49:16 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:37946 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbgE2LtQ (ORCPT ); Fri, 29 May 2020 07:49:16 -0400 Received: by mail-pj1-f68.google.com with SMTP id t8so1243197pju.3 for ; Fri, 29 May 2020 04:49:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tKgvLnMoVN03KmyidTRu63JbswSykU0phmRWaMSE1pQ=; b=ME5ieocNPvRp8bvbv7Q1H/BLTSdEFEB91ZVaFh1v6bmtnyDI9KRI6N5WQz8D3zer5o MfPNi9LaaCR29/Ar3iHlH0G5LkUZwCPG27mM0XYg/8dW5ZbcZCmwcDS5djFjHuLSaJdt CDrsMMhDBJPdKgQjBaLf2Mxhj4S8RkCn195mIiQ1xHUiIEFMCRPZe4Svl6kxvR5rh7wP gAlK/jecEzPypUda9Zux2pMSDX//0nNiYt/LBK6ebeZ0mtrgW37OcHEQN/vurifBBQu2 bcYoqHUdUOrFAKJ6cDSZz96gGUkuaAZKZJCahhOs9EuRFTd/pqdEOpdWCPXAZN6Q0hT0 E72Q== X-Gm-Message-State: AOAM533VjQnmUAIbCvMEc4Dqk65+wfK4pb+SwlUj+onFafqTheOhwfnK S0R4IJ3nQTqsrV3IvUFSYF0= X-Google-Smtp-Source: ABdhPJxrT0WKEXd0Z0T8tqO8BKoAs/7a7rNPvktegNOfLVWuhUKQCRCyfP/hkaSF2EJJ+Sxqdt5Lrw== X-Received: by 2002:a17:90a:c7d8:: with SMTP id gf24mr8959455pjb.218.1590752955275; Fri, 29 May 2020 04:49:15 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id go1sm7188741pjb.26.2020.05.29.04.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 04:49:13 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id D2F254046C; Fri, 29 May 2020 11:49:12 +0000 (UTC) Date: Fri, 29 May 2020 11:49:12 +0000 From: Luis Chamberlain To: Kees Cook Cc: jack@suse.cz, rafael@kernel.org, airlied@linux.ie, benh@kernel.crashing.org, amir73il@gmail.com, clemens@ladisch.de, dri-devel@lists.freedesktop.org, joseph.qi@linux.alibaba.com, sfr@canb.auug.org.au, mark@fasheh.com, rdna@fb.com, yzaikin@google.com, arnd@arndb.de, intel-gfx@lists.freedesktop.org, julia.lawall@lip6.fr, jlbec@evilplan.org, nixiaoming@huawei.com, vbabka@suse.cz, axboe@kernel.dk, tytso@mit.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk Subject: Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir() Message-ID: <20200529114912.GC11244@42.do-not-panic.com> References: <20200529074108.16928-1-mcgrof@kernel.org> <20200529074108.16928-7-mcgrof@kernel.org> <202005290121.C78B4AC@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202005290121.C78B4AC@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > > > @c1@ > > expression E1; > > identifier subdir, sysctls; > > @@ > > > > static struct ctl_table subdir[] = { > > { > > .procname = E1, > > .maxlen = 0, > > .mode = 0555, > > .child = sysctls, > > }, > > { } > > }; > > > > @c2@ > > identifier c1.subdir; > > > > expression E2; > > identifier base; > > @@ > > > > static struct ctl_table base[] = { > > { > > .procname = E2, > > .maxlen = 0, > > .mode = 0555, > > .child = subdir, > > }, > > { } > > }; > > > > @c3@ > > identifier c2.base; > > identifier header; > > @@ > > > > header = register_sysctl_table(base); > > > > @r1 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.subdir, c1.sysctls; > > @@ > > > > -static struct ctl_table subdir[] = { > > - { > > - .procname = E1, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = sysctls, > > - }, > > - { } > > -}; > > > > @r2 depends on c1 && c2 && c3@ > > identifier c1.subdir; > > > > expression c2.E2; > > identifier c2.base; > > @@ > > -static struct ctl_table base[] = { > > - { > > - .procname = E2, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = subdir, > > - }, > > - { } > > -}; > > > > @r3 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.sysctls; > > expression c2.E2; > > identifier c2.base; > > identifier c3.header; > > @@ > > > > header = > > -register_sysctl_table(base); > > +register_sysctl_subdir(E2, E1, sysctls); > > > > Generated-by: Coccinelle SmPL > > > > Signed-off-by: Luis Chamberlain > > --- > > fs/ocfs2/stackglue.c | 27 ++++----------------------- > > 1 file changed, 4 insertions(+), 23 deletions(-) > > > > diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c > > index a191094694c6..addafced7f59 100644 > > --- a/fs/ocfs2/stackglue.c > > +++ b/fs/ocfs2/stackglue.c > > @@ -677,28 +677,8 @@ static struct ctl_table ocfs2_mod_table[] = { > > }, > > { } > > }; > > - > > -static struct ctl_table ocfs2_kern_table[] = { > > - { > > - .procname = "ocfs2", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_mod_table > > - }, > > - { } > > -}; > > - > > -static struct ctl_table ocfs2_root_table[] = { > > - { > > - .procname = "fs", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_kern_table > > - }, > > - { } > > -}; > > + .data = NULL, > > + .data = NULL, > > The conversion script doesn't like the .data field assignments. ;) > > Was this series built with allmodconfig? I would have expected this to > blow up very badly. :) Yikes, sense, you're right. Nope, I left the random config tests to 0day. Will fix, thanks! Luis From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis Chamberlain Date: Fri, 29 May 2020 11:49:12 +0000 Subject: [Ocfs2-devel] [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir() In-Reply-To: <202005290121.C78B4AC@keescook> References: <20200529074108.16928-1-mcgrof@kernel.org> <20200529074108.16928-7-mcgrof@kernel.org> <202005290121.C78B4AC@keescook> Message-ID: <20200529114912.GC11244@42.do-not-panic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kees Cook Cc: jack@suse.cz, rafael@kernel.org, airlied@linux.ie, amir73il@gmail.com, clemens@ladisch.de, dri-devel@lists.freedesktop.org, joseph.qi@linux.alibaba.com, sfr@canb.auug.org.au, mark@fasheh.com, rdna@fb.com, yzaikin@google.com, arnd@arndb.de, intel-gfx@lists.freedesktop.org, julia.lawall@lip6.fr, jlbec@evilplan.org, nixiaoming@huawei.com, vbabka@suse.cz, axboe@kernel.dk, tytso@mit.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > > > @c1@ > > expression E1; > > identifier subdir, sysctls; > > @@ > > > > static struct ctl_table subdir[] = { > > { > > .procname = E1, > > .maxlen = 0, > > .mode = 0555, > > .child = sysctls, > > }, > > { } > > }; > > > > @c2@ > > identifier c1.subdir; > > > > expression E2; > > identifier base; > > @@ > > > > static struct ctl_table base[] = { > > { > > .procname = E2, > > .maxlen = 0, > > .mode = 0555, > > .child = subdir, > > }, > > { } > > }; > > > > @c3@ > > identifier c2.base; > > identifier header; > > @@ > > > > header = register_sysctl_table(base); > > > > @r1 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.subdir, c1.sysctls; > > @@ > > > > -static struct ctl_table subdir[] = { > > - { > > - .procname = E1, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = sysctls, > > - }, > > - { } > > -}; > > > > @r2 depends on c1 && c2 && c3@ > > identifier c1.subdir; > > > > expression c2.E2; > > identifier c2.base; > > @@ > > -static struct ctl_table base[] = { > > - { > > - .procname = E2, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = subdir, > > - }, > > - { } > > -}; > > > > @r3 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.sysctls; > > expression c2.E2; > > identifier c2.base; > > identifier c3.header; > > @@ > > > > header = > > -register_sysctl_table(base); > > +register_sysctl_subdir(E2, E1, sysctls); > > > > Generated-by: Coccinelle SmPL > > > > Signed-off-by: Luis Chamberlain > > --- > > fs/ocfs2/stackglue.c | 27 ++++----------------------- > > 1 file changed, 4 insertions(+), 23 deletions(-) > > > > diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c > > index a191094694c6..addafced7f59 100644 > > --- a/fs/ocfs2/stackglue.c > > +++ b/fs/ocfs2/stackglue.c > > @@ -677,28 +677,8 @@ static struct ctl_table ocfs2_mod_table[] = { > > }, > > { } > > }; > > - > > -static struct ctl_table ocfs2_kern_table[] = { > > - { > > - .procname = "ocfs2", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_mod_table > > - }, > > - { } > > -}; > > - > > -static struct ctl_table ocfs2_root_table[] = { > > - { > > - .procname = "fs", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_kern_table > > - }, > > - { } > > -}; > > + .data = NULL, > > + .data = NULL, > > The conversion script doesn't like the .data field assignments. ;) > > Was this series built with allmodconfig? I would have expected this to > blow up very badly. :) Yikes, sense, you're right. Nope, I left the random config tests to 0day. Will fix, thanks! Luis 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12943C433E0 for ; Fri, 29 May 2020 11:51:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 87A4F206B6 for ; Fri, 29 May 2020 11:51:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 87A4F206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49YNFB0l6qzDqby for ; Fri, 29 May 2020 21:51:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.216.67; helo=mail-pj1-f67.google.com; envelope-from=mcgrof@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49YNC35j2xzDqLW for ; Fri, 29 May 2020 21:49:17 +1000 (AEST) Received: by mail-pj1-f67.google.com with SMTP id h95so356743pje.4 for ; Fri, 29 May 2020 04:49:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tKgvLnMoVN03KmyidTRu63JbswSykU0phmRWaMSE1pQ=; b=Ar3yIJx/T/SChh1cR5tveNNOQHuMe5UQbJdlZ68k4CEPF6JlFH5HR7M6HS2Ouu6r4m NkRFkS6+pbIhL4QEnCq2DoqjF6QiyzqsFUO6YT7C+7Ge1dAQ+9dzkmK3pOMbpGyzfeLu r11bVT+epWG7O3hD2ZsP/glcYgCFFgClLXqq80T9UWo1W3vySsxrpjItKWN35isoiyr8 5QsCVVf+siqy0XrVDMQbn0NOwyGg4SC/zx/4NPO6xvxWXLXYrE9WA85FhZSe5NhAmDkL HNEbyB0mAeiHTn+qwxsMyBaVNGCBX5SmTgal5ucIe+R6IEHEF8cPI1XS8hTarbyBX7qV JNPg== X-Gm-Message-State: AOAM533Lb8zl+k4RuzY24lsZV79XHFI/N4VxAkot4Iued7jpiN3v7zEM 4EWKPXxebb/KiFvTuBqDQZ8= X-Google-Smtp-Source: ABdhPJxrT0WKEXd0Z0T8tqO8BKoAs/7a7rNPvktegNOfLVWuhUKQCRCyfP/hkaSF2EJJ+Sxqdt5Lrw== X-Received: by 2002:a17:90a:c7d8:: with SMTP id gf24mr8959455pjb.218.1590752955275; Fri, 29 May 2020 04:49:15 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id go1sm7188741pjb.26.2020.05.29.04.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 04:49:13 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id D2F254046C; Fri, 29 May 2020 11:49:12 +0000 (UTC) Date: Fri, 29 May 2020 11:49:12 +0000 From: Luis Chamberlain To: Kees Cook Subject: Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir() Message-ID: <20200529114912.GC11244@42.do-not-panic.com> References: <20200529074108.16928-1-mcgrof@kernel.org> <20200529074108.16928-7-mcgrof@kernel.org> <202005290121.C78B4AC@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202005290121.C78B4AC@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jack@suse.cz, rafael@kernel.org, airlied@linux.ie, amir73il@gmail.com, clemens@ladisch.de, dri-devel@lists.freedesktop.org, joseph.qi@linux.alibaba.com, sfr@canb.auug.org.au, mark@fasheh.com, rdna@fb.com, yzaikin@google.com, arnd@arndb.de, intel-gfx@lists.freedesktop.org, julia.lawall@lip6.fr, jlbec@evilplan.org, nixiaoming@huawei.com, vbabka@suse.cz, axboe@kernel.dk, tytso@mit.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > > > @c1@ > > expression E1; > > identifier subdir, sysctls; > > @@ > > > > static struct ctl_table subdir[] = { > > { > > .procname = E1, > > .maxlen = 0, > > .mode = 0555, > > .child = sysctls, > > }, > > { } > > }; > > > > @c2@ > > identifier c1.subdir; > > > > expression E2; > > identifier base; > > @@ > > > > static struct ctl_table base[] = { > > { > > .procname = E2, > > .maxlen = 0, > > .mode = 0555, > > .child = subdir, > > }, > > { } > > }; > > > > @c3@ > > identifier c2.base; > > identifier header; > > @@ > > > > header = register_sysctl_table(base); > > > > @r1 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.subdir, c1.sysctls; > > @@ > > > > -static struct ctl_table subdir[] = { > > - { > > - .procname = E1, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = sysctls, > > - }, > > - { } > > -}; > > > > @r2 depends on c1 && c2 && c3@ > > identifier c1.subdir; > > > > expression c2.E2; > > identifier c2.base; > > @@ > > -static struct ctl_table base[] = { > > - { > > - .procname = E2, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = subdir, > > - }, > > - { } > > -}; > > > > @r3 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.sysctls; > > expression c2.E2; > > identifier c2.base; > > identifier c3.header; > > @@ > > > > header = > > -register_sysctl_table(base); > > +register_sysctl_subdir(E2, E1, sysctls); > > > > Generated-by: Coccinelle SmPL > > > > Signed-off-by: Luis Chamberlain > > --- > > fs/ocfs2/stackglue.c | 27 ++++----------------------- > > 1 file changed, 4 insertions(+), 23 deletions(-) > > > > diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c > > index a191094694c6..addafced7f59 100644 > > --- a/fs/ocfs2/stackglue.c > > +++ b/fs/ocfs2/stackglue.c > > @@ -677,28 +677,8 @@ static struct ctl_table ocfs2_mod_table[] = { > > }, > > { } > > }; > > - > > -static struct ctl_table ocfs2_kern_table[] = { > > - { > > - .procname = "ocfs2", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_mod_table > > - }, > > - { } > > -}; > > - > > -static struct ctl_table ocfs2_root_table[] = { > > - { > > - .procname = "fs", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_kern_table > > - }, > > - { } > > -}; > > + .data = NULL, > > + .data = NULL, > > The conversion script doesn't like the .data field assignments. ;) > > Was this series built with allmodconfig? I would have expected this to > blow up very badly. :) Yikes, sense, you're right. Nope, I left the random config tests to 0day. Will fix, thanks! Luis 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 145A9C433E2 for ; Fri, 29 May 2020 11:49:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E990121508 for ; Fri, 29 May 2020 11:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E990121508 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 531016E8D3; Fri, 29 May 2020 11:49:17 +0000 (UTC) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE1386E8D0; Fri, 29 May 2020 11:49:15 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id q24so1249351pjd.1; Fri, 29 May 2020 04:49:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tKgvLnMoVN03KmyidTRu63JbswSykU0phmRWaMSE1pQ=; b=DHg1gPkel40Qa6EBvlFf9TNSNOIR63bMPPSM8LL6XuYcY4xSNxHRnfKk5wdSrhlSOP /xdX9sicPFWLLTKewdKNeCA8RYzMgXtqahBjGPe2hTNA5imHmglvWRaZqQ3k1E75JTP1 FWbnVMbg0MxMY3YrtVmECF0JLVte1bSQWb/BejnfuWr0yppiGgcWVegApUsq1w96cxKd K/kvVDiYKLmQ5gVFtIBZUGIapk73eI4HXaPacK0o+anlKq5MbuEVTeLei5gGn8mtoo32 8l1rxGWznhyPzZOhm3NXFzfrjfR03qTRKlvRP3FesNoX9ll+jVlHmju1ayKBlzsS1+U4 GZJw== X-Gm-Message-State: AOAM531xGA3OaTdCb/Rn2HZ96AqHRyyYPhe1Ok6xJSO9i4ocxEQxPW4b Mq0KXyFYoqtkL8xrh7/IZZ0= X-Google-Smtp-Source: ABdhPJxrT0WKEXd0Z0T8tqO8BKoAs/7a7rNPvktegNOfLVWuhUKQCRCyfP/hkaSF2EJJ+Sxqdt5Lrw== X-Received: by 2002:a17:90a:c7d8:: with SMTP id gf24mr8959455pjb.218.1590752955275; Fri, 29 May 2020 04:49:15 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id go1sm7188741pjb.26.2020.05.29.04.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 04:49:13 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id D2F254046C; Fri, 29 May 2020 11:49:12 +0000 (UTC) Date: Fri, 29 May 2020 11:49:12 +0000 From: Luis Chamberlain To: Kees Cook Subject: Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir() Message-ID: <20200529114912.GC11244@42.do-not-panic.com> References: <20200529074108.16928-1-mcgrof@kernel.org> <20200529074108.16928-7-mcgrof@kernel.org> <202005290121.C78B4AC@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202005290121.C78B4AC@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jack@suse.cz, rafael@kernel.org, airlied@linux.ie, amir73il@gmail.com, clemens@ladisch.de, dri-devel@lists.freedesktop.org, joseph.qi@linux.alibaba.com, sfr@canb.auug.org.au, mark@fasheh.com, rdna@fb.com, yzaikin@google.com, arnd@arndb.de, intel-gfx@lists.freedesktop.org, julia.lawall@lip6.fr, jlbec@evilplan.org, nixiaoming@huawei.com, vbabka@suse.cz, axboe@kernel.dk, tytso@mit.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > > > @c1@ > > expression E1; > > identifier subdir, sysctls; > > @@ > > > > static struct ctl_table subdir[] = { > > { > > .procname = E1, > > .maxlen = 0, > > .mode = 0555, > > .child = sysctls, > > }, > > { } > > }; > > > > @c2@ > > identifier c1.subdir; > > > > expression E2; > > identifier base; > > @@ > > > > static struct ctl_table base[] = { > > { > > .procname = E2, > > .maxlen = 0, > > .mode = 0555, > > .child = subdir, > > }, > > { } > > }; > > > > @c3@ > > identifier c2.base; > > identifier header; > > @@ > > > > header = register_sysctl_table(base); > > > > @r1 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.subdir, c1.sysctls; > > @@ > > > > -static struct ctl_table subdir[] = { > > - { > > - .procname = E1, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = sysctls, > > - }, > > - { } > > -}; > > > > @r2 depends on c1 && c2 && c3@ > > identifier c1.subdir; > > > > expression c2.E2; > > identifier c2.base; > > @@ > > -static struct ctl_table base[] = { > > - { > > - .procname = E2, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = subdir, > > - }, > > - { } > > -}; > > > > @r3 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.sysctls; > > expression c2.E2; > > identifier c2.base; > > identifier c3.header; > > @@ > > > > header = > > -register_sysctl_table(base); > > +register_sysctl_subdir(E2, E1, sysctls); > > > > Generated-by: Coccinelle SmPL > > > > Signed-off-by: Luis Chamberlain > > --- > > fs/ocfs2/stackglue.c | 27 ++++----------------------- > > 1 file changed, 4 insertions(+), 23 deletions(-) > > > > diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c > > index a191094694c6..addafced7f59 100644 > > --- a/fs/ocfs2/stackglue.c > > +++ b/fs/ocfs2/stackglue.c > > @@ -677,28 +677,8 @@ static struct ctl_table ocfs2_mod_table[] = { > > }, > > { } > > }; > > - > > -static struct ctl_table ocfs2_kern_table[] = { > > - { > > - .procname = "ocfs2", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_mod_table > > - }, > > - { } > > -}; > > - > > -static struct ctl_table ocfs2_root_table[] = { > > - { > > - .procname = "fs", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_kern_table > > - }, > > - { } > > -}; > > + .data = NULL, > > + .data = NULL, > > The conversion script doesn't like the .data field assignments. ;) > > Was this series built with allmodconfig? I would have expected this to > blow up very badly. :) Yikes, sense, you're right. Nope, I left the random config tests to 0day. Will fix, thanks! Luis _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81E5BC433E0 for ; Fri, 29 May 2020 11:49:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E3EE207D4 for ; Fri, 29 May 2020 11:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E3EE207D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D34C16E8D0; Fri, 29 May 2020 11:49:16 +0000 (UTC) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id BE1386E8D0; Fri, 29 May 2020 11:49:15 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id q24so1249351pjd.1; Fri, 29 May 2020 04:49:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tKgvLnMoVN03KmyidTRu63JbswSykU0phmRWaMSE1pQ=; b=DHg1gPkel40Qa6EBvlFf9TNSNOIR63bMPPSM8LL6XuYcY4xSNxHRnfKk5wdSrhlSOP /xdX9sicPFWLLTKewdKNeCA8RYzMgXtqahBjGPe2hTNA5imHmglvWRaZqQ3k1E75JTP1 FWbnVMbg0MxMY3YrtVmECF0JLVte1bSQWb/BejnfuWr0yppiGgcWVegApUsq1w96cxKd K/kvVDiYKLmQ5gVFtIBZUGIapk73eI4HXaPacK0o+anlKq5MbuEVTeLei5gGn8mtoo32 8l1rxGWznhyPzZOhm3NXFzfrjfR03qTRKlvRP3FesNoX9ll+jVlHmju1ayKBlzsS1+U4 GZJw== X-Gm-Message-State: AOAM531xGA3OaTdCb/Rn2HZ96AqHRyyYPhe1Ok6xJSO9i4ocxEQxPW4b Mq0KXyFYoqtkL8xrh7/IZZ0= X-Google-Smtp-Source: ABdhPJxrT0WKEXd0Z0T8tqO8BKoAs/7a7rNPvktegNOfLVWuhUKQCRCyfP/hkaSF2EJJ+Sxqdt5Lrw== X-Received: by 2002:a17:90a:c7d8:: with SMTP id gf24mr8959455pjb.218.1590752955275; Fri, 29 May 2020 04:49:15 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id go1sm7188741pjb.26.2020.05.29.04.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2020 04:49:13 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id D2F254046C; Fri, 29 May 2020 11:49:12 +0000 (UTC) Date: Fri, 29 May 2020 11:49:12 +0000 From: Luis Chamberlain To: Kees Cook Message-ID: <20200529114912.GC11244@42.do-not-panic.com> References: <20200529074108.16928-1-mcgrof@kernel.org> <20200529074108.16928-7-mcgrof@kernel.org> <202005290121.C78B4AC@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202005290121.C78B4AC@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jack@suse.cz, rafael@kernel.org, airlied@linux.ie, benh@kernel.crashing.org, amir73il@gmail.com, clemens@ladisch.de, dri-devel@lists.freedesktop.org, joseph.qi@linux.alibaba.com, sfr@canb.auug.org.au, mark@fasheh.com, rdna@fb.com, yzaikin@google.com, arnd@arndb.de, intel-gfx@lists.freedesktop.org, julia.lawall@lip6.fr, jlbec@evilplan.org, nixiaoming@huawei.com, vbabka@suse.cz, axboe@kernel.dk, tytso@mit.edu, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ebiederm@xmission.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org, ocfs2-devel@oss.oracle.com, viro@zeniv.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, May 29, 2020 at 01:23:19AM -0700, Kees Cook wrote: > On Fri, May 29, 2020 at 07:41:01AM +0000, Luis Chamberlain wrote: > > This simplifies the code considerably. The following coccinelle > > SmPL grammar rule was used to transform this code. > > > > // pycocci sysctl-subdir.cocci fs/ocfs2/stackglue.c > > > > @c1@ > > expression E1; > > identifier subdir, sysctls; > > @@ > > > > static struct ctl_table subdir[] = { > > { > > .procname = E1, > > .maxlen = 0, > > .mode = 0555, > > .child = sysctls, > > }, > > { } > > }; > > > > @c2@ > > identifier c1.subdir; > > > > expression E2; > > identifier base; > > @@ > > > > static struct ctl_table base[] = { > > { > > .procname = E2, > > .maxlen = 0, > > .mode = 0555, > > .child = subdir, > > }, > > { } > > }; > > > > @c3@ > > identifier c2.base; > > identifier header; > > @@ > > > > header = register_sysctl_table(base); > > > > @r1 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.subdir, c1.sysctls; > > @@ > > > > -static struct ctl_table subdir[] = { > > - { > > - .procname = E1, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = sysctls, > > - }, > > - { } > > -}; > > > > @r2 depends on c1 && c2 && c3@ > > identifier c1.subdir; > > > > expression c2.E2; > > identifier c2.base; > > @@ > > -static struct ctl_table base[] = { > > - { > > - .procname = E2, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = subdir, > > - }, > > - { } > > -}; > > > > @r3 depends on c1 && c2 && c3@ > > expression c1.E1; > > identifier c1.sysctls; > > expression c2.E2; > > identifier c2.base; > > identifier c3.header; > > @@ > > > > header = > > -register_sysctl_table(base); > > +register_sysctl_subdir(E2, E1, sysctls); > > > > Generated-by: Coccinelle SmPL > > > > Signed-off-by: Luis Chamberlain > > --- > > fs/ocfs2/stackglue.c | 27 ++++----------------------- > > 1 file changed, 4 insertions(+), 23 deletions(-) > > > > diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c > > index a191094694c6..addafced7f59 100644 > > --- a/fs/ocfs2/stackglue.c > > +++ b/fs/ocfs2/stackglue.c > > @@ -677,28 +677,8 @@ static struct ctl_table ocfs2_mod_table[] = { > > }, > > { } > > }; > > - > > -static struct ctl_table ocfs2_kern_table[] = { > > - { > > - .procname = "ocfs2", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_mod_table > > - }, > > - { } > > -}; > > - > > -static struct ctl_table ocfs2_root_table[] = { > > - { > > - .procname = "fs", > > - .data = NULL, > > - .maxlen = 0, > > - .mode = 0555, > > - .child = ocfs2_kern_table > > - }, > > - { } > > -}; > > + .data = NULL, > > + .data = NULL, > > The conversion script doesn't like the .data field assignments. ;) > > Was this series built with allmodconfig? I would have expected this to > blow up very badly. :) Yikes, sense, you're right. Nope, I left the random config tests to 0day. Will fix, thanks! Luis _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx