From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796441351; b=2pOwuZ3dn08EnfpOnAN+b8U/lvYqdgvG9IN4YqjyJ8U5lqCF3CQCByYVnHPrbFneXtuv i8sj16WKFbcbY+UwcSAgSMkCWQHmrrXSP+6mZ47NgyLM00YRdf1wHrg6FYPzsTA6hBJDm hMhstigNrTv5AACE+tJoWwFcdgwf4u+jTT7ZXVGmLzWqzkKf0s7ZrAkFq8hQqZeeXXeR/ p0avkk5GRWf2ihgbRoxHlu++7Og0P89I7fq9t5YIE0wUwWUQoRNSV5I8dBFHWs9tdsK4g 5F616TjtC3Q+yf+TPNdpfgOOdHrpJ8AQgFJJb9emS7Jm3xe1eNncZmj+jCmvkcQDvkQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796441351; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding: X-Mailer:From:To:Cc:Subject:References:In-Reply-To; bh=LAjHaOai4e6z7cgqzZqA0O9y4tqmBUKyLi0Cn15Fevw=; b=mijyez8f+E0I6djPN83iOF+uCIa3aSPFNBA0UVbB9jRwMEdXDM1CJ9hMtaj26111Mp/M WInUtd3dQRflVcYmXwCDLJoRBQ6ALBWohf0Fhr1wSW1CtppB9EgWt72atGOz6DfqZO119 w3F9wvEsAQONQBoSiTktQE4KKKdCcFH8mZXEfM6S3grDUwrBuP/5yJXBueQZcNzhCYfNi 41HezNdx88gjhYtBlqXGNlu8/L9gzWlILPtKaGLz9jgKs1Bk7AUTC0T9rKyB+5qBnr5RJ 6MsGPApKV+jTprNjb1a1I0hYYE/6g7mjHeTn/OSNXcWWv0SoyY7SEbYeZgE/vhHRSGg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass header.d=paul-moore.com header.i=@paul-moore.com header.a=rsa-sha256 header.s=google header.b=aGLcWeUB; arc=none smtp.remote-ip=209.85.222.182 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 643A2606A32F for ; Sat, 5 Dec 2026 03:29:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 643A2606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.a=rsa-sha256 header.s=google header.b=aGLcWeUB Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-94a7abed56aso170415885a.2 for ; Fri, 04 Dec 2026 19:29:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1796441350; x=1797046150; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LAjHaOai4e6z7cgqzZqA0O9y4tqmBUKyLi0Cn15Fevw=; b=aGLcWeUBHIJrW94Snlf4PXOhDZQUgaVMz1a55m1/gNfwTseCo77cwN7dxd+Kjyx90X WECWgEGjgcuRY/ZqpuoSOoEJISxXmbNYlJhmCgYkekvLZHFu/MicujdWRMc3XqOwsQ6F stx9JQTAyVOVkCrEBGuajX7u5YZx1/iMrGoxAq2TNPLTrCMbzHjzsNIRM+5K63SbIl5/ EWCmk7qsBVzR0Qv4/Nt/3/pT4eboXsZOhwdxs8C9HUDwFwxBrgtelrI7UI7eTYTj7VKk BLEr6K6WsFssNkZJSrjiaRjqQY8B7c+HQ5G8rYOgf25aqBuVfCsGRf+ueMslPfxFns+b y7yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796441350; x=1797046150; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :content-type:mime-version:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LAjHaOai4e6z7cgqzZqA0O9y4tqmBUKyLi0Cn15Fevw=; b=E31HGy1HyVhPt92IGtuPauHhe8sQg40WTbi/npK+G708aGIZcCYx3h+4iw7eyCMWbj iVya1VE5/+HsieQsKcCYKYxO7OsJy8oHREBiVtLUUz93cL447jxf7RjJbfoQV4KJkdnR 1vUAw47EErgvvtQ9UChxwso3dF3GqwMycESzFe1xOZhC6RJr/oW3SA4hiYG6OZiBksQx VIzaH2RRkJlysn6+iUBgh2yMT1RGdKGrgtdG3Qg6XrLCg3GBDVnIxOxuxHgX2gxE4hPk 899pqlaRDiriXsmftPa3nffOuHePRgP+8PTP/SbyrxQqBiQiSXghQsdrtwlKVeFg5/8E /VBg== X-Forwarded-Encrypted: i=1; AL+hErHL4Sjx8h2ukPdJ6X74JQThMsnB6w5mjGxDQLI99fvvqppZuDPYkc1tw+PtiyBfrAXCWiT/WlSs@vger.kernel.org X-Gm-Message-State: APuU4Z/cEOPLiJQK9voheJbT3ks0Z7VVJMtvgpXIZyssCOffYcQ5siyI 62KsMHDr4VW6Uz2xug9QXOD7DTJSRElohCTsoIN2Al2qTp2pTYWGAgXsxwp8gKm8dA== X-Gm-Gg: AZFdTZc5LL9gXxGPgFzXtNTiNndrzJTYdrAAlBYgJbxI+KLxg9tBVgYLICxHJJw0LRH nEVVL5sJTOIGR6j72Q4PqA16Ut0VULy1kEFW8C+vAWqq1lYbNKCnkeVRzuCGIKX9Ggi/K2H2uzE FsG8upYm54dY4xbGs0bMpexAqIsMEtdK0DNrlt72xoiL98+IhaK/ZeQ62tmxIafKtV+BLfO9nPg ffLbnp1Qs7O52QdVh6WKJJjbvBlnxCabMCkwGEVZAhAEEhThF4jOtnAYfaDH0G8ZdXSZe1GWwfI klgZI8+5PW3pp3y/b3p5eqpZjDL8JjpcSUjDXUoTd1Ua+JDQkUpdT4P4C1fya7CzDyA+EiUWM3F uYBFoJo6vIOVKHCuKOiPA9El8SQW52vW+I5MKx2w7Vl8w2wVg419LoTFODIZDj/SxFzaSs4mWiF eICs5L9+dCCn9xQhF9wT16Y3scrl1W8qU+a/JjOylNj62BMh+KQSaohHBL82xaDYtlosQeXketH ULyr9L2I+f7MB+MHsyPNhmAw0l9xpcCHmRZM/NfJDMd+5x2AfKTIhXMr3KHSZLhxzHdg7nk7i/h Q7FcxIKefiaOPj2m+DEPwK2cpB+1Ax5ubSwXAufoSHy4UZO8tF8BagZj7Q4/wRwRQGxUbSeSQr0 /+81Q9YeUrg3uFEqKwQMItXHzmudwbg== X-Received: by 2002:a05:620a:2954:b0:949:ad9a:c076 with SMTP id af79cd13be357-94a82f49a23mr638169485a.82.1796441350337; Fri, 04 Dec 2026 19:29:10 -0800 (PST) Received: from localhost (pool-71-126-255-178.bstnma.fios.verizon.net. [71.126.255.178]) by smtp.gmail.com with ESMTPSA id af79cd13be357-94a7f50608asm395849785a.36.2026.12.04.19.29.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 19:29:08 -0800 (PST) Date: Fri, 04 Dec 2026 22:29:08 -0500 Message-ID: X-Mailing-List: selinux@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: pstg-pwork:20261204_1745/pstg-lib:20261204_2121/pstg-pwork:20261204_1745 From: Paul Moore To: =?UTF-8?q?Christian=20G=C3=B6ttsche?= , selinux@vger.kernel.org Cc: Stephen Smalley , Ondrej Mosnacek , =?UTF-8?q?Christian=20G=C3=B6ttsche?= Subject: Re: [PATCH RFC 24/32] selinux: factor out sel_sid_to_payload() References: <20260928174643.2458710-23-cgoettsche@seltendoof.de> In-Reply-To: <20260928174643.2458710-23-cgoettsche@seltendoof.de> On Sep 28, 2026 =?UTF-8?q?Christian=20G=C3=B6ttsche?= wrote: > > The context, create, relabel and member transaction handlers all end > by converting the resulting SID to a context string, rejecting it with > -ERANGE if it does not fit into the transaction buffer, and copying it > into the buffer as the response. > > Move that tail into a common helper. The values returned to userspace > are unchanged. As a side effect an oversized context is now also > logged for relabel, which previously was the only handler to fail > silently, and the logged function name is that of the helper. > > Assisted-by: Claude:claude-opus-5-5 > Signed-off-by: Christian Göttsche > Acked-by: Stephen Smalley > --- > security/selinux/selinuxfs.c | 90 ++++++++++++------------------------ > 1 file changed, 30 insertions(+), 60 deletions(-) Merged into selinux/dev, thanks! -- paul-moore.com