mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

This patch adds test cases for zero offset (implicit cast) or non-zero offset pointer as KF_ACQUIRE kfuncs argument. Currently KF_ACQUIRE kfuncs should support passing in pointers like &sk->sk_write_queue (non-zero offset) or &sk->__sk_common (zero offset) and not be rejected by the verifier. Signed-off-by: Juntong Deng <juntong.deng@outlook.com> Link: https://lore.kernel.org/r/AM6PR03MB5848CB6F0D4D9068669A905B99952@AM6PR03MB5848.eurprd03.prod.outlook.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
16 lines
388 B
C
16 lines
388 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright (c) 2023 Meta Platforms, Inc. and affiliates. */
|
|
|
|
#include <test_progs.h>
|
|
#include "nested_trust_failure.skel.h"
|
|
#include "nested_trust_success.skel.h"
|
|
#include "nested_acquire.skel.h"
|
|
|
|
void test_nested_trust(void)
|
|
{
|
|
RUN_TESTS(nested_trust_success);
|
|
RUN_TESTS(nested_trust_failure);
|
|
|
|
if (env.has_testmod)
|
|
RUN_TESTS(nested_acquire);
|
|
}
|