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]
Date:   Thu, 9 Feb 2023 13:26:35 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     "Starke, Daniel" <daniel.starke@...mens.com>
Cc:     "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "jirislaby@...nel.org" <jirislaby@...nel.org>,
        "ilpo.jarvinen@...ux.intel.com" <ilpo.jarvinen@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/4] tty: n_gsm: add keep alive support

On Thu, Feb 09, 2023 at 12:09:04PM +0000, Starke, Daniel wrote:
> > > +	if (gsm->ka_num && gsm->ka_retries == 0) {
> > > +		/* Keep-alive expired -> close the link */
> > > +		if (debug & DBG_ERRORS)
> > > +			pr_info("%s keep-alive timed out\n", __func__);
> > 
> > info for a debugging error?  no, please don't do that.  Please fix up
> > the debugging mess in this driver, don't add to it.
> 
> I am aware that the current debugging concept of the driver does not align
> with the kernel philosophy. However, this is the established way it is
> handled in n_gsm right now. Cleaning this up should be done before adding
> new concepts here. But not printing out any information in case of errors
> does not help during use and development of/for this driver. Also note that
> all these outputs are only enabled if explicitly set via kernel module
> parameter. That means syslog does not get polluted if not intentionally
> set so. Unfortunately, I do not have a better proposal for now as neither
> ftrace nor dynamic debug are available to the normal Linux user.

dynamic debug _is_ availble to the normal Linux user, and it's _the_
kernel debug facility and interface.  To not use it is to somehow state
that this one tiny .c file is unique and special over the whole of the
rest of the kernel :)

I recommend just moving to the dynamic debug interface now and then
going forward, it's not going to be an issue at all.

> > > +struct gsm_config_ext {
> > > +	__u32 keep_alive;	/* Control channel keep-alive in 1/100th of a
> > > +				 * second (0 to disable)
> > > +				 */
> > > +	__u32 reserved[7];	/* For future use */
> > 
> > say "must be set to 0"?
> 
> Right, I will add ", needs to be initialized to zero".

Use "must", that means more.

> > Where are you documenting this ioctl so userspace knows how to use it?
> > Where is the userspace tool that uses it?
> 
> I will extend the description and code example in
> Documentation/driver-api/tty/n_gsm.rst. Should this go CC to
> linux-man@...r.kernel.org?

I don't know, if there is a man page for it, yes, if not, no need.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ