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:   Tue, 21 Nov 2023 15:41:16 +0100
From:   Jan Kara <jack@...e.cz>
To:     "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc:     gregkh@...uxfoundation.org, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jan Kara <jack@...e.com>
Subject: Re: [PATCH 01/17] tty: deprecate tty_write_message()

On Tue 21-11-23 10:22:42, Jiri Slaby (SUSE) wrote:
> tty_write_message() has only one user: quotas. In particular, there the
> use depends on CONFIG_PRINT_QUOTA_WARNING. And that is deprecated and
> marked as BROKEN already too.
> 
> So make tty_write_message() dependent on that very config option. This
> action in fact drops tty_write_message() from the vmlinux binary. Good
> riddance.
> 
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
> Cc: Jan Kara <jack@...e.com>

Sure, that was indeed a hack. Feel free to add:

Acked-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  drivers/tty/tty_io.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
> index 06414e43e0b5..ee5a90f9adb5 100644
> --- a/drivers/tty/tty_io.c
> +++ b/drivers/tty/tty_io.c
> @@ -1047,6 +1047,7 @@ static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
>  	return ret;
>  }
>  
> +#ifdef CONFIG_PRINT_QUOTA_WARNING
>  /**
>   * tty_write_message - write a message to a certain tty, not just the console.
>   * @tty: the destination tty_struct
> @@ -1057,6 +1058,8 @@ static ssize_t iterate_tty_write(struct tty_ldisc *ld, struct tty_struct *tty,
>   * needed.
>   *
>   * We must still hold the BTM and test the CLOSING flag for the moment.
> + *
> + * This function is DEPRECATED, do not use in new code.
>   */
>  void tty_write_message(struct tty_struct *tty, char *msg)
>  {
> @@ -1069,6 +1072,7 @@ void tty_write_message(struct tty_struct *tty, char *msg)
>  		tty_write_unlock(tty);
>  	}
>  }
> +#endif
>  
>  static ssize_t file_tty_write(struct file *file, struct kiocb *iocb, struct iov_iter *from)
>  {
> -- 
> 2.42.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ