Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7364878yba; Thu, 2 May 2019 08:39:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDsBgmK25Cve+t7xGv3e2ilbCVSyrt/4ZNmyZORq0t9SKb6t3hs3BFt+WFOAn5xITDCF8z X-Received: by 2002:a62:7089:: with SMTP id l131mr5026416pfc.158.1556811576897; Thu, 02 May 2019 08:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556811576; cv=none; d=google.com; s=arc-20160816; b=CWC5SUArx2Rf+j8vldTcNgKpmk0mr65rDdiB+8ouNFUu1auaWsYc/mLZ0me1K1yCCq FZpmjaKcDpIm/0V2EPd1c+sUfrgIAVW6pFm1A5aXXbKREv5S/4IZTQ6bIvUb8ZsUdo1A JEjD9w3G0WSaxo+vZbjkXgxgTyWyLqL7pC/mP6Frlm0YzSQhlhPbeqL8kS4U4zviWKDB GYQ0DatQ49H9nQ5iarUGOimUjxwg4cHbcIPt/qyfvcMDj+/Jo5tTPtmqvsmMLLmrlBNH R/PyKsIOL6RL5tpiPn6txMqg96YJobPoKTag3NdMe2+Tk/i3sXeIHJBHUBRw41YVslhm PVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=SWuYL7Kpu/mNBiNgYbxBYp4obeAuPuez+vzxl8oSQSU=; b=QrsZJmlvqSkQJpYhkfbWYjC/8//ZrFlBez6Vgf21LXWjh7ZZqHlvZQL/9yJbzGdtbu 4YFBJjZI4UDCiSBErerm52DIaNNrRhccQL39OPyV82Fo3U8fVsNV1exceatli1OwXIex AMINpPqqVeJBngkpX2lZlGeO99GVmRqDdMlS0fCFAswC1zym0dSOiw2vP+QpTvWiYUyI GcvQOgbdCCmi8A95NuxrTqnB+iYFp5WsDDtFIu7Ou4SWR7jXT812aK/VjeX0zL7NSDca tqoScu0/WeZNQWatNWBBFHuNWxO0BPostAsoWYR7SQw7wpSketxWXddWpIHeaCfFSbQC CV6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1si46429816pld.269.2019.05.02.08.39.21; Thu, 02 May 2019 08:39:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728825AbfEBPaq (ORCPT + 99 others); Thu, 2 May 2019 11:30:46 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:59348 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728793AbfEBPal (ORCPT ); Thu, 2 May 2019 11:30:41 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hMDfQ-00072u-CD; Thu, 02 May 2019 17:30:36 +0200 Message-ID: <5a7361bf2a6d9c33c8dac2d62a36f196a389fdec.camel@sipsolutions.net> Subject: Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag From: Johannes Berg To: Michal Kubecek , "David S. Miller" Cc: netdev@vger.kernel.org, David Ahern , linux-kernel@vger.kernel.org Date: Thu, 02 May 2019 17:30:35 +0200 In-Reply-To: <6b6ead21c5d8436470b82ab40355f6bd7dbbf14b.1556806084.git.mkubecek@suse.cz> References: <6b6ead21c5d8436470b82ab40355f6bd7dbbf14b.1556806084.git.mkubecek@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-05-02 at 16:15 +0200, Michal Kubecek wrote: > Add new validation flag NL_VALIDATE_NESTED which adds three consistency > checks of NLA_F_NESTED_FLAG: > > - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy > - the flag is not set on attributes with other policies except NLA_UNSPEC > - the flag is set on attribute passed to nla_parse_nested() > > Signed-off-by: Michal Kubecek Reviewed-by: Johannes Berg johannes