Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp149581rdb; Thu, 16 Nov 2023 14:48:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGLfML9Jw8LtvAKBBLRfpKkQIwT9D4zXZ4e/UqOimytOFG5jGrypAlRHpkGQPy9TXkjU6Jr X-Received: by 2002:a05:6a20:9143:b0:187:d8d7:5f00 with SMTP id x3-20020a056a20914300b00187d8d75f00mr2055125pzc.12.1700174909925; Thu, 16 Nov 2023 14:48:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700174909; cv=pass; d=google.com; s=arc-20160816; b=dLCVDgj9y6JHmUKKkM4yOcHV4jKXQUwardaKJHigqqeI6Q9cSLtPkYUIViF/Juzdz+ W3N0qCiiV2V6UOCVxEjEjX+ng1wAuGbiConhLdlqQ9GhxQRVy8KFTw639aRZrWdTk5NU cYtNonfeyVVEV5lXTzK9YwuFVEckq7QaUvhxp7nCaYAiZ7Bb29H0ldLB7kp+M6NfAe21 yc0YUxUTcFtb0A3zM7b+WRQBhOa3FR4zDVnGbh/pc4VMv1NixK50aMIINY4TuoEREdkc hSiew7hOC8edo2N4Q9fi+9Ix1Cnrd78h/qeMHHXLdOaqeCu6e50dYA9YSWL9EuWDkewR ePwA== ARC-Message-Signature: i=2; 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 :dkim-signature; bh=KOX5RPISYjppAYQvIxxGqk3Qer6gDi88WVzjLe0j7KA=; fh=lCqb0epcnmMKie6kWij55va0cZqOJzoAx+a44+1OOtg=; b=dETP0DHH7Hx5zoOam80HzwN/Xqm+5084U+F0Bjn7Z14e9qj65cuYgxCNXiebkyOr6P xrC1FBl1CpMG9G45J12HOLtVX4YT4tniFezF6KpPTl+da9Trfg8sPHjBKvx0xz5AyfuN b0foX9mrSJE9ri5iBc4ZVfA1pe7Pcyma053ob6qYcUXjPKzORZhKjKfCx6Q+bGDiLgPj 4XWnzHH4YMYdj2V8XclJdJ2IA6PqHOQt8uo9LnAYBkUz6b7hh7SAwqPxSN8UCWPLS/fn R2k9DfMiI8EwLmqmKMZHceRRiDuod6MXL4oJ/PgDybzzqOQZZeWrxydDi7ZsgvdSK/j5 RC3w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="Jc/Ddzra"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id k9-20020aa79d09000000b006be04dec663si470981pfp.311.2023.11.16.14.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 14:48:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="Jc/Ddzra"; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id ED49281E14F8; Thu, 16 Nov 2023 14:48:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345583AbjKPWsY (ORCPT + 99 others); Thu, 16 Nov 2023 17:48:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345590AbjKPWsX (ORCPT ); Thu, 16 Nov 2023 17:48:23 -0500 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2089.outbound.protection.outlook.com [40.107.243.89]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1855D50; Thu, 16 Nov 2023 14:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ojbzmea4aEXxI/HsiJGFCqbRHa1Zemme9tClKHienE30F+gjLg+bKsMUNf8E9GIPh40RvXofjvK8NhEC2e09R62GQ5bFKReFpK+ARNepD0Xu++zLijQns7/oRPWfcqOUl/k+Yy/vg5XKh5NWmsQTtEWEroQGZixp+vig8ZjVBIupZ/sxOek7qQ4LiXcTtD8bttmcyWorpBXMP/rWF2oZrOKZ2s2UOWckD/uGI5IutJuOfwYnriRpEw0R0YpsQNkA8Q1frE7etY6Nw6a4IKaDv30EMzkqS4DfT+tg+A6ONLreI+PHgOlVwprq9ycMTLmFgOmu+RlCOO0wen00OAwhsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KOX5RPISYjppAYQvIxxGqk3Qer6gDi88WVzjLe0j7KA=; b=BpR6v6l8B0eWDWQJTywgt+OR6TyQiXCgIqH5v1152dNWhu73syC+fsGzBFmkJOLp8OCg+iQLef+ZZPl+ek/iVdrSfgSnBwGqfoIPwmH8Uyn6ScQcd5vThFL0d01HuVxYENW/jHJ5ZpjTomAez/rNL3P7ZG5vxzIWxKlsGGvIJge6IHB4VsV72mJpRmeHKOjF0OrtKkUBPziz0bHLi3sW9K3NPR8JpOcDJwzAHoPgU1hph5d91MJj1xTO4ksmWgxJsONVeHhJxiRznMIwa54JIzDUI09SFv8axmrKJc1OEHFoxE3ZpFM+4E9LBTHyCvHoajafxli+H51n6TLF5VP5uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KOX5RPISYjppAYQvIxxGqk3Qer6gDi88WVzjLe0j7KA=; b=Jc/Ddzra48pO8IFeogSvm7DU2huxz9uOqJQlq2H4SyN6o2Vgb5JzSlfYf6NhQW+/37O9b7wKf2xQcPlXcnBhCrUiSBZ0gFWOf4+Hn61xi35YIT6Onf2lnR3cZsdrrFJOn1RyxklKkJr2ztYBDQtziY6ujzFeHudX/LPvZRQ05BY= Received: from SA1PR02CA0007.namprd02.prod.outlook.com (2603:10b6:806:2cf::18) by CY8PR12MB7490.namprd12.prod.outlook.com (2603:10b6:930:91::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23; Thu, 16 Nov 2023 22:48:16 +0000 Received: from SA2PEPF00001509.namprd04.prod.outlook.com (2603:10b6:806:2cf:cafe::44) by SA1PR02CA0007.outlook.office365.com (2603:10b6:806:2cf::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21 via Frontend Transport; Thu, 16 Nov 2023 22:48:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF00001509.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7002.20 via Frontend Transport; Thu, 16 Nov 2023 22:48:16 +0000 Received: from titanite-d354host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Thu, 16 Nov 2023 16:48:15 -0600 From: Avadhut Naik To: , CC: , , , , , , , , , Subject: [PATCH v6 3/4] platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo Date: Thu, 16 Nov 2023 16:47:24 -0600 Message-ID: <20231116224725.3695952-4-avadhut.naik@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231116224725.3695952-1-avadhut.naik@amd.com> References: <20231116224725.3695952-1-avadhut.naik@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001509:EE_|CY8PR12MB7490:EE_ X-MS-Office365-Filtering-Correlation-Id: 2fbae639-fb9c-4fca-6b72-08dbe6f61f4b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w1nfrFkF992WjjJ2ZUOVkjd5AnFH1AG5rlQbg15A+zQt4DnMGjvuQQDCK/yReXR81pEXdyog6+F+DuPBkJ8sTa5lq2JTB9h40PFjlLSUGjnwfTbhh+tx5CMixJsFNNByYHMM9YMGudRhJBG9TfKV2YihLcWJYLhBaxyegabWpViULhSqcseZn2v4j5T4Z3eQQWTDBibuT2ZwgVgWQNElaDvqvAUStBD0ymqcCYF++lki9xHYHWxzC3MCnt8BF5IqLWc1Y4geZ/vZiv1SHAJhu0kPcEKbDXjQa8lEISRIh5kpcSRyCrbKBpyzHOrRn/BZXiRCDoyy3Gmq+iX2uDAdy2XOLvkvlQ268OHhRq+z5/cr2Z5qrdCslvqYvZMgMyPdxVAGQiKiv2+vKtbl21fLs8Of/+ibCHZhIsqEfoEPYy7aTJC1rhLh9txDZ0ILlVsuxPyPfclnprewKdPcTK3xrZTYoVxc1oe7RayFs5Q7YhfdC//1IVXIw9ke+zSyn7XfZ7+h1j3UsjgJMfS3Y8IBycibB5rFkSy0pDnZmI9rloyu4WCxGCKrpp2xqxFPhAN18ZshFtd7pkqD0lY5AZfLIXlHNYzWS7bttzFEOOM9E0c0vcs+qhxNU9KuUD8qruSP/sVF4ZltedCj0LpMTw5aYOQRqeSza61IRp04HTVd6beFyVtspo90PP9GtHdDFmBGx9oRyL3B+9RaNURaV9NgyzfXiJwXlqyExWNi1PMSG5bc2qDpyjHs3qxf9ob1IKJTrqbAyx+SVEj4454wE60sIw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(346002)(136003)(396003)(376002)(230922051799003)(64100799003)(1800799009)(82310400011)(186009)(451199024)(46966006)(40470700004)(36840700001)(36756003)(41300700001)(2906002)(356005)(47076005)(81166007)(83380400001)(86362001)(5660300002)(82740400003)(336012)(426003)(26005)(16526019)(40480700001)(2616005)(1076003)(316002)(44832011)(54906003)(7696005)(70586007)(6666004)(36860700001)(70206006)(110136005)(4326008)(40460700003)(8936002)(8676002)(478600001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2023 22:48:16.3968 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2fbae639-fb9c-4fca-6b72-08dbe6f61f4b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001509.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7490 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 16 Nov 2023 14:48:29 -0800 (PST) From: Avadhut Naik The debugfs_create_blob() function has been used to create read-only binary blobs in debugfs. The function filters out permissions, other than S_IRUSR, S_IRGRP and S_IROTH, provided while creating the blobs. The very behavior though is being changed through previous patch in the series (fs: debugfs: Add write functionality to debugfs blobs) which makes the binary blobs writable by owners. Thus, all permissions provided while creating the blobs, except S_IRUSR,S_IWUSR, S_IRGRP, S_IROTH, will be filtered by debugfs_create_blob(). As such, rectify the permissions of panicinfo file since the S_IFREG flag was anyways being filtered out by debugfs_create_blob(). Moreover, the very flag will always be set be set for the panicinfo file through __debugfs_create_file(). Signed-off-by: Avadhut Naik Reviewed-by: Greg Kroah-Hartman Reviewed-by: Tony Luck --- drivers/platform/chrome/cros_ec_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c index 091fdc154d79..6bf6f0e7b597 100644 --- a/drivers/platform/chrome/cros_ec_debugfs.c +++ b/drivers/platform/chrome/cros_ec_debugfs.c @@ -454,7 +454,7 @@ static int cros_ec_create_panicinfo(struct cros_ec_debugfs *debug_info) debug_info->panicinfo_blob.data = data; debug_info->panicinfo_blob.size = ret; - debugfs_create_blob("panicinfo", S_IFREG | 0444, debug_info->dir, + debugfs_create_blob("panicinfo", 0444, debug_info->dir, &debug_info->panicinfo_blob); return 0; -- 2.34.1