netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: Mikhail Ivanov <ivanov.mikhail1@huawei-partners.com>
Cc: willemdebruijn.kernel@gmail.com, gnoack3000@gmail.com,
	 linux-security-module@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org,  yusongping@huawei.com,
	artem.kuzin@huawei.com, konstantin.meskhidze@huawei.com
Subject: Re: [RFC PATCH v1 7/9] selftests/landlock: Test listen on ULP socket without clone method
Date: Thu, 1 Aug 2024 17:08:53 +0200	[thread overview]
Message-ID: <20240801.rae2can8ooT9@digikod.net> (raw)
In-Reply-To: <20240728002602.3198398-8-ivanov.mikhail1@huawei-partners.com>

On Sun, Jul 28, 2024 at 08:26:00AM +0800, Mikhail Ivanov wrote:
> Test checks that listen(2) doesn't wrongfully return -EACCES instead of
> -EINVAL when trying to listen on a socket which is set to ULP that doesn't
> have clone method in inet_csk(sk)->icsk_ulp_ops (espintcp).
> 
> Signed-off-by: Mikhail Ivanov <ivanov.mikhail1@huawei-partners.com>
> ---
>  tools/testing/selftests/landlock/config     |  1 +
>  tools/testing/selftests/landlock/net_test.c | 38 +++++++++++++++++++++
>  2 files changed, 39 insertions(+)
> 
> diff --git a/tools/testing/selftests/landlock/config b/tools/testing/selftests/landlock/config
> index 0086efaa7b68..014401fe6114 100644
> --- a/tools/testing/selftests/landlock/config
> +++ b/tools/testing/selftests/landlock/config
> @@ -12,3 +12,4 @@ CONFIG_SHMEM=y
>  CONFIG_SYSFS=y
>  CONFIG_TMPFS=y
>  CONFIG_TMPFS_XATTR=y
> +CONFIG_INET_ESPINTCP=y
> \ No newline at end of file

There are missing dependencies, and also please sort entries. I think it should
be:

 CONFIG_CGROUPS=y
 CONFIG_CGROUP_SCHED=y
 CONFIG_INET=y
+CONFIG_INET_ESPINTCP=y
+CONFIG_INET_ESP=y
 CONFIG_IPV6=y
+CONFIG_IPV6_ESP=y
+CONFIG_INET6_ESPINTCP=y
 CONFIG_NET=y
 CONFIG_NET_NS=y
 CONFIG_OVERLAY_FS=y

This works with check-linux.sh from
https://github.com/landlock-lsm/landlock-test-tools

IPv6 is currently not tested, which should be the case (with the "protocol"
variants).

  reply	other threads:[~2024-08-01 15:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-28  0:25 [RFC PATCH v1 0/9] Support TCP listen access-control Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 1/9] landlock: Refactor current_check_access_socket() access right check Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 2/9] landlock: Support TCP listen access-control Mikhail Ivanov
2024-07-30  8:24   ` Günther Noack
2024-07-31 17:20     ` Mikhail Ivanov
2024-08-01 10:36       ` Günther Noack
2024-08-01 11:45         ` Mikhail Ivanov
2024-07-31 18:30   ` Mickaël Salaün
2024-08-01  7:52     ` Mikhail Ivanov
2024-08-01 14:45       ` Mickaël Salaün
2024-08-01 15:34         ` Mikhail Ivanov
2024-08-01 16:01           ` Mickaël Salaün
2024-08-01 16:07             ` Mikhail Ivanov
2024-08-01 14:45   ` Mickaël Salaün
2024-08-01 16:04     ` Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 3/9] selftests/landlock: Support LANDLOCK_ACCESS_NET_LISTEN_TCP Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 4/9] selftests/landlock: Test listening restriction Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 5/9] selftests/landlock: Test listen on connected socket Mikhail Ivanov
2024-08-01 14:46   ` Mickaël Salaün
2024-08-01 15:47     ` Mikhail Ivanov
2024-07-28  0:25 ` [RFC PATCH v1 6/9] selftests/landlock: Test listening without explicit bind restriction Mikhail Ivanov
2024-07-28  0:26 ` [RFC PATCH v1 7/9] selftests/landlock: Test listen on ULP socket without clone method Mikhail Ivanov
2024-08-01 15:08   ` Mickaël Salaün [this message]
2024-08-01 17:42     ` Mikhail Ivanov
2024-07-28  0:26 ` [RFC PATCH v1 8/9] selftests/landlock: Test changing socket backlog with listen(2) Mikhail Ivanov
2024-07-28  0:26 ` [RFC PATCH v1 9/9] samples/landlock: Support LANDLOCK_ACCESS_NET_LISTEN Mikhail Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240801.rae2can8ooT9@digikod.net \
    --to=mic@digikod.net \
    --cc=artem.kuzin@huawei.com \
    --cc=gnoack3000@gmail.com \
    --cc=ivanov.mikhail1@huawei-partners.com \
    --cc=konstantin.meskhidze@huawei.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=yusongping@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).