From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF38C433F5 for ; Mon, 13 Dec 2021 19:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y7OYPsMeZoBlRiquIVfNYvhGPOZDqSxLQSCFjPeAVPQ=; b=OPCzug/6MyYa4W 9wiPsnvk25K/QqStFf4tRGuWbJVa12K/JuAJ4wWrVKkFpNiSk9BYsMayjlac+WyhLIFM8tIWLNIb5 X3ntonC/wfwb96d7xlyRaBl2b8gY572llmKqQXiODv3Y8m7wMBXenZ132Kj6HjMbnwJSbH5bRPnPl BL3x//CUTAyRB4LE2Xi6ohqFvaveh336FVR6SGkS6JjZF/lQaQKncCLM1dPod85Ic2w8IqmpFZmIz b7ozoxVVJeCoGHCp1Vk8diqiEPnd4U8VA/U30q5L9EMrYRp1NcUeLkHAz1KkaP01M5oa0OFFbTSfK QEkKjKsg4+HSPWD8XY4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwqot-00B6Jx-Pb; Mon, 13 Dec 2021 19:17:07 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwqop-00B6Hn-6O for linux-arm-kernel@lists.infradead.org; Mon, 13 Dec 2021 19:17:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639423023; x=1670959023; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bp3F5ril2o2hFHFGNs2ohZXce1AXnq3rH4wu9NdRWF4=; b=lkV2NpMfLPCaW7ivZAtDvpmMQIFuXkkMDuJ/a/SH1GE3j2A6p4I+kvuJ BA1cLWR8kxYPB3VitYI138olAOHewbl1XO5i1lShmQ7HD2ExsdpN1TJU3 /enbKS9OTu71aFsNK3XVVExu3hJzIVemx4sVD8BBcvX0+I/R4GosfxeL8 n0rD81Grz1CuXrEryj+XmmOD6fMmHODvVrc31Hr7TeIHjCfAi89dopvGR wj5r1TrjnHPZUEKSQaVVvPajNsYLcNBfCibeYsK8aKRxxxKas9NwogrmQ 7GH5RzTLrUEqEDfMhI2izOSf7ZjqtWddNTgMF2ftO6CsHnsW2o6QpMwwI A==; X-IronPort-AV: E=McAfee;i="6200,9189,10197"; a="226085385" X-IronPort-AV: E=Sophos;i="5.88,203,1635231600"; d="scan'208";a="226085385" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2021 11:16:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,203,1635231600"; d="scan'208";a="464762074" Received: from lkp-server02.sh.intel.com (HELO 9e1e9f9b3bcb) ([10.239.97.151]) by orsmga006.jf.intel.com with ESMTP; 13 Dec 2021 11:16:54 -0800 Received: from kbuild by 9e1e9f9b3bcb with local (Exim 4.92) (envelope-from ) id 1mwqof-0006yR-Bq; Mon, 13 Dec 2021 19:16:53 +0000 Date: Tue, 14 Dec 2021 03:16:42 +0800 From: kernel test robot To: Leo Yan , Mathieu Poirier , Suzuki K Poulose , Mike Leach , Alexander Shishkin , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, Leo Yan Subject: Re: [PATCH v2 4/4] coresight: etm3x: Don't trace PID for non-root PID namespace Message-ID: <202112140344.viPmOWp6-lkp@intel.com> References: <20211213121323.1887180-5-leo.yan@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211213121323.1887180-5-leo.yan@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211213_111703_316419_9B45EA69 X-CRM114-Status: GOOD ( 19.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Leo, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v5.16-rc5] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Leo-Yan/coresight-etm-Correct-PID-tracing-for-non-root-namespace/20211213-201632 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2585cf9dfaaddf00b069673f27bb3f8530e2039c config: arm-buildonly-randconfig-r003-20211213 (https://download.01.org/0day-ci/archive/20211214/202112140344.viPmOWp6-lkp@intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/0day-ci/linux/commit/81d5f47788c40d34c8159d64d4505eb485254e8f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Leo-Yan/coresight-etm-Correct-PID-tracing-for-non-root-namespace/20211213-201632 git checkout 81d5f47788c40d34c8159d64d4505eb485254e8f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/hwtracing/coresight/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/hwtracing/coresight/coresight-etm3x-core.c:344:7: error: implicit declaration of function 'task_is_in_init_pid_ns' [-Werror,-Wimplicit-function-declaration] if (!task_is_in_init_pid_ns(current)) ^ 1 error generated. vim +/task_is_in_init_pid_ns +344 drivers/hwtracing/coresight/coresight-etm3x-core.c 301 302 #define ETM3X_SUPPORTED_OPTIONS (ETMCR_CYC_ACC | \ 303 ETMCR_TIMESTAMP_EN | \ 304 ETMCR_RETURN_STACK) 305 306 static int etm_parse_event_config(struct etm_drvdata *drvdata, 307 struct perf_event *event) 308 { 309 struct etm_config *config = &drvdata->config; 310 struct perf_event_attr *attr = &event->attr; 311 312 if (!attr) 313 return -EINVAL; 314 315 /* Clear configuration from previous run */ 316 memset(config, 0, sizeof(struct etm_config)); 317 318 if (attr->exclude_kernel) 319 config->mode = ETM_MODE_EXCL_KERN; 320 321 if (attr->exclude_user) 322 config->mode = ETM_MODE_EXCL_USER; 323 324 /* Always start from the default config */ 325 etm_set_default(config); 326 327 /* 328 * By default the tracers are configured to trace the whole address 329 * range. Narrow the field only if requested by user space. 330 */ 331 if (config->mode) 332 etm_config_trace_mode(config); 333 334 /* 335 * At this time only cycle accurate, return stack and timestamp 336 * options are available. 337 */ 338 if (attr->config & ~ETM3X_SUPPORTED_OPTIONS) 339 return -EINVAL; 340 341 config->ctrl = attr->config; 342 343 /* Don't trace contextID when runs in non-root PID namespace */ > 344 if (!task_is_in_init_pid_ns(current)) 345 config->ctrl &= ~ETMCR_CTXID_SIZE; 346 347 /* 348 * Possible to have cores with PTM (supports ret stack) and ETM 349 * (never has ret stack) on the same SoC. So if we have a request 350 * for return stack that can't be honoured on this core then 351 * clear the bit - trace will still continue normally 352 */ 353 if ((config->ctrl & ETMCR_RETURN_STACK) && 354 !(drvdata->etmccer & ETMCCER_RETSTACK)) 355 config->ctrl &= ~ETMCR_RETURN_STACK; 356 357 return 0; 358 } 359 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel