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: <b01f7a4a-733c-4f38-a29e-893dc15fc79d@linux.dev>
Date: Tue, 20 Aug 2024 16:45:42 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Jakub Kicinski <kuba@...nel.org>,
 Jonathan Lemon <jonathan.lemon@...il.com>, Jiri Slaby
 <jirislaby@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Simon Horman <horms@...nel.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net v4 1/2] ptp: ocp: adjust sysfs entries to expose tty
 information

On 20/08/2024 16:16, Vadim Fedorenko wrote:
> Starting v6.8 the serial port subsystem changed the hierarchy of devices
> and symlinks are not working anymore. Previous discussion made it clear
> that the idea of symlinks for tty devices was wrong by design [1].
> Implement additional attributes to expose the information. Fixes tag
> points to the commit which introduced the change.
> 
> [1] https://lore.kernel.org/netdev/2024060503-subsonic-pupil-bbee@gregkh/
> 
> Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device")
> Signed-off-by: Vadim Fedorenko <vadfed@...a.com>
> ---
> v3 -> v4:
> - re-organize info printing to use ptp_ocp_tty_port_name()
> - keep uintptr_t to be consistent with other code
> v2 -> v3:
> - replace serial ports definitions with array and enum for index
> - replace pointer math with direct array access
> - nit in documentation spelling
> v1 -> v2:
> - add Documentation/ABI changes
> ---
>   drivers/ptp/ptp_ocp.c | 168 +++++++++++++++++++++++++-----------------
>   1 file changed, 102 insertions(+), 66 deletions(-)
> 
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index ee2ced88ab34..11d96045e5ec 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c

[ .. snip .. ]

> @@ -3346,6 +3361,54 @@ static EXT_ATTR_RO(freq, frequency, 1);
>   static EXT_ATTR_RO(freq, frequency, 2);
>   static EXT_ATTR_RO(freq, frequency, 3);
>   
> +static ssize_t
> +ptp_ocp_tty_show(struct device *dev, struct device_attribute *attr, char *buf)
> +{
> +	struct dev_ext_attribute *ea = to_ext_attr(attr);
> +	struct ptp_ocp *bp = dev_get_drvdata(dev);
> +	struct ptp_ocp_serial_port *port;

looks like this fix didn't get to the series for some reasons.
I'll definitely send v5 with this part removed, but other code
is good to review

> +
> +	return sysfs_emit(buf, "ttyS%d", bp->port[(uintptr_t)ea->var].line);
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ