From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04231317173 for ; Wed, 15 Jul 2026 07:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784100765; cv=none; b=I7E2/fE1uaEiEB+ALnd8K1B5Tcy5p+7PC1TBh4wrNSCT0csoufrq4cliUnPoFQmtiygi0KdlCR4dWWuemzJ9DwHr/DdXpkmRu01kmb97R8BoNnLdDglp9fUkuSZE/FHiCGFF35wnt4y26TaiAbH6wUwgv1D/OWw+tSuLfMPclh8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784100765; c=relaxed/simple; bh=L9CPXAJheqWNoyOUAcILUbOdgB7KPZUbQIcXWoChaNg=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pQjioQERQPED/BduZqOiRgEQrbLpmGVkZDS2OfHIL1aaIQgqIBK6rYeWS1/ttMNegxH6GtS2PcBwdurUDiosrCPhZx2tiaZUCbZLnxlxLoYQWJbQ8pX48b5r0RYJS7HD9hCK4bZywdK0MIJhNqM3Epr86Gh3RSPogFI1qxfFX1U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jbSnKBEI; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jbSnKBEI" Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-47dec32798aso5223088f8f.1 for ; Wed, 15 Jul 2026 00:32:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784100761; x=1784705561; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:date :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=P+W/6w2BHQvTPXAgvWknwKhqQxgDvHbPVAhqRj7X3rE=; b=jbSnKBEItn7XCZJmOc3OgjXbw0ifAQ45sX+VA0r4HWPCLolnVXlF7y75/KSgOQkIAe 8wF2XibpOb7fbtCt/lZkwN+EDQr073u4/TD3lAQvHP3wxHH+yvmQ6vAM87UH2QnFDnly ZoT9B3p/l1R1ZKdJQ8TmDzapU3iifczdpsIjUkbI0ADMSSTLKHq7XsXuYNTf1RuCL6dy eQhpiZKzAq81h2afzH0V67SAx4PduqFoEpdRb8+BC/JiVpHk2GO9tDrbG4lqxjONY16e k4SXpueHLYEoCyTzSndOPzTsSA1BOIlmkXMKInGlleqF6o9+txjsfK6Hk2g6RKureBhg zuYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784100761; x=1784705561; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:date :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=P+W/6w2BHQvTPXAgvWknwKhqQxgDvHbPVAhqRj7X3rE=; b=QNFnsi18WGZBABHRGPtXRpufznkBEq4F93aCgy5RzImunZMEjx4IDsvd9Lpuwi3vVW iyMq0rQiKf0Z0PHlMC2x/g4ZXahSxsB3ImkFDCIelm1kVvsj778yrinLSOhPMxKO0j1l GhF/RGJuNwAxYk+1kHxLuvJ8rV0t9pW4vN0Sa4sMDw/NAzR5IcFCpH35WuG80n22G81v /Ood4kjZvUqelYqV9g/8QJ1U6LZA1FOPFH5wx9kjAGJ6xS3dH9lCsG8J2/HTXAlFIr7N /bbJoDslynXVpvZjJGpYDKTpNExucINAqA3MZ16rbNIa8nYGN58yaX9Lv8G+hLXlYc3y 6kqg== X-Forwarded-Encrypted: i=1; AHgh+RpFuYn61goeO+U/8V/N2lO2lXfK/SATDzs9QrUsgYVlw8uhq+7BiJ9TUAVtlk+d82gB0xDPbwx2h4pc8cQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yy6W5eNL7v4PKOML9I4bxkaKxWXhLqkZsOiR2AJ31SilffQJxAf YzbK8gub9nKZrcr0/YFes9RIjEoZvtp+l1xjQ04go2huNWd9vJMHX3NQ X-Gm-Gg: AfdE7clPfngAKIP/jATL2HsPgoqs14ArRlVP+SxMZ3+7Va7/WvTv45e1wXJ/A7OnXzq 8C2O008lWGUWxTOYZ045CmYExj711PryFGWoR5ebgghmiLkSWMd9kakF6OO8nIAzlKJXZr9d7UQ U+nEjGSmRhoJhfR305TyvQoXjj5Z8Eb5b4/02jcQfYyZD4aACfpzWMuBHhpLkQI6MBP7SmtZDTT tHpfUKxgu5oLuFrhx6wTS3k53quuOAyA5On4ysIcFAxZLH2xnFAFhByXeAifNF1IsrodRBPTCW5 wD0hupLVAhTQtXfjj+NLOq25MoGcko7qBE6frRIzAvrsMS1cID8cnZ2uRN1IjoXx9ShA3M9DwEC pR640I74842LbVE92QMcEPoN+ZDG7ItbuW8TkK1bO0qeTXVjKrfmhjz7p4L7p2Q== X-Received: by 2002:adf:f012:0:b0:47f:4ba0:6950 with SMTP id ffacd0b85a97d-47f4ba0699fmr3452109f8f.2.1784100760954; Wed, 15 Jul 2026 00:32:40 -0700 (PDT) Received: from krava ([2a02:8308:a00c:e200::dd7e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f464b7e22sm13804386f8f.25.2026.07.15.00.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 00:32:40 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Wed, 15 Jul 2026 09:32:39 +0200 To: Kuan-Ying Lee Cc: Kees Cook , Andy Lutomirski , Will Drewry , Shuah Khan , "Peter Zijlstra (Intel)" , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] selftests/seccomp: Fix pointer type mismatch build error Message-ID: References: <20260715053559.28535-1-kuan-ying.lee@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260715053559.28535-1-kuan-ying.lee@canonical.com> On Wed, Jul 15, 2026 at 01:35:52PM +0800, Kuan-Ying Lee wrote: > We hit the following build error while running the seccomp selftests in > our testing. > > CC seccomp_bpf > seccomp_bpf.c: In function ‘UPROBE_setup’: > seccomp_bpf.c:5175:74: error: pointer type mismatch in conditional expression [-Wincompatible-pointer-types] > 5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe); > | ^ > seccomp_bpf.c:5175:57: note: first expression has type ‘int (*)(void)’ > 5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe); > | ^~~~~~~~~~~~~~~~ > seccomp_bpf.c:5175:76: note: second expression has type ‘int (__attribute__((nocf_check)) *)(void)’ > 5175 | offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe); > | ^~~~~~~~~~~~~ > > get_uprobe_offset() takes a 'const void *' argument, so cast both > operands to 'void *'. > > Fixes: 9ffc7a635c35 ("selftests/seccomp: validate uprobe syscall passes through seccomp") > Signed-off-by: Kuan-Ying Lee Acked-by: Jiri Olsa thanks, jirka > --- > tools/testing/selftests/seccomp/seccomp_bpf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c > index 358b6c65e120..0622bc2acad4 100644 > --- a/tools/testing/selftests/seccomp/seccomp_bpf.c > +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c > @@ -5178,7 +5178,8 @@ FIXTURE_SETUP(UPROBE) > ASSERT_GE(bit, 0); > } > > - offset = get_uprobe_offset(variant->uretprobe ? probed_uretprobe : probed_uprobe); > + offset = get_uprobe_offset(variant->uretprobe ? (void *)probed_uretprobe > + : (void *)probed_uprobe); > ASSERT_GE(offset, 0); > > if (variant->uretprobe) > -- > 2.43.0 >