From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.226.149.38 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796411219; b=yrd3gw2w5iNYI8nhbE5nNKPeK+Ovwyi7WyFpazUaMM4CxPCeBmlyZp0UQ810fWXetJ8C HtyxEBj73SRZFMbeoNTNhGoW4kAI0Leszyq1yeFKElPeN+mypWg/ThyriuKo2jjf2lPAD WfsWnjqBn6fM5BpyHegXbWTEVIGOqA+UESAYUQtx7vVcnyayDkuvkIt34vIpEUi+rqH9P 7j5A5bytugiBYH2g2f3BLNAUrgCzKvZXLE1reU2Eiz47BQjoBW/Os42XDt7nrbfkwkp0m 2jPzZV1KAj0a3oOcgTDcNLQbjXbwD5dS7QVg7ZQctvWzC6nHXzLsuYkmlX3kPctAIHw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796411219; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Message-ID: Date:MIME-Version:User-Agent:From:Subject:To:Cc:References: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=NiiFavSZUJUlwdtP43TOa2+5LFfcFNSk5dNdzNbZ5mI=; b=KA5XNFrXJIWTT1LPow5IbMtZgxVjORCexiWf8TutuC6NBDaL4q3e4JlH5bpzGIJmFQ3K 6npqvRLIu2QCFM07TRbY+XfdbXSG71mYQqjrDj9g/7c2WBs+X99vc4sD8pTCfcbudUt3N wH00uXjdpHU4Kg4p34u4EwC4ccKyJbaO7F/o4icRZ8ao712OBpkwpMPcwwCEaDOf7/j/i oSO9+EiKosQvtNsT2JGrRy75xso8vDXhiDykV/GXImTJ9kaaXXmm4nMhdwr8+Ienk8yPh /vNaFNpGiwxL4/0ovfis0JQ4ySSkcb9IkdQhKWl308Cyj1KRnRz/Vr0h06hHNmG2c/g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=rbox.co; spf=pass smtp.mailfrom=rbox.co; dkim=pass header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=mEnFpfbo; arc=none smtp.remote-ip=185.226.149.38 Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [185.226.149.38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32B72606A32C; Fri, 4 Dec 2026 19:06:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 32B72606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rbox.co Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rbox.co Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=rbox.co header.i=@rbox.co header.a=rsa-sha256 header.s=selector1 header.b=mEnFpfbo Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1xZYcB-004wah-4u; Fri, 04 Dec 2026 20:06:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Cc:To:Subject:From:MIME-Version:Date:Message-ID; bh=NiiFavSZUJUlwdtP43TOa2+5LFfcFNSk5dNdzNbZ5mI=; b=mEnFpfbomQ4gGSIOYr0CqKm4OO xojmM7kHM608wuHXRLjRVWhMqSiGMs1Jz8ZbeHcb1CI9XQY+JpPe7y2rUTwSV0wVO2TQIWdiDza01 9s566qPWtvSkDFOzisa7b+lQIdEvDsmFtP1fMSWBD0oPAT1wgG/S28aXa0yOXjSmjNcDwTHodLDza WYvf9AZG0um7XrdT127Zc2bVWqw0XU9/SV3+X69P0xADFxxaMyqy5e6BFr1YSdk3Qq0A7e5saA2ju LaaGQUsXHfnmkRdU/PlSfwLGCzb+iO5aaxgDpefCvGIxPVmA0JRm2FzittC/VcIzZ+gbPbSP5k9TB EgYqembg==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1xZYbz-0008EK-Or; Fri, 04 Dec 2026 20:06:27 +0100 Received: by submission02.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) id 1xZYbs-0043AU-Rt; Fri, 04 Dec 2026 20:06:20 +0100 Message-ID: Date: Fri, 4 Dec 2026 20:06:19 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Michal Luczaj Subject: Re: [PATCH net-next RFC 0/5] vsock: constify transports To: Bobby Eshleman Cc: Stefan Hajnoczi , Stefano Garzarella , "Michael S. Tsirkin" , Jason Wang , =?UTF-8?Q?Eugenio_P=C3=A9rez?= , Xuan Zhuo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Bryan Tan , Vishnu Dasa , Broadcom internal kernel review list , Haiyang Zhang , Wei Liu , Dexuan Cui , virtualization@lists.linux.dev, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org References: <20261203-vsock-constify-transports-v1-0-ed0c08ca9e0c@rbox.co> Content-Language: pl-PL, en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/4/26 17:18, Bobby Eshleman wrote: > On Thu, Dec 03, 2026 at 05:32:16PM +0100, Michal Luczaj wrote: >> Hardening in the spirit of commit 56130915bbe3 ("VSOCK: constify >> vsock_transport structure"), which constified the only vsock transport of >> its time, but then effectively got reverted in commit c0cfa2d8a788 ("vsock: >> add multi-transports support"). >> >> virtio_transport structs are immutable, move them to RO memory. No >> functional change. Value added: less .data, fewer options to take over >> function pointers [1]. >> >> File sizes are essentially unchanged (deltas -8 to +64 bytes, <= +0.01%). >> Sizes of .text and .bss are unchanged, only movement being few hundred >> bytes of the transport structs relocating from .data to .rodata: >> >> .rodata .data >> vsock.ko 0 0 >> vsock_loopback.ko +384 -384 >> vmw_vsock_virtio_transport.ko +384 -384 >> vmw_vsock_virtio_transport_common.ko 0 0 >> vmw_vsock_vmci_transport.ko +352 -352 >> hv_sock.ko +352 -352 >> vhost_vsock.ko +384 -384 >> >> [1] https://www.kernel.org/doc/html/v7.4-rc5/security/self-protection.html#function-pointers-and-sensitive-variables-must-not-be-writable > > Thanks for following up on this. All LGTM. Sorry for letting it slip > through the cracks in my series. Great, I'll wait for your series to land and adapt this accordingly. Michal