From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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 45DDD2BE05E for ; Tue, 31 Mar 2026 20:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774987814; cv=none; b=K8PjgDNEKzaa54YAdKPZKNKs8v2fWr5pOH1L4C2OxbZ80z/KIIIGsAZnbq1L+/8Ld/FyPMOuKY1MJ05rzQQ3tnMxdJusr0TgRClIc3ztKrgsmkOAsg5qBaBOKho6x0Xi4pqJMBwM9EXX5/UZD8P8NEqqoBxL8Gx5K4PJt3+iY3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774987814; c=relaxed/simple; bh=QY0GxpIp2dUAfyWDuWUGa0tRSF0PWKmoSJFuqIEZBCE=; h=Message-ID:Date:MIME-Version:Subject:To:References:Cc:From: In-Reply-To:Content-Type; b=G5hCKJ7PlEs6GrBzAPt+rieCLVsEwkuvx8ffAqG/U3kNIoAS/wQsbdWVfZ1SNGNydXaYRkknV/YKyikOathUAj+ygpTPRCdBaC+krnTcwYAQ0mWYZdPCbHiSFcrjyfBmp0t2Wef7YzRUM6hirRHVDLoJMIbh3Y21HCHkrFuP9zA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I36NOCWK; arc=none smtp.client-ip=209.85.161.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="I36NOCWK" Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-67c641dfaceso2065125eaf.3 for ; Tue, 31 Mar 2026 13:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1774987811; x=1775592611; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=0WlrBiZNX5MM7EOpp+jqx0Njxxj3QUeMt54RUejQ10Y=; b=I36NOCWKB9PtxYgJj1Jz6dkUSQAWYBoYs7MUv783SqlmE7idZGgL7bDmA+upiTKbl/ o6W7RW98ExwD69s56C3ec2p9s0SNxaEsT+RVFjsakXLWv1xa+MxZsolswn8gvC8p4oLV ne7fvIyDxbjEflJI6ydQma9lCgqMB28VFoNdI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774987811; x=1775592611; h=content-transfer-encoding:in-reply-to:from:cc:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0WlrBiZNX5MM7EOpp+jqx0Njxxj3QUeMt54RUejQ10Y=; b=S1W25sY9sZJVl9Yc/JjPCyZTlknD+4To+eruVT5XtMGs406cjJWUFEIviNd6Vm+Uyg QLyA34Li88pvpBeen6skCjsf4/BSOfddWlaZfTklPnckdvrI2NxxyRjE3yXQ8AOr8rRS md70DIViVCMm5FfQiBXky+HVRDGnM/Onvo0311Hzk3bsUSx4iLQi9a70Yjmd/DwLevGJ bfag7DkUlFqTVwdpWJ5M4OZzaBW+CX0ag7DnahGH7uws7uVoiSn6MNSoWuztVjWSi4jJ zzfnVPGpMKwAUJ0z725X0/SXas2mU2ziZ/aqyISZSQFmZMWWJAuOMsgA62FuH44WM5x5 L1uQ== X-Forwarded-Encrypted: i=1; AJvYcCU/ktqyPNW0X/10TUF45aNOtzVbVLLhAZdzSLcfD5I21VHPwDlprSEPioJfhjnybPFqUOoB4Cfo56EfDsg=@vger.kernel.org X-Gm-Message-State: AOJu0YxhQakaoCboSUxxS63zNpPxi9eV+jY/kwGgt/zhlOI1tXx68i5+ EONgiF6DbAnTFyWlM3PFHy2JVWMEUhhzGgRJFdk86TR59jjo/WaaYOrnYsYMjtyL1k7IxZOaIXV yk69rdRE= X-Gm-Gg: ATEYQzyXsHtJl85/vuqorpnMb3hkI9YAfh9QysNmUr+T3LkicxaCO8vHt/y6DlPqcee B1HXtmHD/fE8yINNVBxxfo+9ZlioKDK0S4PstjjAhMyXYckoHPYyebg5wK2EqWCVKJK3nesgteo Klf1BPMNigE4CBCaanF/dMQO/CCX2012M4M8XNKWXaReZYiNd0HZNBC80NgU+VOO9IsRNQxyCf2 P00GK3Zps+UgSEmQF/QsZaAEKmfHm3magDuwLebqK7iDlAViybj8CuDkRnjTpWlzhCOOUL4vuP5 j2mirvPp9yWrdJXdVZxfaaBY2VOJyQd7ZhFp5qtsFFDhMTgUKxSw486I5ZU2lBbhwfv3Tjn3VpP BhFHUe/FH1XysA0sUMNtBFrixv1tVQBcZquuSAZMTIgw+IJg0lKxnTIGdDgtERK3A0MjcFefGDX UZYO7oRfG1NIIr+M5ydCJsCVzHFhshss+GDzM= X-Received: by 2002:a05:6820:6af0:b0:67e:3568:47ae with SMTP id 006d021491bc7-67fabcd5b42mr336394eaf.50.1774987811158; Tue, 31 Mar 2026 13:10:11 -0700 (PDT) Received: from [192.168.1.14] ([38.175.187.108]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-67e2302f591sm7437825eaf.1.2026.03.31.13.10.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Mar 2026 13:10:10 -0700 (PDT) Message-ID: Date: Tue, 31 Mar 2026 14:10:09 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests/clone3: Fix capability dropping by using standard libcap API To: Yi Lai , brauner@kernel.org, shuah@kernel.org, areber@redhat.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, yi1.lai@linux.intel.com References: <20260310031415.151531-1-yi1.lai@intel.com> Content-Language: en-US Cc: Shuah Khan From: Shuah Khan In-Reply-To: <20260310031415.151531-1-yi1.lai@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 3/9/26 21:14, Yi Lai wrote: > The clone3_cap_checkpoint_restore.c selftest defined its own 'struct > libcap' to manually cast and manipulate the internal memory layout of > the opaque 'cap_t' type. > > Starting with libcap v2.60 (commit aca076443591 "Make cap_t operations > thread safe"), a '__u8 mutex' was added to the beginning of the internal > 'struct _cap_struct'. This structural shift breaks the selftest's custom > struct layout assumptions, causing capability corruption and leading to > failures during test execution. > > Fix this by removing the custom struct definition and use the standard > cap_set_flag() API. What king of failures are you seeing? Can you send the failures from the run? > > Fixes: 1d27a0be16d6 ("selftests: add clone3() CAP_CHECKPOINT_RESTORE test") > Signed-off-by: Yi Lai > --- thanks, -- Shuah