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: <ZiFq9EmbGZ3psdho@f4>
Date: Thu, 18 Apr 2024 14:48:20 -0400
From: Benjamin Poirier <benjamin.poirier@...il.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, kuba@...nel.org, pabeni@...hat.com,
	davem@...emloft.net, edumazet@...gle.com, parav@...dia.com,
	mst@...hat.com, jasowang@...hat.com, xuanzhuo@...ux.alibaba.com,
	shuah@...nel.org, petrm@...dia.com, liuhangbin@...il.com,
	vladimir.oltean@....com, idosch@...dia.com,
	virtualization@...ts.linux.dev
Subject: Re: [patch net-next v4 2/6] selftests: forwarding: move initial root
 check to the beginning

On 2024-04-18 18:08 +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
> 
> This check can be done at the very beginning of the script.
> As the follow up patch needs to add early code that needs to be executed
> after the check, move it.
> 
> Signed-off-by: Jiri Pirko <jiri@...dia.com>
> ---
> v3->v4:
> - removed NUM_NETIFS mode, rephrased the patch subject and description
>   accordingly
> ---
>  tools/testing/selftests/net/forwarding/lib.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> index 7913c6ee418d..b63a5866ce97 100644
> --- a/tools/testing/selftests/net/forwarding/lib.sh
> +++ b/tools/testing/selftests/net/forwarding/lib.sh
> @@ -84,6 +84,11 @@ declare -A NETIFS=(
>  # e.g. a low-power board.
>  : "${KSFT_MACHINE_SLOW:=no}"
>  
> +if [[ "$(id -u)" -ne 0 ]]; then
> +	echo "SKIP: need root privileges"
> +	exit $ksft_skip
> +fi
> +

There's a small problem here. ksft_skip is defined in net/lib.sh which
hasn't yet been imported at this point.

Also, on my system at least, the code in the next patch can run
successfully as an unprivileged user. So what is this patch needed for
exactly?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ