From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EFCB14883F; Fri, 2 May 2025 04:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746160320; cv=none; b=rnQgWC8X7KaRV++nWT7e92ROLbRB1Ai4y1pstpySk5P1NmebzsRsSV8P/SU6hNQUXplvaMTwP7dG24IR9w/EURq2m8WG4mhWerPoycC3qb2yjqb/e0DGZmiZSAqg5BEJu/O9Q6/rVpIRo8lM5Nt5/ug8t27WoAv+B0gal45ie1Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746160320; c=relaxed/simple; bh=sJQdtme048fLLoeEILMSI+01YtYV965QaIGB8McWDpg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YAPQFj4kOGLW0Bg/KjRj4FPj8XuntlyWNX+8dEwKq5peCtIjUFaxBBoZ+jskqhQzZUoQug2UdH7zPJRUUPBruHxqVXJdC6kZDKTC8Ao9IkofpLNdPkBD4CwFLB68JaBUn8tRU5ta8BFq2f5MRZB/FWCjeOGYgg8t1uEonnwxjlU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=OEyEgfhc; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="OEyEgfhc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=W75ohiwgzQ2b4Y0vvPNQDeN3F8noVVK8UMQcA0s5vW0=; b=OEyEgfhcNYmmukh/cCmF4Bur9J 5TTFFRKRoVZ1LiLz7O7//pNumoM24E8Wx8vZhRuvwWy43xbSQ1eS6SC9bBM2caxDUEYVSFjT1w47X mfbtBNqT90EZBKa2Tyac93FtVBihVucsJvBfOxhUWHPXnBY6Nvwoyk+UvL56AafW1RcdBzneytf66 DRycb8i1SmCr4CqHlBHS3uZrSpwmGdsCgf1L7xrgmOF2Dkc459bOOnSyKrTMS0coNy/1xpNjfRiP0 EQr6KhDUW8txsF5hMzriQ+EklzGxzfLDABykVEeQQPWHcjB3f/0AYPCtViTNQcdxWWjyeTrlsh8iO AgVJ5zGA==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1uAi3x-0000000FpJU-2zcC; Fri, 02 May 2025 04:31:49 +0000 Date: Fri, 2 May 2025 05:31:49 +0100 From: Al Viro To: Matthew Brost Cc: Kees Cook , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Christian Koenig , Somalapuram Amaranath , Huang Rui , Matthew Auld , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christian Brauner , Jan Kara Subject: Re: [PATCH v2] drm/ttm: Silence randstruct warning about casting struct file Message-ID: <20250502043149.GW2023217@ZenIV> References: <20250502002437.it.851-kees@kernel.org> <20250502023447.GV2023217@ZenIV> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro On Thu, May 01, 2025 at 09:26:25PM -0700, Matthew Brost wrote: > I;m fairly certain is just aliasing... but I do understand a file cannot > be embedded. Would comment help here indicating no other fields should > be added to ttm_backup without struct file be converted to pointer or > that just to risky? What exactly are you trying to do there? IOW, is that always supposed to be a struct file, or something dependent upon something in struct ttm_tt instance, or...? And what is the lifecycle of that thing? E.g. what is guaranteed about ttm_backup_fini() vs. functions accessing the damn thing? Are they serialized on something/tied to lifecycle stages of struct ttm_tt?