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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 29 Apr 2023 19:43:47 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        syzbot <syzbot+b7c3ba8cdc2f6cf83c21@...kaller.appspotmail.com>,
        linux-kernel@...r.kernel.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] tty: tty_io: remove hung_up_tty_fops

On 2023/04/29 2:11, Al Viro wrote:
> On Sat, Apr 29, 2023 at 01:41:02AM +0900, Tetsuo Handa wrote:
>> On 2023/04/29 1:27, Nathan Chancellor wrote:
>>> I see this change has shown up in -next as commit 4c87e9e5479b ("tty:
>>> tty_io: remove hung_up_tty_fops"), where it causes the following warning
>>> for configurations without CONFIG_COMPAT (I used ARCH=arm defconfig):
>>>
>>>   drivers/tty/tty_io.c:446:13: warning: 'hung_up_tty_compat_ioctl' defined but not used [-Wunused-function]
>>>     446 | static long hung_up_tty_compat_ioctl(struct file *file,
>>>         |             ^~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>> I am not sure if you just added that patch for additional test coverage
>>> or for final acceptance but the following diff resolves this warning for
>>> me, perhaps it can be folded in for a v2?
>>
>> Thank you for reporting. Yes, moving the definition will solve the warning.
> 
> 	IDGI...  Why do you need to keep that function at all?  Compare it
> with hung_up_tty_ioctl() - they are token-for-token identical; the only
> difference is the function name...

Indeed hung_up_tty_ioctl() and hung_up_tty_compat_ioctl() are identical.
We can remove hung_up_tty_compat_ioctl() if we don't consider

 	ld = tty_ldisc_ref_wait(tty);
 	if (!ld)
-		return hung_up_tty_compat_ioctl(file, cmd, arg);
+		return hung_up_tty_ioctl(file, cmd, arg);
 	if (ld->ops->compat_ioctl)
 		retval = ld->ops->compat_ioctl(tty, cmd, arg);

at tty_compat_ioctl() as strange looking.

Maybe adding "inline" keyword to hung_up_tty_*() definitions
because hung_up_tty_fops is removed?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ