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: <CAM0EoMnnt98Go3px0YD3-WyX7gdkY17bcG8jpTYbjPMRtK7tCg@mail.gmail.com>
Date: Sat, 9 Nov 2024 07:54:08 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, Simon Horman <horms@...nel.org>, xiyou.wangcong@...il.com, 
	jiri@...nulli.us
Subject: Re: [PATCH net-next v2] net: sched: cls_api: improve the error
 message for ID allocation failure

On Thu, Nov 7, 2024 at 8:02 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> We run into an exhaustion problem with the kernel-allocated filter IDs.
> Our allocation problem can be fixed on the user space side,
> but the error message in this case was quite misleading:
>
>   "Filter with specified priority/protocol not found" (EINVAL)
>
> Specifically when we can't allocate a _new_ ID because filter with
> lowest ID already _exists_, saying "filter not found", is confusing.
>
> Kernel allocates IDs in range of 0xc0000 -> 0x8000, giving out ID one
> lower than lowest existing in that range. The error message makes sense
> when tcf_chain_tp_find() gets called for GET and DEL but for NEW we
> need to provide more specific error messages for all three cases:
>
>  - user wants the ID to be auto-allocated but filter with ID 0x8000
>    already exists
>
>  - filter already exists and can be replaced, but user asked
>    for a protocol change
>
>  - filter doesn't exist
>
> Caller of tcf_chain_tp_insert_unique() doesn't set extack today,
> so don't bother plumbing it in.
>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>

Acked-by: Jamal Hadi Salim <jhs@...atatu.com>

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ