Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp114913imm; Tue, 24 Jul 2018 15:08:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfu3+QiJ59QI7PJv00zdGAudWw55STdOtdEr2Rc3w1iyBk0Bsl3qYHD1aUdljtQxz8oIxzR X-Received: by 2002:a17:902:2908:: with SMTP id g8-v6mr18617349plb.180.1532470108782; Tue, 24 Jul 2018 15:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532470108; cv=none; d=google.com; s=arc-20160816; b=OdJZpygCQpAdqBaWJv2jI/RYPp+jgUeJn6tE74zGHcT+JcEEIkCH7J2i2d3cq45i5x RUagCFQ4a8bucqSvN7Xs2oSjEU4IYLpHangm9JZGdKnnWA7eswWdUk6Og4SHyOEIrD7a aVgHojBhuvKQnNDBP+L+Ic2ClYczGwhIpv2F/iJeAnuM6w4Z+dEvAx63aNKRpHIMJfni jKghEUg9srD6FXmWeB0yXbtYRGBM9RGNcZ/DnbNQYtf3/Wbd+NufFCt6jni+LgQ5LVMU gPhmLqqUubCDgLpurZ7qkqi9fNGvd3XRqQNwbtc7uyI1WNuaXw83hvAf4mTPEW22ymW6 1qXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=P/ed/Q2I/hcC2QpcSTynFKeNq+wbtnVj2KKaTP2e++U=; b=tJL42ezF/DBhpHpyGvIe4GbuOd5adSuYGf1fZUa+b3OsYcmVEY6JZcdOr6Vu9iQb2y OvapCqx4zEMejZX1t0sTxc/Q0Uhs+nH2gmB7YGQFjf6r/S/CUkmtgExUgTMQY3YBEKF5 GaO5qM2j+15mvR8O1Z8QewXBGIaiWgII+i8dr4F0uOOMp7nZSaVrOqc2negiy6sWaKcQ NcCulcFxy+a171hjLvQT0VawhEKMFpgDW24mtDgXp6i/5BbkRiyhCjDEaORQyIg0DLG9 Y9V3gEHZ1t599VigwAuUyZF71v1SEO9m5QJt25XdHa+Y3X4OJQvI1O2GcJpD7Oe+x9B9 6qhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=flnBXnGj; dkim=fail header.i=@chromium.org header.s=google header.b=LIHH1bvA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si4241901plt.111.2018.07.24.15.08.13; Tue, 24 Jul 2018 15:08:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=flnBXnGj; dkim=fail header.i=@chromium.org header.s=google header.b=LIHH1bvA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388819AbeGXXPw (ORCPT + 99 others); Tue, 24 Jul 2018 19:15:52 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:38396 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388488AbeGXXPw (ORCPT ); Tue, 24 Jul 2018 19:15:52 -0400 Received: by mail-yb0-f194.google.com with SMTP id i9-v6so2254822ybo.5 for ; Tue, 24 Jul 2018 15:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=P/ed/Q2I/hcC2QpcSTynFKeNq+wbtnVj2KKaTP2e++U=; b=flnBXnGjVMDtKZs+lp4NfdX9QmZGYUSr/GKTM9S32/3XjeQafL+vEZL4xFJYBIXz+f E5HOg9J9IcWYYb3JfLpdgicqVvDE+pIKsrruTs/72JQ8xLP7QG+PvhvU5iIx57dS3CBB 2BFrmbPYnCVbgG/xXsCAgTFQ00hYY3o3kpnWsbES0wQ0q+Dt87tw4Ir8eesWZiWFWPGW FdtT6PIfRNpPAuhbhJYttGiEMuC/fw7ybxBeJAphcqPOSh+q0uKVrb5Yiw7uqbrC0l17 RYQBDxGFKvdM0b/FrqXpQiQoc/LSHxwvz6x/8nKD2BpDc0D1ZRH2D2jGkHUhgUHn3cr5 C1Tg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=P/ed/Q2I/hcC2QpcSTynFKeNq+wbtnVj2KKaTP2e++U=; b=LIHH1bvApzZUPtbudniwBV0JQEQgsMQmAAqEsE/4JhNBVZ4R1QuVeJmKstPX+rTAnz HI4TM16+H+EnqDTLhtDbDjXXs3vcZjSsjWdFoCkH1nH5pefHVbqGrhaq7Y651zVX8S2G DoWc7JM5HqYzF+VB80DcQsyTITBPBTum8QSO8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=P/ed/Q2I/hcC2QpcSTynFKeNq+wbtnVj2KKaTP2e++U=; b=fMOxV7YzTWIkSlAHEn0XseppDb3U49ODpCNhxBUWaPdvSxQ2+BbhTgxjXAEcSgRkP9 mZuQwz3e4YnzrmDsACWa3Ui7F8QnfSAqzK4suFnBXzTNN7Sxi02JdDaiWZe5zEMGKQiJ qke/GrCOTCvViccsDskE7nXR7kTtZDQbU2ZkROZMUG5hu62/3AQmahPZgvNjhgtgfoxw ZWr8BOBjuCywnXy89L0w7nn1UVdEvoiFoni92SlPwRrzEUkvFB4AKviZh4asSypfhISU +L+F6X4gHD0dCq34FhdYkXS0RHAXn6ciB19jZuAmm5yxEle5uygbV99Kaq51obOtfTe1 EEgQ== X-Gm-Message-State: AOUpUlGoRE6GmqFnSNfbvA/aQngd1O+L/ZQeimtF/ikiHWFbBiUr22Wz /Mhwkt6Xz7V8yMjqPn8l3GwPZTCUv/9BK9r1btHe/g== X-Received: by 2002:a25:ce8e:: with SMTP id x136-v6mr10089013ybe.118.1532470038751; Tue, 24 Jul 2018 15:07:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:6602:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 15:07:18 -0700 (PDT) In-Reply-To: <20180724200214.95975-1-zsm@chromium.org> References: <20180724200214.95975-1-zsm@chromium.org> From: Kees Cook Date: Tue, 24 Jul 2018 15:07:18 -0700 X-Google-Sender-Auth: RL0mpwQfeCs01T-rQmROI7HhA2A Message-ID: Subject: Re: [PATCH] tracefs: Annotate tracefs_ops with __ro_after_init To: Zubin Mithra , Steven Rostedt Cc: LKML , Guenter Roeck , Al Viro Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding Steven (maintainer) and Al (fs) to CC... On Tue, Jul 24, 2018 at 1:02 PM, Zubin Mithra wrote: > tracefs_ops is initialized inside tracefs_create_instance_dir and not > modified after. tracefs_create_instance_dir allows for initialization > only once, and is called from create_trace_instances(marked __init), > which is called from tracer_init_tracefs(marked __init). > > Signed-off-by: Zubin Mithra > Reviewed-by: Kees Cook Who's tree should this go through? Thanks! -Kees > --- > fs/tracefs/inode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > index bea8ad876bf9..20e965873f27 100644 > --- a/fs/tracefs/inode.c > +++ b/fs/tracefs/inode.c > @@ -53,7 +53,7 @@ static const struct file_operations tracefs_file_operations = { > static struct tracefs_dir_ops { > int (*mkdir)(const char *name); > int (*rmdir)(const char *name); > -} tracefs_ops; > +} tracefs_ops __ro_after_init; > > static char *get_dname(struct dentry *dentry) > { > -- > 2.18.0.233.g985f88cf7e-goog > -- Kees Cook Pixel Security