From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757004AbbE2S3j (ORCPT ); Fri, 29 May 2015 14:29:39 -0400 Received: from mail-bl2on0108.outbound.protection.outlook.com ([65.55.169.108]:30992 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756209AbbE2S3c (ORCPT ); Fri, 29 May 2015 14:29:32 -0400 X-Greylist: delayed 171282 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 May 2015 14:29:32 EDT Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; alien8.de; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NP4JD2-07-XUC-02 X-M-MSG: Message-ID: <5568B006.9090804@amd.com> Date: Fri, 29 May 2015 13:29:26 -0500 From: Aravind Gopalakrishnan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Borislav Petkov CC: , , , Subject: Re: [PATCH 5/6] edac, mce_amd_inj: Add README file References: <1432753418-2985-1-git-send-email-Aravind.Gopalakrishnan@amd.com> <1432753418-2985-6-git-send-email-Aravind.Gopalakrishnan@amd.com> <20150529153836.GI31435@pd.tnic> In-Reply-To: <20150529153836.GI31435@pd.tnic> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11OLC004;1:k9mcNl5TkOOS5LCKMLYGIyLJlbBDsnNkvpEywpOUUhoqp8C0Oma4d12wmrJbJXreSYFL60dg7Gi1HTkWj9YqxeWcJaheBR+rRpBsSrZiO0NQrVxeatQhE8N6FhGHG3rjlM/6ujWQRNl/REu/nqFuSGtTY7Ebc64uT09jFKdC4YyWQXPkWwRfJuYq2OnB/V9diwUBAD/kiJo/bn2HU6C7uaEPLriQ3V59uMnH/hK1v+u4s9vZnlLdru4pt9H3WRgnp/89oz662tLqbTK3oousrw== X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(428002)(377454003)(189002)(51704005)(199003)(164054003)(479174004)(24454002)(106466001)(77156002)(65956001)(105586002)(64706001)(50466002)(47776003)(33656002)(4001540100001)(86362001)(46102003)(65806001)(65816999)(92566002)(54356999)(76176999)(87266999)(36756003)(5001920100001)(5001860100001)(83506001)(59896002)(5001830100001)(120886001)(101416001)(4001350100001)(2950100001)(80316001)(68736005)(97736004)(50986999)(62966003)(77096005)(189998001)(23676002)(110136002)(87936001)(64126003);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR02MB065;H:atltwp01.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB065; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520003)(3002001);SRVR:BLUPR02MB065;BCL:0;PCL:0;RULEID:;SRVR:BLUPR02MB065; X-Forefront-PRVS: 059185FE08 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2015 18:29:28.2154 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR02MB065 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/2015 10:38 AM, Borislav Petkov wrote: > > This one needs to be split in two - the second one adding the readme file... Ack. >> +static ssize_t >> +inj_readme_read(struct file *filp, char __user *ubuf, >> + size_t cnt, loff_t *ppos) >> +{ >> + return simple_read_from_buffer(ubuf, cnt, ppos, >> + readme_msg, strlen(readme_msg)); >> +} >> + >> +static const struct file_operations readme_fops = { >> + .read = inj_readme_read, >> +}; >> + >> static struct dfs_node { >> char *name; >> struct dentry *d; >> const struct file_operations *fops; >> + umode_t perm; >> } dfs_fls[] = { >> - { .name = "status", .fops = &status_fops }, >> - { .name = "misc", .fops = &misc_fops }, >> - { .name = "addr", .fops = &addr_fops }, >> - { .name = "bank", .fops = &bank_fops }, >> - { .name = "flags", .fops = &flags_fops }, >> - { .name = "cpu", .fops = &extcpu_fops }, >> + { .name = "status", .fops = &status_fops, S_IRUSR | S_IWUSR }, >> + { .name = "misc", .fops = &misc_fops, S_IRUSR | S_IWUSR }, >> + { .name = "addr", .fops = &addr_fops, S_IRUSR | S_IWUSR }, >> + { .name = "bank", .fops = &bank_fops, S_IRUSR | S_IWUSR }, >> + { .name = "flags", .fops = &flags_fops, S_IRUSR | S_IWUSR }, >> + { .name = "cpu", .fops = &extcpu_fops, S_IRUSR | S_IWUSR }, >> + { .name = "README", .fops = &readme_fops, S_IRUSR | S_IRGRP | >> + S_IROTH }, > ... and the first one adding perm to struct dfs_node. > Will do. Thanks, -Aravind.