From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) (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 50C1F229B1A for ; Wed, 5 Feb 2025 08:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=44.202.169.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738743957; cv=none; b=GevFt0CH31z/geA7Hq1/dUXE97QO2oY6N7uGX6sfn7+RO3cFXYeOPng/1+7jQBKTj8ou3z8y7i5UpIN3PFriE3SvAOHbWyk5yF4UIWCTNACRGsmJlRfACc/7vMCOLl/mEXf2A9Ups+NF38D6dc/nEJ+izQATUGpTq7xeBZWFgEw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738743957; c=relaxed/simple; bh=Mi/NLwIbGokVF9aspvwcN5BXu3vQjugkjy50y6UHsiA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dPV0dSH9l8pqyv2Qs99SwuQ4j5hiN2wDZ83idPyQSfLIDEZpVGM4cnEgRSLiTi5T1Qa130R+l4uhsZmZI4t2e18AUJEPPs6g8w2jYia5WsVT0erCnfaAWEA4TLU25YzsVjlyloraVXoPX23AXhKvWRk395OuRX1BoZI27/U4Z68= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com; spf=pass smtp.mailfrom=embeddedor.com; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b=hERL5eAS; arc=none smtp.client-ip=44.202.169.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b="hERL5eAS" Received: from eig-obgw-6007a.ext.cloudfilter.net ([10.0.30.247]) by cmsmtp with ESMTPS id fQ1ct5UHdiuzSfajFtJBZU; Wed, 05 Feb 2025 08:25:49 +0000 Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with ESMTPS id fajDt26fl3770fajEtI4uL; Wed, 05 Feb 2025 08:25:48 +0000 X-Authority-Analysis: v=2.4 cv=WYoKaVhX c=1 sm=1 tr=0 ts=67a3208c a=1YbLdUo/zbTtOZ3uB5T3HA==:117 a=6Vi/Wpy7sgpXGMLew8oZcg==:17 a=IkcTkHD0fZMA:10 a=T2h4t0Lz3GQA:10 a=7T7KSl7uo7wA:10 a=ejmc5w4W0Lhx8iFsI5oA:9 a=QEXdDO2ut3YA:10 a=Xt_RvD8W3m28Mn_h3AK8:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ovkOZ8H+TdRMiuF7Wh/b9sjkTUEJ07ASv4wZ1VaaiRI=; b=hERL5eASI4HChR6B+Q0EzO30f+ wGhhOM+Kz3x2IKMhgVoJcq3tLB0vrYgpdMtMZkDtxBpA4afwMpxHhV04sa8PQqpHRYnd9NgwhuJxe Ds9FxU0u/vYnYDW/4sowzYHXq+fOKyQ6Z2e29iz/SULQZmIsejBQnxpWJS1fkREzFkiTXxcpveD5C s3pTnBreaGvGlzcube2u5Q5pSO2w9pLcLjB4rKvbftmlxIQK1jmyY1yS/+1oQzt3taZqE2B7apUjs hKW0Dk08rww1XH86IHlQZGJZVXgCsW59Os0ImKeOyo46PQ5Ikjd4gcCSk4XB3yomddcF9v/5M7ZaL IC0l5Aiw==; Received: from [45.124.203.140] (port=54647 helo=[192.168.0.157]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1tfajC-003dlk-38; Wed, 05 Feb 2025 02:25:47 -0600 Message-ID: Date: Wed, 5 Feb 2025 18:55:35 +1030 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][next] tty: tty_buffer: Avoid hundreds of -Wflex-array-member-not-at-end warnings To: Greg Kroah-Hartman Cc: Jiri Slaby , "Gustavo A. R. Silva" , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-hardening@vger.kernel.org References: <2025020503-unnamable-canopener-ac71@gregkh> <3befc536-3bf8-4a79-9815-3386912069b2@embeddedor.com> <44d7feed-173e-4e46-994b-e3136161efc9@kernel.org> <8fa0b596-c812-4bc5-bdc1-beb75d7928d3@embeddedor.com> <2025020513-arena-tackling-1741@gregkh> Content-Language: en-US From: "Gustavo A. R. Silva" In-Reply-To: <2025020513-arena-tackling-1741@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 45.124.203.140 X-Source-L: No X-Exim-ID: 1tfajC-003dlk-38 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.0.157]) [45.124.203.140]:54647 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 9 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfFl9TOsltH8bjfu0Y3kQhGi4rOHMsYuXyQV3vgOji5Igefe6Pb13dPOp8RrIdUPR18Z32JWR+B9NpigPWRGGa/gdV5ZLqq0c3neXAMtxJvDzCZGvU2ya o6EdDemGXfOefcbDXhuW+1oAO+h4zaSo4YIUihAdyDxfctKJulqsdsMM1sh9PnqQk+seoevDfu/7jRKDstb7qRpwjGQ6gMWJu62fUeovF0KWRXXlDN6/3OC5 > >> The problem with this is that then we have to modify a lot of >> lines from, let's say, instance->used, instance->size, etc... >> to instance->hdr.used, instance->hdr.size, and so on... > > Great, let's do that and get it right please. Deal! > >> This code churn is avoided if we use the struct_group() helper. > > It's not "churn" if it is "fix the code to be correct" :) As long as those warnings are fixed and we harden the kernel, I'm really okay with whatever maintainers prefer. :) Thanks! -Gustavo