Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1811120pxa; Sun, 16 Aug 2020 11:58:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyf+yhMH+kDUhRW36qvRmR1E3vgeHz3jVo7lDlvJIh3yFLZsyoKcW3fcj+5UA+RN0t6h75I X-Received: by 2002:aa7:df95:: with SMTP id b21mr11324376edy.86.1597604279899; Sun, 16 Aug 2020 11:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597604279; cv=none; d=google.com; s=arc-20160816; b=Ygsn+60ETgH/+NImJrZYy6hs88La/G3NlzWWnPD57FQ4wH7e7ljoOZp8G0ITmj+Xhx XcqHPvmsYdPe7gBk0B8gBoGp5Z7WjNxRN5vejTXMOMWGpKtYAPtlLo6Erb/2gNOBLsE8 I/Fh5pzfpRgzjhN3tr1eVQ/7GAaPJDL/fsTA77vfnl80HY0uvYcCVGYJCB9tA+Hv60n0 zdjRy9+VeknhMEkNLZpuoxS/Pql9JPj8pIoPWTCY41zPG4CZ7Y64sbrquyA0RF4t4Zet g7UiFooV9BPXgdUSUnBevmkzpC44nsHAoTx2xXczFctPAaba9PwQuK6UUC3LymDu2t2a 66zQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=7eITYE/vrrdjskd5W7C36g1IzW1kO3mM/GcgPPbFuKM=; b=te7Ofw0VYTXaW3o16QnYX5Jk+dzgTp4yOJ9DilQrgkGOS9J7UKqrnBJyC8U/wnOZLD GpNgb0BlhFXNnegLtaZ0SIHpoL3GvFiCLXVq6FcN8SYD+/q/BsHMM23FWe8S+aeOgsUR jIaV/DdH74aUi8rmHP4LLJ3MQi/F/aO1mi9Ph7Sg0Hy6CFJPqQxpUJ3zeEvfqrq0wtW/ U8hEbUJkwiSk8gekbSoWDUpWX1JBrchPGtGIAX+SxQL8YqbLyxcx+BJht8DHR1ocaCTD lOFhrcmCfC8W0K/tKcdMYFjYEATEK3jpYXQUh/yKL0OEzM5GR8XTJfmUs5jq/FKl/rGE JwSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HyPaN9HR; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si9446617edo.253.2020.08.16.11.57.37; Sun, 16 Aug 2020 11:57:59 -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=@gmail.com header.s=20161025 header.b=HyPaN9HR; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728977AbgHPSPq (ORCPT + 99 others); Sun, 16 Aug 2020 14:15:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726331AbgHPSPn (ORCPT ); Sun, 16 Aug 2020 14:15:43 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 817F9C061786; Sun, 16 Aug 2020 11:15:43 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y6so6384372plt.3; Sun, 16 Aug 2020 11:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7eITYE/vrrdjskd5W7C36g1IzW1kO3mM/GcgPPbFuKM=; b=HyPaN9HRG0Mi2qCWoWQx2PWfgGD2dBMJy83WaE5KBS0qWZhAdue1tcVB+6k4X3wbWV orTzizKZM0nOpr6g5pdNxG6X1Ai7b0ECGTNhODzbnm4fz2SbWfGMTv+4yg/VWrIk8rP+ ceCz3kcdSvD3j0bjsvWCGXfJzKjViIEIq4nxZgOPIgAkKc2GUSpO+lex0X94OZ0PrQxG hkBB1LyvGbrtPdso3OLwC8NQ238kWFtR0S/A1hVYHeBR7JP1oUtMPViMsu313u56BYDG hOZVQpAIk6OtRere0FTLbQQISXsfiEmlxZ8fyHQR/Z8zkeFk7qA0UdhgHNpwdv1x7gGk qXug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7eITYE/vrrdjskd5W7C36g1IzW1kO3mM/GcgPPbFuKM=; b=e6n/iw6zj9w7gGCm6JK9egMeiRqISPgw24vviIEXs2t4eiyu9ciad+OjtvhAmZyFxi f4fNU4A8s5eL28AR+bqR+w6vUftCRcLkO4RiAnZfas2ndKu6LEmvD/R7epokkM+9e87b CSZttHdZIjDfqawV/TYxXMhou0o80VmkomnBUCEBqaA8d2NDgMSpsWOnn0gPCd6gqEWE U7q1b+A2r8Vgqo2Pw1yDJAdzgHCBRarszPwb5VmF1k/lKNPZ14wS2hxsctvcjAV6jMn4 aaizefBfiWiyu0hHpGX5hNuIvIjHdzTAw6C3cEIwgPVnQnVfuHcP4z7xPPxkBm2CeL+S urbg== X-Gm-Message-State: AOAM530jIrocG3jusvxOyLseEhIf+2fqiHm7SRIuihjO5V+adlCiy4UQ Eli6g3xV9dzttz8H4nTsCpz+DB8afl0= X-Received: by 2002:a17:90a:8c8f:: with SMTP id b15mr9660930pjo.84.1597601743152; Sun, 16 Aug 2020 11:15:43 -0700 (PDT) Received: from [10.1.10.11] (c-73-241-150-58.hsd1.ca.comcast.net. [73.241.150.58]) by smtp.gmail.com with ESMTPSA id q6sm3113098pjr.20.2020.08.16.11.15.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Aug 2020 11:15:42 -0700 (PDT) Subject: Re: [PATCH 2/2] net: socket: implement SO_DESCRIPTION To: Pascal Bouchareine , linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Andrew Morton , Alexey Dobriyan , Al Viro References: <20200815182344.7469-1-kalou@tfz.net> <20200815182344.7469-3-kalou@tfz.net> From: Eric Dumazet Message-ID: <7c910594-b297-646e-9410-f133fd62a902@gmail.com> Date: Sun, 16 Aug 2020 11:15:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200815182344.7469-3-kalou@tfz.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/15/20 11:23 AM, Pascal Bouchareine wrote: > This command attaches the zero terminated string in optval to the > socket for troubleshooting purposes. The free string is displayed in the > process fdinfo file for that fd (/proc//fdinfo/). > > One intended usage is to allow processes to self-document sockets > for netstat and friends to report > > We ignore optlen and constrain the string to a static max size > > 1) You also ignored what would happen at accept() time. Please test your patches with ASAN. 2) Also, why is that description specific to sockets ? 3) When a new socket option is added, it is customary to implement both setsockopt() and getsockopt() for things like CRIU.