Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2069263pxb; Fri, 29 Jan 2021 12:15:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHFolmI9uHPchOZE535BMIxMAhEs8lY65Mm1mnY9Z9lC1Ez/7alRAyEFxl+FaGAWeHQxUJ X-Received: by 2002:a17:906:8410:: with SMTP id n16mr6368535ejx.551.1611951308085; Fri, 29 Jan 2021 12:15:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611951308; cv=pass; d=google.com; s=arc-20160816; b=eObZo7bUeaNybSeNEhbs/ZrAFQxYqeXs8Iavx4dCbKEPPHFjAZJBRWSINxR3RBEtPQ D+xpKypr/5h4x4Mog1JPQwUrTcoxNwA1l+7PvM4sVx9g8b1ZD8AaApNKieYqZS37eDlu k6RtHMuB2UxPw/vQsGGPgOg39g/Wf1dSfRX3whRNGxr3GQuz4QsAYMEP6etAZwOnzXG/ QrBQZyRgy+Po06o+tHg1QD20ew4MpqK2veXNavsvkJcR/Gylt8Md/oz+csVR3m82pf7v WaGckKVENUnnS3EoVZbZWztkjjdTNh20ngVOZgOZGDDi9+nDWJTkDDoRpqJQtkpzAPNJ MIDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature:dkim-signature; bh=V6+5DHzwNSy3lflM3AxktO+qCwLhZljcwxoHtntZwqA=; b=cjC/UrB2MUWJOLzjuI8iSfqAKAFKGqiHSNyuBxw30gTHElO1QTntlamLbYOMUNHixL OtuGtVVFxb02tNjh6gfEBzclq6jRJlfFiT+80wbGuWbq51RBCQUrH4rVRqLHTS3dl8al pJFBKh0XpTZ8jqsQTY3T5nJdHyW+mY68xFeVfVxseHflk5L2ttW488OXTZPqYCDB4Q0S 6wZbevMHo2kFoOeLaG8j8GiNH/5zrILq6q6tPjkJDOlfaCmRVPGVZS0qS/8mG5Cz0iEX anUOWEeNpJMaIDCfecS63YgoKg7AjKr6Lt991SXgdyxC4m+b2qJqavsU8jGsnfTMk8r8 0Niw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=JBNF7JuZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ocLiH7Z9; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg6si5743059edb.485.2021.01.29.12.14.43; Fri, 29 Jan 2021 12:15:08 -0800 (PST) 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=@oracle.com header.s=corp-2020-01-29 header.b=JBNF7JuZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ocLiH7Z9; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233257AbhA2UMb (ORCPT + 99 others); Fri, 29 Jan 2021 15:12:31 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:48866 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232810AbhA2ULW (ORCPT ); Fri, 29 Jan 2021 15:11:22 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10TK8iRu012758; Fri, 29 Jan 2021 20:10:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=V6+5DHzwNSy3lflM3AxktO+qCwLhZljcwxoHtntZwqA=; b=JBNF7JuZnXOWCynJY67E6+sffFqIcqH09eFKxSQA6JcLu9umxa66A1oaWl3olOvuQFrY JhLk0sVtPeA7Ziqg9sfstd8NNxuxqsfWIdDlWOuLBfIczODlfYTwPoy0ZWLo0ZeBYRCY gka1u0R+pOHvUju3k/nh2JW6uiqQeML6qcRG+tjLP1xXL0xrA20SWvVlvy0jwjEMPCCa 9W6AwlrzeoNCRczDxh9WtRtMuHt10l5YLZseaTJP9AFS9FfbT+bWoAqPcP5BLlNuQoCR eS2IZ8dhcTmzGtzLBT27KtFHMuSXSyjP3aM/fsmS3tf15JL0CgdKrH5QkdqvomLfHZ05 ew== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 36cmf89cgk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jan 2021 20:10:28 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10TK9utQ105992; Fri, 29 Jan 2021 20:10:28 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by userp3020.oracle.com with ESMTP id 36ceuh5s9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Jan 2021 20:10:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SoXZ5VWuPJNwZgxisOf/Lk5Gm4Dx1M3z948ZvHquFp1cd/hPbut0/mGcthTV8Mmlh6EJucCNehnhPf2KiGfvjHm3/69UibIA9SD94x+GnmcxVbwiszR656z1xzSce/sLc2KWhFuMPf8XKObzc6XKQO1gwjGHvwC4YDSdwxyUYUgwZwGSBt5DM7b25vV7QZa10jhJLnZAbrFWuwmnMmmze4xgxHaFaW+i+9OLfunU7OFQxnHRd4WrV+GbUMp0qFqKKmNc9vjtNcMJRvusK2YUrcDGIlVYG5BLbxPqxrjlseQk26crD89cdF3Y8TxwkKNw00UxIqJnmqsavyiuR3mCBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V6+5DHzwNSy3lflM3AxktO+qCwLhZljcwxoHtntZwqA=; b=cUEM0ys9Qi21VXgM3/3/ZrPl3KHvh+P5SJPDP3qMz0Lz1dYf0ggTwsk0cYklZauj+5eHVcA6no5NffQb5ARIn3pr5lyt0GWpFzyECYkd8xgj2rATj9ZYt4I3fVnCbp2Okd3Dc4/6YDY6RGyz6VfBzxIj4HWFUamuvaYgrMd5mkFwz/e4+1Qo1U5b0mxXr1Qs5vXEnXkFlutISXSe1IFFzOe1rX3UOfU+7eGBMT6vSWY75RGXEJQi4VoE2XNmhk4w5K9ti3jK4JwthZ617n0PZOr0dpeoWvtBuqI+bbdKRFHwsU2wTcfi3lxNc4G1Lf4Ue4JA+H0145UOThaDHL8jCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V6+5DHzwNSy3lflM3AxktO+qCwLhZljcwxoHtntZwqA=; b=ocLiH7Z94kDhR1krGd551yv0j9UG1RXOswBBO4rF5Tjg/h4OpaLJbg8xUsyj48hz0NaExg6zcbbzlrw8ZyiQlA97NccYTpJwxb6a6zTsVYB1SIjFYG9yJ+yfo9RWx06ihtX4gORs0grVsc6VOlJNQcQthgD72/xscI8wUb2OTGQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=oracle.com; Received: from SJ0PR10MB4494.namprd10.prod.outlook.com (2603:10b6:a03:2d4::12) by SJ0PR10MB4656.namprd10.prod.outlook.com (2603:10b6:a03:2d1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16; Fri, 29 Jan 2021 20:10:25 +0000 Received: from SJ0PR10MB4494.namprd10.prod.outlook.com ([fe80::7445:f44:72aa:da07]) by SJ0PR10MB4494.namprd10.prod.outlook.com ([fe80::7445:f44:72aa:da07%4]) with mapi id 15.20.3805.017; Fri, 29 Jan 2021 20:10:25 +0000 Subject: Re: [PATCH] af_unix: Allow Unix sockets to raise SIGURG To: Jakub Kicinski Cc: "Matthew Wilcox (Oracle)" , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org, "David S. Miller" , andy.rudoff@intel.com References: <20210122150638.210444-1-willy@infradead.org> <20210125153650.18c84b1a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <23fc3de2-7541-04c9-a56f-4006a7dc773f@oracle.com> <20210129110605.54df8409@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20210129120250.269c366d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Shoaib Rao Message-ID: Date: Fri, 29 Jan 2021 12:10:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 In-Reply-To: <20210129120250.269c366d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2606:b400:8301:1010::16aa] X-ClientProxiedBy: CH2PR11CA0018.namprd11.prod.outlook.com (2603:10b6:610:54::28) To SJ0PR10MB4494.namprd10.prod.outlook.com (2603:10b6:a03:2d4::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2606:b400:400:7446:8000::12a8] (2606:b400:8301:1010::16aa) by CH2PR11CA0018.namprd11.prod.outlook.com (2603:10b6:610:54::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Fri, 29 Jan 2021 20:10:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 055cea37-d7bb-4290-5e75-08d8c491ea66 X-MS-TrafficTypeDiagnostic: SJ0PR10MB4656: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 82oE3su9Jh3HAgcKllp3kCBWy6b9trqBiX/SQ3Qb3V5D9uj4tIdVKFx9oxbdWg+K/5gSuhDs96BIPVUM5zSx6OHTaAs+Fpb9BkgmZ7llvPkBaBQhMbXI8mUOG11GTt4rrbZAUxRsXwjdFc95KyLLTDz7O0QqRQ3yEp3JHOr/JdXYPhKl+18Z3YCojV7oQnKy31qttmBFNxqoIdKlQe6xlTn1vMNJbWhLZo+UVpgZ7yxCbIWZetJuIgZAtQnrUPmpR4H01l9p0vMlsReIRElmM3QUD5smWmz1/llWaj0veTkW2CncmVtZTB44wAFpqn5CBBokK5x+2LaAy8OFqPpnsisMemeTvsTpMBBvjbFAzrkeCrQLrQboOBmJJylda4Y9NtMmmOmKyuITkZ0BVtWf3GAAd1FegxV8wvZs4d+dPPd2Aai73MjzIbHTacNxZBYN3xYKfeLkWwHsacCzof4YamPnGrhjIVitn7Z4qTyhqAHkGYinBibTGmqwEjUpWrQvJuEC5zgi1jh/fwDvK4iTvy8PX33swB+OeVPD02Cf5QuhCntFyvJGuc7HIZ94pJIc3+5gA55C74s7o9jzgp6cto7hL9YUOKyQ6VUMdgdIyck= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR10MB4494.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(346002)(136003)(39860400002)(396003)(366004)(6666004)(83380400001)(6486002)(8936002)(36756003)(54906003)(31686004)(66476007)(66556008)(316002)(66946007)(4326008)(2906002)(16526019)(5660300002)(8676002)(86362001)(53546011)(478600001)(186003)(2616005)(6916009)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?NlhXUHkxU3g1bEtZc0F6SFBtQ1FnRDl6dzR4QVVVS3ZZKzBtTEhrM0RBUXFU?= =?utf-8?B?RXI2SnVrdFJxck5tSE9ZbVoxZklzU25BRE82dVNJeU9DVktML1ZpaWNjYUpM?= =?utf-8?B?UDd0a1kvQ0dXZUxHRndsck41N1dtZ3RnSytQR2ZwZ28vVzJmZE5jRWlTSWxi?= =?utf-8?B?MU1VRDl6L1VLMHM3OFBoYjgvaTJkamNQSzRqVkw5VlArTUkzUWFybkhaaDZW?= =?utf-8?B?RzMzVUo5V0NhR3J1YngxYXN0Ynh1cmZXOXNxZDR0anl5eFRuMi9CWUEvYi90?= =?utf-8?B?eGIrWW55QTlhaWdsQnI0RmUzNGs0VW5ac2k3aE15MWRJVGg0NHVyVERDdmVU?= =?utf-8?B?cXIxeGRMVkcyb2pWeGgrSG51bkMydno3b1ZqZnk2aUw0eVpVbTNQdTFCbStN?= =?utf-8?B?YktncjdKdW00bEtS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B?Y1NwMlhtSmZ2L0IwZFVrK21KaGwxOTdidHBxdDNSMGk3S0hnWTNvVi9rOTVT?= =?utf-8?B?QzJWVzhXMjR0cklpWkcwaGhpd3F5ZGhaa2d5TjdvL21xSjZVaHJNellqWXBU?= =?utf-8?B?SGZrVk1yZ1dZMnVvOWk3d2hhLzIzb2xYSzkwdkNPL2hhSkNJN2gzdkV6UFMw?= =?utf-8?Q?q3tLWc=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 055cea37-d7bb-4290-5e75-08d8c491ea66 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB4494.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2021 20:10:25.6108 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YVcKXjMgYsPj2vMcTCn4XtrOaMPTJ4LzUmt9E6eAEByh3Ooc+kJDiLIeSq2KkCfCn2M7JazUCujsvhHfwZqaAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4656 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9879 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=998 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101290098 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9879 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 clxscore=1015 adultscore=0 priorityscore=1501 impostorscore=0 phishscore=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101290098 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/29/21 12:02 PM, Jakub Kicinski wrote: > On Fri, 29 Jan 2021 11:48:15 -0800 Shoaib Rao wrote: >>>> SO_OOBINLINE does not control the delivery of signal, It controls how >>>> OOB Byte is delivered. It may not be obvious but this change does not >>>> deliver any Byte, just a signal. So, as long as sendmsg flag contains >>>> MSG_OOB, signal will be delivered just like it happens for TCP. >>> Not as far as I can read this code. If MSG_OOB is set the data from the >>> message used to be discarded, and EOPNOTSUPP returned. Now the data gets >>> queued to the socket, and will be read inline. >> Data was discarded because the flag was not supported, this patch >> changes that but does not support any urgent data. > When you say it does not support any urgent data do you mean the > message len must be == 0 because something is checking it, or that > the code does not support its handling? > > I'm perfectly fine with the former, just point me at the check, please. The code does not care about the size of data -- All it does is that if MSG_OOB is set it will deliver the signal to the peer process irrespective of the length of the data (which can be zero length). Let's look at the code of unix_stream_sendmsg() It does the following (sent is initialized to zero) while (sent < len) {                 size = len - sent; <..> }         if (msg->msg_flags & MSG_OOB)                 sk_send_sigurg(other); Before the patch there was a check above the while loop that checked the flag and returned and error, that has been removed. Shoaib > >> OOB data has some semantics that would have to be followed and if we >> support SO_OOBINLINE we would have to support NOT SO_OOBINLINE. >> >> One can argue that we add a socket option to allow this OR just do what >> TCP does.