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-next>] [day] [month] [year] [list]
Date: Tue, 19 Mar 2024 17:49:19 -0500
From: Zijie Zhao <zzjas98@...il.com>
To: horms@...ge.net.au, ja@....bg, davem@...emloft.net, dsahern@...nel.org,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: netdev@...r.kernel.org, lvs-devel@...r.kernel.org, chenyuan0y@...il.com
Subject: [net] Question about ipvs->sysctl_sync_threshold and READ_ONCE

Dear IPVS maintainers,

We encountered an unusual usage of sysctl parameter while analyzing 
kernel source code.


In include/net/ip_vs.h, line 1062 - 1070:

```
static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)
{
	return ipvs->sysctl_sync_threshold[0];
}

static inline int sysctl_sync_period(struct netns_ipvs *ipvs)
{
	return READ_ONCE(ipvs->sysctl_sync_threshold[1]);
}
```

Here, sysctl_sync_threshold[1] is accessed behind `READ_ONCE`, but 
sysctl_sync_threshold[0] is not. Should sysctl_sync_threshold[0] also be 
guarded by `READ_ONCE`?

Please kindly let us know if we missed any key information and this is 
actually intended. We appreciate your information and time! Thanks!


Links to the code:
https://elixir.bootlin.com/linux/v6.8.1/source/include/net/ip_vs.h#L1064
https://elixir.bootlin.com/linux/v6.8.1/source/include/net/ip_vs.h#L1069

Best,
Zijie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ