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: <50f15e81-e2f6-e63f-dbbb-072737a51e54@linux.intel.com>
Date:   Sat, 19 Nov 2022 06:23:55 -0800
From:   Andi Kleen <ak@...ux.intel.com>
To:     Jeff Layton <jlayton@...nel.org>
Cc:     chuck.lever@...cle.com, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add process name to locks warning


On 11/18/2022 6:06 PM, Jeff Layton wrote:
> On Fri, 2022-11-18 at 15:43 -0800, Andi Kleen wrote:
>> It's fairly useless to complain about using an obsolete feature without
>> telling the user which process used it. My Fedora desktop randomly drops
>> this message, but I would really need this patch to figure out what
>> triggers is.
>>
> Interesting. The only program I know of that tried to use these was
> samba, but we patched that out a few years ago (about the time this
> patch went in). Are you running an older version of samba?


Yes it's running samba, whatever is in Fedora 35. Don't know if that 
counts as an

older version.


>
>> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
>> ---
>>   fs/locks.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/locks.c b/fs/locks.c
>> index 607f94a0e789..2e45232dbeb1 100644
>> --- a/fs/locks.c
>> +++ b/fs/locks.c
>> @@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
>>   	 * throw a warning to let people know that they don't actually work.
>>   	 */
>>   	if (cmd & LOCK_MAND) {
>> -		pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n");
>> +		pr_warn_once("%s: Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm);
>>   		return 0;
>>   	}
>>   
> Looks reasonable. Would it help to print the pid or tgid as well?

It wouldn't help me because at that time I see it it's likely long gone. 
Just need the name.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ