linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Song Liu <song@kernel.org>
Cc: bpf <bpf@vger.kernel.org>,
	LSM List <linux-security-module@vger.kernel.org>,
	 Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
	fsverity@lists.linux.dev,  Eric Biggers <ebiggers@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	 Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	 Martin KaFai Lau <martin.lau@linux.dev>,
	Christian Brauner <brauner@kernel.org>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	Casey Schaufler <casey@schaufler-ca.com>,
	 Amir Goldstein <amir73il@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	 Roberto Sassu <roberto.sassu@huawei.com>,
	Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH v14 bpf-next 6/6] selftests/bpf: Add test that uses fsverity and xattr to sign a file
Date: Tue, 28 Nov 2023 22:47:31 -0800	[thread overview]
Message-ID: <CAADnVQJb3Ur--A8jaiVqpea1kFXMCd46uP+X4ydcOVG3a5Ve3Q@mail.gmail.com> (raw)
In-Reply-To: <20231129003656.1165061-7-song@kernel.org>

On Tue, Nov 28, 2023 at 4:37 PM Song Liu <song@kernel.org> wrote:
> +char digest[MAGIC_SIZE + sizeof(struct fsverity_digest) + SHA256_DIGEST_SIZE];

when vmlinux is built without CONFIG_FS_VERITY the above fails
in a weird way:
  CLNG-BPF [test_maps] test_sig_in_xattr.bpf.o
progs/test_sig_in_xattr.c:36:26: error: invalid application of
'sizeof' to an incomplete type 'struct fsverity_digest'
   36 | char digest[MAGIC_SIZE + sizeof(struct fsverity_digest) +
SHA256_DIGEST_SIZE];
      |                          ^     ~~~~~~~~~~~~~~~~~~~~~~~~

Is there a way to somehow print a hint during the build what
configs users need to enable to pass the build ?

  reply	other threads:[~2023-11-29  6:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  0:36 [PATCH v14 bpf-next 0/6] bpf: File verification with LSM and fsverity Song Liu
2023-11-29  0:36 ` [PATCH v14 bpf-next 1/6] bpf: Add kfunc bpf_get_file_xattr Song Liu
2023-11-29 16:06   ` KP Singh
2023-11-29  0:36 ` [PATCH v14 bpf-next 2/6] bpf, fsverity: Add kfunc bpf_get_fsverity_digest Song Liu
2023-11-29  0:36 ` [PATCH v14 bpf-next 3/6] Documentation/bpf: Add documentation for filesystem kfuncs Song Liu
2023-11-29  0:36 ` [PATCH v14 bpf-next 4/6] selftests/bpf: Sort config in alphabetic order Song Liu
2023-11-29  0:36 ` [PATCH v14 bpf-next 5/6] selftests/bpf: Add tests for filesystem kfuncs Song Liu
2023-11-29  0:36 ` [PATCH v14 bpf-next 6/6] selftests/bpf: Add test that uses fsverity and xattr to sign a file Song Liu
2023-11-29  6:47   ` Alexei Starovoitov [this message]
2023-11-29 11:20     ` Song Liu
2023-11-29 14:55       ` Alexei Starovoitov
2023-11-29 17:13         ` Song Liu
2023-11-29 17:58           ` Song Liu
2023-11-30  4:02   ` kernel test robot

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=CAADnVQJb3Ur--A8jaiVqpea1kFXMCd46uP+X4ydcOVG3a5Ve3Q@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=amir73il@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=daniel@iogearbox.net \
    --cc=ebiggers@kernel.org \
    --cc=fsverity@lists.linux.dev \
    --cc=kernel-team@meta.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=roberto.sassu@huawei.com \
    --cc=song@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).