Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3065947ybb; Sun, 12 Apr 2020 23:07:30 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/KjLG+Caqp+5Puem/yhJsA7SYYEqR6sU4bJpizExrDX9lUtNdu2i9To38w8sw9BFG5fTN X-Received: by 2002:a05:620a:127c:: with SMTP id b28mr15088258qkl.317.1586758050309; Sun, 12 Apr 2020 23:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586758050; cv=none; d=google.com; s=arc-20160816; b=OZ5Z1Y4WztCM4cnjJhj79aB/F2dZQVNfkZQWQPsskCg163iyMmIJGB3fcYp+r7ZrYo QJgmkCAMQydmnryzB4PXhF2s/u9ptXIOlNCm2KRsFRG59KjoencipKX9U0o8YysrHaMq 4oyoC+psQTuqLUljV3Vq4v8lEUkuXf4SL31ZlyPS/xZKxTxGk0O35b53lWPSyZlgkHgy W9nDz42uluK4Bvu+V7Gjb6p4pMs2M5zPQtEMQUd8iDbOpFpWa6u4CZMtmtGptE6xdM3O f9z/WUEzkbDC65tYOMvf99sf+hN5iqzd9irbBUczZzeZxI4aWA6zSG43FiJSwSzHpTBA blrw== 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:organization:message-id:date:subject:cc:to :from; bh=pWI1MW6ip7YRKaCirOx4ehLLwQb9p7nhxVjbFeGWVhI=; b=jReYP7/vwQZk6DsKIVRSccYA9fMLSAeqZutRbw3a7sOqBM9lipvlKOxcS68hKxV4bn Q9F1QHLnJdq/so+im+D6CrGE2YBNW3L4Y9CvJNikwyFINdCwcVEawDfU2D6NPwC00+qu 4cN9DqI7fhh5nLIHsGAkCMsjH20guvlz1ThU/DTaCztI+jvoeDY3HMofCliqLBwjU+0V M3FdOdvWAK1Cvor7myzQVynPWnP+dQzJoI/SrUkzsJWHAc8DZ9sHTehUzfeb+PHnb11U KCxOSfxk9LtB0Oa9JlPsjjuFQReGtQMdcPBfgUdezU1/L3KCSI5D3ebC6RUOrAIgfo7T IQpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org ([209.132.180.67]) by mx.google.com with ESMTP id f52si2517017qta.379.2020.04.12.23.07.16; Sun, 12 Apr 2020 23:07:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.132.180.67 is neither permitted nor denied by best guess record for domain of linux-kernel-owner@vger.kernel.org) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbgDMGCE convert rfc822-to-8bit (ORCPT + 99 others); Mon, 13 Apr 2020 02:02:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.18]:46176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgDMGCE (ORCPT ); Mon, 13 Apr 2020 02:02:04 -0400 Received: from ns207790.ip-94-23-215.eu (poy.remlab.net [94.23.215.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28410C0A3BE0 for ; Sun, 12 Apr 2020 23:02:02 -0700 (PDT) Received: from basile.remlab.net (87-92-31-51.bb.dnainternet.fi [87.92.31.51]) (Authenticated sender: remi) by ns207790.ip-94-23-215.eu (Postfix) with ESMTPSA id A829D5FC58; Mon, 13 Apr 2020 08:01:59 +0200 (CEST) From: =?ISO-8859-1?Q?R=E9mi?= Denis-Courmont To: Vito Caputo Cc: netdev@vger.kernel.org, courmisch@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org Subject: Re: kernel BUG at net/phonet/socket.c:LINE! Date: Mon, 13 Apr 2020 09:01:58 +0300 Message-ID: <2585533.60Y2ixrnJE@basile.remlab.net> Organization: Remlab In-Reply-To: <20200413054914.euz7g2fcxsr74lfm@shells.gnugeneration.com> References: <00000000000062b41d05a2ea82b0@google.com> <1806223.auBmcZeozp@basile.remlab.net> <20200413054914.euz7g2fcxsr74lfm@shells.gnugeneration.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le maanantaina 13. huhtikuuta 2020, 8.49.14 EEST Vito Caputo a écrit : > > If we are to distinguish the two error scenarii, then it's the rebind > > case > > that needs a different error, but EINVAL is consistent with INET. > > Isn't the existing code is bugged if treating -EINVAL as valid and a rebind? > > The invalid size will return a NULL sobject but -EINVAL, triggering the > BUG_ON. How do you pass an invalid size? It's a constant `sizeof(struct sockaddr_pn)` in that code path. -- Rémi Denis-Courmont Tapiolan uusi kaupunki, Uudenmaan tasavalta