Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp379189rwd; Mon, 12 Jun 2023 15:16:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4x8fOox76CtCLf/wZnkgCvWiTgI0CEr/qyH2yup7ShtRn4X3qmDJ29KaC97Jsv+VOsiTvV X-Received: by 2002:a17:902:bc8a:b0:1b0:6e16:b92c with SMTP id bb10-20020a170902bc8a00b001b06e16b92cmr7430710plb.54.1686608201872; Mon, 12 Jun 2023 15:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686608201; cv=none; d=google.com; s=arc-20160816; b=s+GwyBhnEeuOJHi1rEGx1f+yg8m1FMcxmt+/rfIBmRu3kjeQt4RlGtmlQ1OjqvlIJb BMYOCnAsdMM7070J4dT1BH1SUAxIFOK8b8UqM48qPXU+lPD2czLJfYwEiBf+O/ji6VhK iWUKc3Pwn8rETyTIT/8b/aXLtwT+8ORJjn1VwybkjP1ZXX+/DOyVVEi8RL8WJrWNo1o2 0Tgf3Qk7XXdtWRe3FsZ8lx7bie9+EJZGO4tdY3sPJS2GfjWC/HNmzWr9xZ2S4lBcl9wv UoCwH1PcMvXxa0OpYxmS/BLfvRDEWccFxrSQoOprqxzMAkKN/iEQkmtE1r/rZVnVzpDY Qgpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ml29fkL0hSCj84Mk28f10C7ABSuBvDu49wOHkLyniAQ=; b=eFrQ7U606RV7S7sqO2qvgrMOqTyVFTt/3QEUaL5czMaO1h/9EaLUvcf0CsgVcwABom skKEoccySWeAeJ+JyWUMRZkQXsWrDB5+7O+6TPEWAeJNkHyEEcB7d1D9zSU5uajX2aht G8jALOeT5ts7585zBpnZiHiKDr4XxVV6a7d9HzRj6vMicDSvC3SYB+kee8w2cvXvO0oA gcOwpmkHDyu2V3JXPp/KWBHgBXXIPdMOSgx0xwU74vdruPzmkXGDjfdcA7JP7h/MLVoQ bthwu2EufIkXk+xQfYV/HP5BZDJxql1pyiB0Ovf7N37FJf8D+NTpTs7lsMHmQNFM59I+ xPUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=IuDlcxan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n2-20020a170902d2c200b001b3dad6a4d6si1269141plc.296.2023.06.12.15.16.29; Mon, 12 Jun 2023 15:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=IuDlcxan; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233893AbjFLV4R (ORCPT + 99 others); Mon, 12 Jun 2023 17:56:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237380AbjFLV4N (ORCPT ); Mon, 12 Jun 2023 17:56:13 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7211E7B for ; Mon, 12 Jun 2023 14:56:11 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-77ae75c75deso33796339f.1 for ; Mon, 12 Jun 2023 14:56:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1686606971; x=1689198971; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ml29fkL0hSCj84Mk28f10C7ABSuBvDu49wOHkLyniAQ=; b=IuDlcxanG+l9vb81mL1RI/VWq8sfXv6ES9L9wa7sHRPbxtBZmXS/jLrc/5YcoFL33L vtE+FpdW+o4LqyOdcshRpuxxcgNHVjYTUMZEY/VhjhBsYDaJ6qWiiGSyLOWs7NTg+MgG DZZ6EgKS/quWH4Vf1Rd144ZjBTdnOhVdCJkTA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686606971; x=1689198971; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ml29fkL0hSCj84Mk28f10C7ABSuBvDu49wOHkLyniAQ=; b=KoHSI/2YKFR4gPtTjOPsKIuxQm6z9B0f5hsh2uXO4Odw1Udld+BKdWfyqJShYTcqca HgsFtYkolT+k4Db1ogElkYcF3iUh+2JvGkyEOt1yK83f3xv+NCVLmqWEM3onisXvFYvQ 82v2VYMOzd8UD/biYwxIC8lDfhZ3n6tn019UgMmV3js2++cEpuhV/Cn2tMFsS5GX568z nZ3/YcY32HNKqiRIJFNtTy9ZPcleee27Sm3J+D8AlifktNLzRWkZ019eDQv9iQSgbYbk ZDur8apDuhwTCue10KnGH5zgnB0r4MH9T3YE2VGfwft2MTMszcC0BfBNQu13D2CGuf2q yAqg== X-Gm-Message-State: AC+VfDzliUeQo0Don/8PzSGVpb6wi0kjJv5IkyiJuLual0G6wch3jwcj iXSvNYvOt0yNvyUR2jjunYRE5w== X-Received: by 2002:a05:6602:15d1:b0:775:78ff:4fff with SMTP id f17-20020a05660215d100b0077578ff4fffmr8682142iow.1.1686606970969; Mon, 12 Jun 2023 14:56:10 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id o8-20020a02cc28000000b004186bea7f51sm3014623jap.54.2023.06.12.14.56.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 14:56:10 -0700 (PDT) Message-ID: <3c03e28b-8006-a4ac-30bc-6aaf83ccb5d5@linuxfoundation.org> Date: Mon, 12 Jun 2023 15:56:10 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2] selftests: prctl: Add new prctl test for PR_SET_NAME Content-Language: en-US To: Osama Muhammad Cc: shuah@kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan References: <20230607153600.15816-1-osmtendev@gmail.com> From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/10/23 07:01, Osama Muhammad wrote: > Hi all, > > I looked into it and tried to use TASK_COMM_LEN in the test. Even > though I included "linux/sched.h '', I was not able to compile the > test because it couldn't find it in the header file. > I dived deep into the issue and turns out header file mapped in > /usr/include/linux/sched.h is actually mapped to > /include/uapi/linux/sched.h[1] in linux source, > where TASK_COMM_LEN is not even defined. Instead TASK_COMM_LEN is > defined in /include/linux/sched.h which is not mapped to any header > files in > userspace(/(/usr/include/linux). > I also tried to find the TASK_COM_LEN in /usr/include/linux/ but I > couldn't find it. Following are the search results. > grep -rnw '/usr/include/linux/' -e 'TASK_COMM_LEN" > RESULTS OF COMMAND :- /usr/include/linux/taskstats.h:38:#define > TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN > Based on this information, I have two questions: > 1. Would this require a fix to move 'TASK_COMM_LEN' macro from > /include/linux/sched.h to UAPI headers /include/uapi/linux/sched.h. > 2. Is there any other way to access TASK_COMM_LEN in the selftest that > I'm not aware of? > > [1]:-https://elixir.bootlin.com/linux/v5.15.116/source/include/uapi/linux/sched.h > The best source is Linux mainline. Take a look at test files that include linux/sched.h arm64/abi/tpidr2.c is one of them. Did you install headers before compiling the test? make headers_install thanks, -- Shuah