lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f43d2530-3e21-6bf9-ef68-dae1bb7f173a@huawei.com>
Date:   Mon, 20 Jul 2020 10:18:58 +0800
From:   miaoqinglang <miaoqinglang@...wei.com>
To:     Thomas Gleixner <tglx@...utronix.de>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Marco Elver <elver@...gle.com>, Qian Cai <cai@....pw>,
        <linux-kernel@...r.kernel.org>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH -next] debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE



在 2020/7/18 4:26, Thomas Gleixner 写道:
> Qinglang Miao <miaoqinglang@...wei.com> writes:
>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>
>> Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
>> ---
>>   lib/debugobjects.c | 12 +-----------
>>   1 file changed, 1 insertion(+), 11 deletions(-)
>>
>> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
>> index 5d2bbfc55..916a5c492 100644
>> --- a/lib/debugobjects.c
>> +++ b/lib/debugobjects.c
>> @@ -1023,17 +1023,7 @@ static int debug_stats_show(struct seq_file *m, void *v)
>>   	return 0;
>>   }
>>   
>> -static int debug_stats_open(struct inode *inode, struct file *filp)
>> -{
>> -	return single_open(filp, debug_stats_show, NULL);
>> -}
>> -
>> -static const struct file_operations debug_stats_fops = {
>> -	.open		= debug_stats_open,
>> -	.read_iter		= seq_read_iter,
> 
> This does not apply against mainline, so I assume this malformatted
> thing comes from Christophs seq_read_iter changes in -next.
> 
> The seq_read_iter here makes no sense whatsoever if the same thing can
> be achieved by using
> 
>> +DEFINE_SHOW_ATTRIBUTE(debug_stats);
> 
> and fixing it at the generic level.
> 
> Thanks,
> 
>          tglx
> .
> 
Because the swicth from seq_read to seq_read_iter would rather be 
implemented in macro or coccinelle script as you mentioned in another 
mail, I can send a new patch against mainline instead if you don't mind.

Thanks.

Qinglang

.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ