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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 Aug 2022 07:12:12 -0700
From:   Richard Cochran <richardcochran@...il.com>
To:     Csókás Bence <csokas.bence@...lan.hu>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH] fec: Allow changing the PPS channel

On Mon, Aug 08, 2022 at 03:15:57PM +0200, Csókás Bence wrote:
> +static ssize_t pps_ch_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count)
> +{
> +	struct device *dev = container_of(kobj, struct device, kobj);
> +	struct net_device *ndev = to_net_dev(dev);
> +	struct fec_enet_private *fep = netdev_priv(ndev);
> +	int enable = fep->pps_enable;
> +	struct ptp_clock_request ptp_rq = { .type = PTP_CLK_REQ_PPS };
> +
> +	if (enable)
> +		fep->ptp_caps.enable(&fep->ptp_caps, &ptp_rq, 0);
> +
> +	kstrtoint(buf, 0, &fep->pps_channel);
> +
> +	if (enable)
> +		fep->ptp_caps.enable(&fep->ptp_caps, &ptp_rq, 1);

NAK.

Don't use a private, custom sysfs knob.  The core PTP layer provides
an API for that already.

Thanks,
Richard

> +
> +	return count;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ