lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111141052.yUx21WN9-lkp@intel.com>
Date:   Sun, 14 Nov 2021 10:44:59 +0800
From:   kernel test robot <lkp@...el.com>
To:     James Morse <james.morse@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [morse:mpam/snapshot/v5.15 132/139]
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2835:5: warning: no previous
 prototype for 'arm_smmu_group_set_mpam'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.15
head:   ce3629841262f725a5f3a327403fcaf0e604a85e
commit: 2f98d2f8d6ffedf8a76bc37dd864aa41cff0c9ea [132/139] untested: iommu/arm-smmu-v3: Add mpam helpers to query and set state
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 11.2.0
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?id=2f98d2f8d6ffedf8a76bc37dd864aa41cff0c9ea
        git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
        git fetch --no-tags morse mpam/snapshot/v5.15
        git checkout 2f98d2f8d6ffedf8a76bc37dd864aa41cff0c9ea
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2835:5: warning: no previous prototype for 'arm_smmu_group_set_mpam' [-Wmissing-prototypes]
    2835 | int arm_smmu_group_set_mpam(struct iommu_group *group, u16 partid, u8 pmg)
         |     ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:2886:5: warning: no previous prototype for 'arm_smmu_group_get_mpam' [-Wmissing-prototypes]
    2886 | int arm_smmu_group_get_mpam(struct iommu_group *group, u16 *partid, u8 *pmg)
         |     ^~~~~~~~~~~~~~~~~~~~~~~


vim +/arm_smmu_group_set_mpam +2835 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c

  2834	
> 2835	int arm_smmu_group_set_mpam(struct iommu_group *group, u16 partid, u8 pmg)
  2836	{
  2837		int i;
  2838		u32 sid;
  2839		__le64 *step;
  2840		unsigned long flags;
  2841		struct iommu_domain *domain;
  2842		struct arm_smmu_device *smmu;
  2843		struct arm_smmu_master *master;
  2844		struct arm_smmu_cmdq_batch cmds;
  2845		struct arm_smmu_domain *smmu_domain;
  2846		struct arm_smmu_cmdq_ent cmd = {
  2847			.opcode	= CMDQ_OP_CFGI_STE,
  2848			.cfgi	= {
  2849				.leaf	= true,
  2850			},
  2851		};
  2852	
  2853		domain = iommu_get_domain_for_group(group);
  2854		if (!domain || domain->ops != &arm_smmu_ops)
  2855			return -EINVAL;
  2856	
  2857		smmu_domain = to_smmu_domain(domain);
  2858		if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_MPAM))
  2859			return -EIO;
  2860		smmu = smmu_domain->smmu;
  2861	
  2862		spin_lock_irqsave(&smmu_domain->devices_lock, flags);
  2863		list_for_each_entry(master, &smmu_domain->devices, domain_head) {
  2864			for (i = 0; i < master->num_streams; i++) {
  2865				sid = master->streams[i].id;
  2866				step = arm_smmu_get_step_for_sid(smmu, sid);
  2867	
  2868				/* These need locking if the VMSPtr is ever used */
  2869				step[4] = FIELD_PREP(STRTAB_STE_4_PARTID, partid);
  2870				step[5] = FIELD_PREP(STRTAB_STE_5_PMG, pmg);
  2871	
  2872				cmd.cfgi.sid = sid;
  2873				arm_smmu_cmdq_batch_add(smmu, &cmds, &cmd);
  2874			}
  2875	
  2876			master->partid = partid;
  2877			master->pmg = pmg;
  2878		}
  2879		spin_unlock_irqrestore(&smmu_domain->devices_lock, flags);
  2880	
  2881		arm_smmu_cmdq_batch_submit(smmu, &cmds);
  2882	
  2883		return 0;
  2884	}
  2885	
> 2886	int arm_smmu_group_get_mpam(struct iommu_group *group, u16 *partid, u8 *pmg)
  2887	{
  2888		int err = -EINVAL;
  2889		unsigned long flags;
  2890		struct iommu_domain *domain;
  2891		struct arm_smmu_master *master;
  2892		struct arm_smmu_domain *smmu_domain;
  2893	
  2894		domain = iommu_get_domain_for_group(group);
  2895		if (!domain || domain->ops != &arm_smmu_ops)
  2896			return -EINVAL;
  2897	
  2898		smmu_domain = to_smmu_domain(domain);
  2899		if (!(smmu_domain->smmu->features & ARM_SMMU_FEAT_MPAM))
  2900			return -EIO;
  2901	
  2902		if (!partid && !pmg)
  2903			return 0;
  2904	
  2905		spin_lock_irqsave(&smmu_domain->devices_lock, flags);
  2906		master = list_first_entry_or_null(&smmu_domain->devices,
  2907						  typeof(*master), domain_head);
  2908		if (master) {
  2909			if (partid)
  2910				*partid = master->partid;
  2911			if (pmg)
  2912				*pmg = master->pmg;
  2913			err = 0;
  2914		}
  2915		spin_unlock_irqrestore(&smmu_domain->devices_lock, flags);
  2916	
  2917		return err;
  2918	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (55874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ