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: <8e9a5b58-e975-4d6b-81fd-da5e0139a552@linux.dev>
Date: Thu, 15 Aug 2024 15:05:28 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Simon Horman <horms@...nel.org>, Vadim Fedorenko <vadfed@...a.com>
Cc: Jakub Kicinski <kuba@...nel.org>,
 Jonathan Lemon <jonathan.lemon@...il.com>, Jiri Slaby
 <jirislaby@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 netdev@...r.kernel.org
Subject: Re: [PATCH net v3 1/2] ptp: ocp: adjust sysfs entries to expose tty
 information

On 15/08/2024 14:54, Simon Horman wrote:
> On Thu, Aug 15, 2024 at 05:59:04AM -0700, 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. Implement
>> additional attributes to expose the information. Fixes tag points to the
>> commit which introduced the change.
> 
> Hi Vadim,
> 
> Would it be possible to provide a link to the discussion(s)?
> 

Hi Simon,

Yeah, sure:
the initial RFC of serial port subsystem changes is
https://lore.kernel.org/linux-serial/20231024113624.54364-1-tony@atomide.com/

the merged version is (serial port subsystem):
https://lore.kernel.org/linux-serial/20231113080758.30346-1-tony@atomide.com/

The first update to ptp_ocp driver is
https://lore.kernel.org/linux-serial/20240510110405.15115-1-vadim.fedorenko@linux.dev/

>>
>> Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device")
>> Signed-off-by: Vadim Fedorenko <vadfed@...a.com>
> 
> ...
> 
>> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> 
> ...
> 
>> @@ -3346,6 +3352,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;
> 
> nit: Port is unused in this function, it should be removed.

Ah, yeah, it was last second change, didn't clean it fully,
thanks for pointing.

> 
>> +
>> +	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