Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3984386pxb; Tue, 2 Nov 2021 01:54:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxATcu0+C3sPWloi1rwqOpdz/iPcLh+d4KkFG99wIkc/L6MmjczLPgfp8jKzKY1oUYp+5Oi X-Received: by 2002:a05:6402:268f:: with SMTP id w15mr49518160edd.13.1635843298218; Tue, 02 Nov 2021 01:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635843298; cv=none; d=google.com; s=arc-20160816; b=mUCKyMFoR8u3XsZlCwHJq4qRfjaFq4MpHpoz72gTelRZxsggcWA2/uzxhVlEy3TXJ4 mmUjoCAO1yLYOWdpcdO6BdrqUWb2734xRn58DWOnHZZqGgo/52RM7n78PglPTFPaLBV+ g4YTMSYEslizQkbdU1CoZP9S8Io6+6uD0IiA4Itzj4LuZ2UNichWOyY4OqciER7u7a7H 7GynF8OHgmzg9wrSHlfz82+WxdWC/uzfcrsIR6Fa7FZrS/wig9PcSdTGO1Om+E6HZe7H aM8fOcddyQQydFVb5y/Iy3nKbdSm2y+AUKh6a37Eqtz8578edRlnnu6cDl628PNAQXxG dqwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Gkgz68rvnt7G9X+ym70utCtNaVuCReoBXjCckZay26o=; b=Plbyv4qgsUqqTERFoh08gmJXrg6G0OLN04pgkYU9DbW+uJXURnKg737HZs4FxV1r2j OPI5QZXsjwBh1vkUaTyLOVHenu+i0mbU7ze8FRkzoZ8S5CSIEX6oIFGbbh+3PcwtJmBs xERi+qJlWMe4PmcUxsRGOIHGn7wOJk/YSgHWKkAlYldtBKOut3SwjJ+Q5KBL3U3e2g43 oJ7peNeYFlUqkEJJSm1tki4gfD6yOwIHyt4sT1a5MGmX+iSvRezrBHeO93W/HtzEV4/+ HgBwcBq29ZtZvfwmeTcEBpLxtbIcMsNi+U/SIf86L7NtgE0Ffkzg7D6RG4ACcN2Neece 1+lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KKNn6CMP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si25813433edp.84.2021.11.02.01.54.33; Tue, 02 Nov 2021 01:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KKNn6CMP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230368AbhKBIww (ORCPT + 99 others); Tue, 2 Nov 2021 04:52:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:30379 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229920AbhKBIwu (ORCPT ); Tue, 2 Nov 2021 04:52:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635843015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Gkgz68rvnt7G9X+ym70utCtNaVuCReoBXjCckZay26o=; b=KKNn6CMPI9RMMj1bcEv2GriaVKbl0Uf5q6N5hB2nDiRGja1wSLJd9gdeHUOFtVqZIBkV8n polJPNJnWIV2Mn/m5FuRPdA1lMHQRsrWcOZ95HfAexChOGc38EeRE6eX2eyrAqOUcreLS6 iKLPSBFGXzpv8EdDlsE4gcYgoHNdgww= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-167-W4lh5bqyPD-QMzXsgnlZvQ-1; Tue, 02 Nov 2021 04:50:12 -0400 X-MC-Unique: W4lh5bqyPD-QMzXsgnlZvQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2793D91271; Tue, 2 Nov 2021 08:50:11 +0000 (UTC) Received: from asgard.redhat.com (unknown [10.36.110.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C85469FB2; Tue, 2 Nov 2021 08:50:08 +0000 (UTC) Date: Tue, 2 Nov 2021 09:50:05 +0100 From: Eugene Syromiatnikov To: Jeremy Kerr Cc: Matt Johnston , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 0/2] MCTP sockaddr padding check/initialisation fixup Message-ID: <20211102085005.GA14342@asgard.redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 02, 2021 at 09:57:34AM +0800, Jeremy Kerr wrote: > Hi Eugene, > > > Padding/reserved fields necessitate appropriate checks in order to be > > usable in the future. > > We don't have a foreseeable need for extra fields here; so this is a bit > hypothetical at the moment. However, I guess there may be something that > comes up in future - was there something you have in mind? Not really, but reality suggests that many interfaces tend to extend over time (including socket addresses, see flags in sockaddr_vm as an example), so future-proofing padding allows extending into it with minimal implementation complication, comparing to other approaches. > The requirements for the padding bytes to be zero on sendmsg() will > break the ABI for applications that are using the interface on 5.15; > there's a small, contained set of those at the moment though, so I'm OK > to handle the updates if this patch is accepted, but we'd need to make a > call on that soon. Yeah, I regret I have not caught it earlier. > Setting the pad bytes to zero on recvmsg() is a good plan though, I'm > happy for that change to go in regardless. I can split it out in case there is hesitance with regards to applying padding checks.