From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03F85A00C3; Wed, 7 Dec 2022 17:56:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E59BF410D7; Wed, 7 Dec 2022 17:56:32 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 2C34A40156 for ; Wed, 7 Dec 2022 17:56:31 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IKYRy98jXnIUZPr/K8jAXVP7c0oijsspXsDXLY4EyAKjrvrlTOpqym3f1tbOJeBQYx0n00Ve/3cGekEOFAc6uLxkMBQ/59xc4h0MyswXLWahO/u2EaGbRAf+edOgAPErFydTyjWSueZl7/Wpm8RHyyXfeSzb39iaJHnZ4vLBOTlFGhkr3c06f0NeNIdpzR4bjPD9lwvSiaFOf5ZsrZUh5zXeIuNMu4aui7Rb+/Ifr76LJCbLMqcSFjlWg2TnbB1cbltJubE2WarCiEPyE7jOt5kl6J5OQUfBduPoyXu2z9Scp/rIuIgHSNVMKs49ZHVmcTCNPd6Wz1LIJOB0zGKbmg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IVcm+78oTXEQWc1z9MRLZT43prQ11YJGZbVA04XbjEg=; b=jdYOnRRigctNfoYzvvPNOE8fFwdTwZ4/I0EWBuSogNL0wJSl2u0/gehL0aeo7kcliXtkVbjtol9KIpIPpkXjBwm/0OgtQFmD4TxUODrj7nQBayv/knngbymQdpm+ntfledvpdN2pyXaY8fHJNRTHI4H10S6LFukeLZysFLwVjMDWuZeMmjyYk+s+3Mgbd8uPme1AKRCn7KWFDZc4/jsemTYuX0hRBg0A4aYToLHC6sYi3n5RMu2yNqUwQ1ddKIoPulLcRDXKIbcUG9Ph3cHJM9hM66HwIdBL3ayIGQ2ETGgBXXApBfH6EP9uzAfNoUEFEVnrk9c+44J8+ThrXS0d6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IVcm+78oTXEQWc1z9MRLZT43prQ11YJGZbVA04XbjEg=; b=qLM/ANXwF98dUZhhRwsK3qVpWpDb5jFxk2S0VjzbPqLlzYR5jm3DjcpVON8pvWDmmJNDHFFzUB7fkc9WWTx3InDOyf3aZ79/OLM2JJbMCKhy8TNlXAwailYY5edmG5p94RWa08D3LcSH3Ide6Ikm4j+kPImYVM00wYOBkI6XWFk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SN7PR12MB6691.namprd12.prod.outlook.com (2603:10b6:806:271::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 16:56:29 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842%8]) with mapi id 15.20.5880.014; Wed, 7 Dec 2022 16:56:29 +0000 Message-ID: Date: Wed, 7 Dec 2022 16:56:24 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US From: Ferruh Yigit To: Junxiao Shi Cc: dev@dpdk.org References: <7046cb75-75e7-8be6-9efc-f37b70a1f2df@amd.com> Subject: Re: [PATCH v2] net/memif: change socket listener owner uid/gid In-Reply-To: <7046cb75-75e7-8be6-9efc-f37b70a1f2df@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0604.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SN7PR12MB6691:EE_ X-MS-Office365-Filtering-Correlation-Id: 513876bd-b2d6-4dfd-3c7a-08dad873fc19 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X6/Lt7CMqlIJDe0zO3oDz5O5nLOUPwpQC2h8L4juKXWrxxivRH4mzPyS77iera2vY/IBrlkB43kBil3+Mf/IpYi1yZBeBaNpmWfRr+xtseaWORo8sH9Z0EZczhFAvkRrnm88MOqDUXnXQdwFm1rK4TbvPicHbnlzSOLudIWGbnRyKYvKhvMRVqw6JcTynGT9WqyGeys/v8grRJF/u5F1qcX7HOlI1hFx7/GRqnOZYpDMttAxzglRvhopCdNDgkjREeuPzVtnVSimAESLs5/sQEqPQn0FrJdy2g6/vsHiIuI1apT6Lwzv6l2f1OOsn1iAEfF7P1Ev9uTjA4u5CKe75xdFb7vZvbXf0Z0FIYcDtHog7s/X3k6d//YBERhlmS1b5R+6K63Z8/8NQFWauOnIjd8AVF9gPYYKqh3CSIrOIQsrgWAETvZHdTh59Cz0LnJnLYKsW3/o77G0LjAZ8snAkL1X/BJ9GV6yQTdST4ja+5RNzhxNwrFdxIBETy7TZ7ChICvUe6rw/SxbX+9LyaZe66l0blxtYQ8H/AXeK/GIopoZySgSg02tnPwabIfm/gd4GsWtsNAElp9THf3/jOKreRQTrjD3/SCXe4H0Z7xGfmKxDxFcZ7kDtsEJISSamQByVp82HAGYgCL6t4B0do9WzPxHU2lfh2R2z6As/nhRHqS08pyddo+mPR73cpehFmNM0wq5KGBitcCRPw/90a3bypYCwB9HdQi+Z9krnIRXKyM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(376002)(346002)(396003)(366004)(451199015)(6486002)(478600001)(8676002)(6666004)(4326008)(2616005)(6506007)(316002)(86362001)(6916009)(186003)(6512007)(26005)(31696002)(38100700002)(66476007)(66556008)(66946007)(36756003)(83380400001)(53546011)(2906002)(31686004)(44832011)(8936002)(5660300002)(41300700001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N3NvZHRtTDhYcGlOc1cydVNzajI1WHNnVEhMZFJ2cmtjNkVraTQ1eU9xNi9w?= =?utf-8?B?UkkxMXpUQ0JWVDczaFJqMkFZeUlLbjlrYUZpekFyMytMMS9iSDRhbEhMcVhl?= =?utf-8?B?eGh3S3h2cHJoTDVaZWJBcGM5TXprOGdoendlZFRkRVU4cGlEOVM2aVFTUlJm?= =?utf-8?B?TnRFRnR5aWFZVXFVb2IxTFNXOFc2dlRETGs1V2hOWXp4OXRIZmlYa3VZcWdU?= =?utf-8?B?YW5EYm9WT1A2UWFpaVdWbnZLalB3MFBCWlVkVlBZQ09BYUxOSHVHZ1NyUXZU?= =?utf-8?B?bUJ4V3BBaUsxa3hZOWtVMXBqTXEyT3lvbXFvTkM3UHFWUm1CbVB3b1J1YUcz?= =?utf-8?B?Uj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Exchange-CrossTenant-Network-Message-Id: 513876bd-b2d6-4dfd-3c7a-08dad873fc19 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2022 16:56:29.1485 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F44Rmz6v1STWw3BGqVyl3QHQMUtw24qRVTAwdOL9BCV1RXDIyMp9QVZqZ8tpDyHN X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6691 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 12/7/2022 3:43 PM, Ferruh Yigit wrote: > On 12/7/2022 2:41 PM, Junxiao Shi wrote: >> This allows a DPDK application running with root privilege to create a >> memif socket listener with non-root owner uid and gid, which can be >> connected from client applications running without root privilege. >> > > Do you have an easy way to test unprivileged memif client? > >> Signed-off-by: Junxiao Shi > > <...> > >> @@ -1827,47 +1859,58 @@ rte_pmd_memif_probe(struct rte_vdev_device *vdev) >> flags |= ETH_MEMIF_FLAG_SOCKET_ABSTRACT; >> >> kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev), valid_arguments); >> + if (kvlist == NULL) { >> + MIF_LOG(ERR, "Invalid kvargs key"); >> + ret = -EINVAL; >> + goto exit; >> + } > > Thanks Junxiao for updating this, but since it is not really related to > this patch, can you please separate it to another patch? Also I am not sure what 'rte_kvargs_parse()' returns if there is no argument provided (that may be the case if all default values are desired). If API returns NULL for that case, above error log can be wrong, can you please check.