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]
Date:   Mon, 7 Mar 2022 07:38:26 +0000
From:   <Divya.Koppera@...rochip.com>
To:     <kurt@...utronix.de>, <richardcochran@...il.com>,
        <davem@...emloft.net>, <kuba@...nel.org>
CC:     <andrew@...n.ch>, <hkallweit1@...il.com>, <linux@...linux.org.uk>,
        <yhs@...com>, <daniel@...earbox.net>, <andrii@...nel.org>,
        <Horatiu.Vultur@...rochip.com>, <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next 3/3] micrel: Use generic ptp_msg_is_sync()
 function

> -----Original Message-----
> From: Kurt Kanzenbach <kurt@...utronix.de>
> Sent: Saturday, March 5, 2022 4:51 PM
> To: Richard Cochran <richardcochran@...il.com>; David S. Miller
> <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>
> Cc: Andrew Lunn <andrew@...n.ch>; Heiner Kallweit
> <hkallweit1@...il.com>; Russell King <linux@...linux.org.uk>; Yonghong
> Song <yhs@...com>; Daniel Borkmann <daniel@...earbox.net>; Andrii
> Nakryiko <andrii@...nel.org>; Divya Koppera - I30481
> <Divya.Koppera@...rochip.com>; Horatiu Vultur - M31836
> <Horatiu.Vultur@...rochip.com>; netdev@...r.kernel.org; Kurt Kanzenbach
> <kurt@...utronix.de>
> Subject: [PATCH net-next 3/3] micrel: Use generic ptp_msg_is_sync() function
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Use generic ptp_msg_is_sync() function to avoid code duplication.
> 
> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
> ---
>  drivers/net/phy/micrel.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index
> 81a76322254c..9e6b29b23935 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -1976,17 +1976,6 @@ static int lan8814_hwtstamp(struct
> mii_timestamper *mii_ts, struct ifreq *ifr)
>         return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ? -EFAULT : 0;  }
> 
> -static bool is_sync(struct sk_buff *skb, int type) -{
> -       struct ptp_header *hdr;
> -
> -       hdr = ptp_parse_header(skb, type);
> -       if (!hdr)
> -               return false;
> -
> -       return ((ptp_get_msgtype(hdr, type) & 0xf) == 0);
> -}
> -
>  static void lan8814_txtstamp(struct mii_timestamper *mii_ts,
>                              struct sk_buff *skb, int type)  { @@ -1994,7 +1983,7 @@ static
> void lan8814_txtstamp(struct mii_timestamper *mii_ts,
> 
>         switch (ptp_priv->hwts_tx_type) {
>         case HWTSTAMP_TX_ONESTEP_SYNC:
> -               if (is_sync(skb, type)) {
> +               if (ptp_msg_is_sync(skb, type)) {
>                         kfree_skb(skb);
>                         return;
>                 }
> --
> 2.30.2

For the patch:

Tested-and-reviewed-by: Divya Koppera <Divya.Koppera@...rochip.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ