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]
Message-ID: <20220831145439.2f268c34@kernel.org>
Date:   Wed, 31 Aug 2022 14:54:39 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>
Cc:     davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com,
        Michal Michalik <michal.michalik@...el.com>,
        netdev@...r.kernel.org, richardcochran@...il.com,
        Gurucharan <gurucharanx.g@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Johan Hovold <johan@...nel.org>
Subject: Re: [PATCH net 3/3] ice: Add set_termios tty operations handle to
 GNSS

On Mon, 29 Aug 2022 15:00:49 -0700 Tony Nguyen wrote:
> From: Michal Michalik <michal.michalik@...el.com>
> 
> Some third party tools (ex. ubxtool) try to change GNSS TTY parameters
> (ex. speed). While being optional implementation, without set_termios
> handle this operation fails and prevents those third party tools from
> working. TTY interface in ice driver is virtual and doesn't need any change
> on set_termios, so is left empty. Add this mock to support all Linux TTY
> APIs.
> 
> Fixes: 43113ff73453 ("ice: add TTY for GNSS module for E810T device")
> Signed-off-by: Michal Michalik <michal.michalik@...el.com>
> Tested-by: Gurucharan <gurucharanx.g@...el.com> (A Contingent worker at Intel)
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>

Please CC GNSS and TTY maintainers on the patches relating to 
the TTY/GNSS channel going forward.

CC: Greg, Jiri, Johan

We'll pull in a day or two if there are no objections.

> diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c
> index b5a7f246d230..c2dc5e5c8fa4 100644
> --- a/drivers/net/ethernet/intel/ice/ice_gnss.c
> +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c
> @@ -404,11 +404,26 @@ static unsigned int ice_gnss_tty_write_room(struct tty_struct *tty)
>  	return ICE_GNSS_TTY_WRITE_BUF;
>  }
>  
> +/**
> + * ice_gnss_tty_set_termios - mock for set_termios tty operations
> + * @tty: pointer to the tty_struct
> + * @new_termios: pointer to the new termios parameters
> + */
> +static void
> +ice_gnss_tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
> +{
> +	/* Some 3rd party tools (ex. ubxtool) want to change the TTY parameters.
> +	 * In our virtual interface (I2C communication over FW AQ) we don't have
> +	 * to change anything, but we need to implement it to unblock tools.
> +	 */
> +}
> +
>  static const struct tty_operations tty_gps_ops = {
>  	.open =		ice_gnss_tty_open,
>  	.close =	ice_gnss_tty_close,
>  	.write =	ice_gnss_tty_write,
>  	.write_room =	ice_gnss_tty_write_room,
> +	.set_termios =  ice_gnss_tty_set_termios,
>  };
>  
>  /**

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ