linux-sg2042/include
Maciej Żenczykowski 82f31ebf61 net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port)
Note that the sysctl write accessor functions guarantee that:
  net->ipv4.sysctl_ip_prot_sock <= net->ipv4.ip_local_ports.range[0]
invariant is maintained, and as such the max() in selinux hooks is actually spurious.

ie. even though
  if (snum < max(inet_prot_sock(sock_net(sk)), low) || snum > high) {
per logic is the same as
  if ((snum < inet_prot_sock(sock_net(sk)) && snum < low) || snum > high) {
it is actually functionally equivalent to:
  if (snum < low || snum > high) {
which is equivalent to:
  if (snum < inet_prot_sock(sock_net(sk)) || snum < low || snum > high) {
even though the first clause is spurious.

But we want to hold on to it in case we ever want to change what what
inet_port_requires_bind_service() means (for example by changing
it from a, by default, [0..1024) range to some sort of set).

Test: builds, git 'grep inet_prot_sock' finds no other references
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-26 13:20:46 -08:00
..
acpi cpufreq: Use per-policy frequency QoS 2019-10-21 02:05:21 +02:00
asm-generic arm64 updates for 5.5: 2019-11-25 15:39:19 -08:00
clocksource
crypto crypto: ablkcipher - remove deprecated and unused ablkcipher support 2019-11-17 09:02:49 +08:00
drm The main MIPS changes for 5.5: 2019-11-25 17:42:56 -08:00
dt-bindings regulator: Updates for v5.5 2019-11-25 21:11:55 -08:00
keys KEYS: trusted: Move TPM2 trusted keys code 2019-11-12 21:45:37 +02:00
kunit kunit: fix failure to build without printk 2019-09-30 17:35:01 -06:00
kvm Merge remote-tracking branch 'kvmarm/misc-5.5' into kvmarm/next 2019-11-08 11:27:29 +00:00
linux Some small fixes accumulated for IPMI, nothing major. 2019-11-25 21:41:48 -08:00
math-emu
media
misc
net net: port < inet_prot_sock(net) --> inet_port_requires_bind_service(net, port) 2019-11-26 13:20:46 -08:00
pcmcia
ras
rdma RDMA/uverbs: Prevent potential underflow 2019-10-22 15:05:36 -03:00
scsi SCSI fixes on 20191101 2019-11-07 06:43:18 -07:00
soc net: mscc: ocelot: convert to use ocelot_port_add_txtstamp_skb() 2019-11-21 14:39:02 -08:00
sound ASoC: Fixes for v5.4 2019-10-21 14:05:26 +02:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-11-25 20:02:57 -08:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-11-25 20:02:57 -08:00
vdso
video
xen xen/mcelog: add PPIN to record when available 2019-11-14 10:01:57 +01:00
Kbuild ARM: 2019-11-25 18:02:36 -08:00