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:   Sun, 2 Apr 2023 05:57:54 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        Maxim Georgiev <glipus@...il.com>,
        Horatiu Vultur <horatiu.vultur@...rochip.com>,
        Köry Maincent <kory.maincent@...tlin.com>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next 6/7] net: dsa: make dsa_port_supports_hwtstamp()
 construct a fake ifreq



On 4/2/2023 5:37 AM, Vladimir Oltean wrote:
> dsa_master_ioctl() is in the process of getting converted to a different
> API, where we won't have access to a struct ifreq * anymore, but rather,
> to a struct kernel_hwtstamp_config.
> 
> Since ds->ops->port_hwtstamp_get() still uses struct ifreq *, this
> creates a difficult situation where we have to make up such a dummy
> pointer.
> 
> The conversion is a bit messy, because it forces a "good" implementation
> of ds->ops->port_hwtstamp_get() to return -EFAULT in copy_to_user()
> because of the NULL ifr->ifr_data pointer. However, it works, and it is
> only a transient step until ds->ops->port_hwtstamp_get() gets converted
> to the new API which passes struct kernel_hwtstamp_config and does not
> call copy_to_user().
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ