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: <20250804102432.lv7pfistwfbql64q@skbuf>
Date: Mon, 4 Aug 2025 13:24:32 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, linux@...linux.org.uk,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, richardcochran@...il.com,
	viro@...iv.linux.org.uk, quentin.schulz@...tlin.com,
	atenart@...nel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] phy: mscc: Fix timestamping for vsc8584

On Mon, Aug 04, 2025 at 09:39:40AM +0200, Horatiu Vultur wrote:
> I think it is a great idea. I can map struct vsc8531_skb directly on
> skb->cb and then drop the allocation.

Ok.

Another set of suggestions on the patch, all regarding list processing:

1 - shouldn't you use list_add_tail() rather than list_add() towards
    &vsc8531->rx_skbs_list? I am concerned that with multiple RX
    timestampable skbs in flight, you would be processing them in
    "stack" rather than "queue" order, effectively reordering them.

2 - you can use list_move_tail() to move an item from a list to another,
    or you can just call list_splice_tail_init() to move the entire
    contents of &priv->rx_skbs_list onto a separate on-stack list from
    which you later dequeue, and at the same time reinitialize
    &priv->rx_skbs_list to an empty queue. If you do that, you can
    shorten the atomic section with &priv->rx_skbs_lock, to just around
    the list_splice_tail_init() call.

3 - the following:

	struct list_head skbs;

	INIT_LIST_HEAD(&skbs);

can be simplified to:

	LIST_HEAD(skbs);

which combines initialization and declaration.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ