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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3faec3c28d82b60efaa77592632c973ed39401a5.camel@gmail.com>
Date: Mon, 27 Oct 2025 11:08:21 +0100
From: Bean Huo <huobean@...il.com>
To: kernel test robot <lkp@...el.com>, avri.altman@....com, 
	avri.altman@...disk.com, bvanassche@....org, alim.akhtar@...sung.com, 
	jejb@...ux.ibm.com, martin.petersen@...cle.com, can.guo@....qualcomm.com, 
	ulf.hansson@...aro.org, beanhuo@...ron.com, jens.wiklander@...aro.org
Cc: oe-kbuild-all@...ts.linux.dev, linux-scsi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/3] scsi: ufs: core: Add OP-TEE based RPMB driver
 for UFS devices

hallo, 

Dependency patch has been merged into:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7e8242405b94ceac6db820de7d4fd9318cbc1219,



Kind regards, 
Bean


On Mon, 2025-10-27 at 11:27 +0800, kernel test robot wrote:
> Hi Bean,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on jejb-scsi/for-next]
> [also build test ERROR on char-misc/char-misc-testing char-misc/char-misc-next
> char-misc/char-misc-linus linus/master v6.18-rc3]
> [cannot apply to mkp-scsi/for-next next-20251024]
> [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#_base_tree_information]
> 
> url:   
> https://github.com/intel-lab-lkp/linux/commits/Bean-Huo/scsi-ufs-core-Convert-string-descriptor-format-macros-to-enum/20251027-053339
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
> patch link:   
> https://lore.kernel.org/r/20251026212506.4136610-4-beanhuo%40iokpp.de
> patch subject: [PATCH v6 3/3] scsi: ufs: core: Add OP-TEE based RPMB driver
> for UFS devices
> config: x86_64-buildonly-randconfig-001-20251027
> (https://download.01.org/0day-ci/archive/20251027/202510271043.ptLcyAfD-lkp@in
> tel.com/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build):
> (https://download.01.org/0day-ci/archive/20251027/202510271043.ptLcyAfD-lkp@in
> tel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version
> of
> the same patch/commit), kindly add following tags
> > Reported-by: kernel test robot <lkp@...el.com>
> > Closes:
> > https://lore.kernel.org/oe-kbuild-all/202510271043.ptLcyAfD-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>                     from include/asm-generic/qrwlock_types.h:6,
>                     from arch/x86/include/asm/spinlock_types.h:7,
>                     from include/linux/spinlock_types_raw.h:7,
>                     from include/linux/ratelimit_types.h:7,
>                     from include/linux/printk.h:9,
>                     from include/asm-generic/bug.h:22,
>                     from arch/x86/include/asm/bug.h:108,
>                     from arch/x86/include/asm/alternative.h:9,
>                     from arch/x86/include/asm/barrier.h:5,
>                     from include/linux/list.h:11,
>                     from include/linux/module.h:12,
>                     from drivers/ufs/core/ufs-rpmb.c:13:
>    drivers/ufs/core/ufs-rpmb.c: In function 'ufs_rpmb_route_frames':
>    drivers/ufs/core/ufs-rpmb.c:72:39: error: invalid use of undefined type
> 'struct rpmb_frame'
>       72 |         req_type = be16_to_cpu(frm_out->req_resp);
>          |                                       ^~
>    include/uapi/linux/swab.h:102:54: note: in definition of macro '__swab16'
>      102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
>          |                                                      ^
>    include/linux/byteorder/generic.h:97:21: note: in expansion of macro
> '__be16_to_cpu'
>       97 | #define be16_to_cpu __be16_to_cpu
>          |                     ^~~~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:72:20: note: in expansion of macro
> 'be16_to_cpu'
>       72 |         req_type = be16_to_cpu(frm_out->req_resp);
>          |                    ^~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:75:14: error: 'RPMB_PROGRAM_KEY' undeclared
> (first use in this function)
>       75 |         case RPMB_PROGRAM_KEY:
>          |              ^~~~~~~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:75:14: note: each undeclared identifier is
> reported only once for each function it appears in
>    drivers/ufs/core/ufs-rpmb.c:76:39: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       76 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len != sizeof(struct rpmb_frame))
>          |                                       ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:76:80: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       76 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len != sizeof(struct rpmb_frame))
>         
> |                                                                             
>    ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:79:14: error: 'RPMB_GET_WRITE_COUNTER'
> undeclared (first use in this function)
>       79 |         case RPMB_GET_WRITE_COUNTER:
>          |              ^~~~~~~~~~~~~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:80:39: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       80 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len != sizeof(struct rpmb_frame))
>          |                                       ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:80:80: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       80 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len != sizeof(struct rpmb_frame))
>         
> |                                                                             
>    ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:84:14: error: 'RPMB_WRITE_DATA' undeclared
> (first use in this function)
>       84 |         case RPMB_WRITE_DATA:
>          |              ^~~~~~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:85:38: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       85 |                 if (req_len % sizeof(struct rpmb_frame) || resp_len
> != sizeof(struct rpmb_frame))
>          |                                      ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:85:79: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       85 |                 if (req_len % sizeof(struct rpmb_frame) || resp_len
> != sizeof(struct rpmb_frame))
>         
> |                                                                             
>   ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:88:14: error: 'RPMB_READ_DATA' undeclared
> (first use in this function); did you mean 'D_REAL_DATA'?
>       88 |         case RPMB_READ_DATA:
>          |              ^~~~~~~~~~~~~~
>          |              D_REAL_DATA
>    drivers/ufs/core/ufs-rpmb.c:89:39: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       89 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len % sizeof(struct rpmb_frame))
>          |                                       ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:89:79: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>       89 |                 if (req_len != sizeof(struct rpmb_frame) ||
> resp_len % sizeof(struct rpmb_frame))
>         
> |                                                                             
>   ^~~~~~
>    In file included from include/linux/string.h:382,
>                     from include/linux/bitmap.h:13,
>                     from include/linux/cpumask.h:12,
>                     from arch/x86/include/asm/cpumask.h:5,
>                     from arch/x86/include/asm/msr.h:11,
>                     from arch/x86/include/asm/tsc.h:11,
>                     from arch/x86/include/asm/timex.h:6,
>                     from include/linux/timex.h:67,
>                     from include/linux/time32.h:13,
>                     from include/linux/time.h:60,
>                     from include/linux/stat.h:19,
>                     from include/linux/module.h:13:
>    drivers/ufs/core/ufs-rpmb.c:109:43: error: invalid application of 'sizeof'
> to incomplete type 'struct rpmb_frame'
>      109 |                 memset(frm_resp, 0, sizeof(*frm_resp));
>          |                                           ^
>    include/linux/fortify-string.h:502:42: note: in definition of macro
> '__fortify_memset_chk'
>      502 |         size_t __fortify_size =
> (size_t)(size);                         \
>          |                                          ^~~~
>    drivers/ufs/core/ufs-rpmb.c:109:17: note: in expansion of macro 'memset'
>      109 |                 memset(frm_resp, 0, sizeof(*frm_resp));
>          |                 ^~~~~~
>    drivers/ufs/core/ufs-rpmb.c:110:25: error: invalid use of undefined type
> 'struct rpmb_frame'
>      110 |                 frm_resp->req_resp = cpu_to_be16(RPMB_RESULT_READ);
>          |                         ^~
>    drivers/ufs/core/ufs-rpmb.c:110:50: error: 'RPMB_RESULT_READ' undeclared
> (first use in this function)
>      110 |                 frm_resp->req_resp = cpu_to_be16(RPMB_RESULT_READ);
>          |                                                  ^~~~~~~~~~~~~~~~
>    include/uapi/linux/swab.h:102:54: note: in definition of macro '__swab16'
>      102 | #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
>          |                                                      ^
>    include/linux/byteorder/generic.h:96:21: note: in expansion of macro
> '__cpu_to_be16'
>       96 | #define cpu_to_be16 __cpu_to_be16
>          |                     ^~~~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c:110:38: note: in expansion of macro
> 'cpu_to_be16'
>      110 |                 frm_resp->req_resp = cpu_to_be16(RPMB_RESULT_READ);
>          |                                      ^~~~~~~~~~~
>    drivers/ufs/core/ufs-rpmb.c: At top level:
> > > drivers/ufs/core/ufs-rpmb.c:135:5: error: redefinition of 'ufs_rpmb_probe'
>      135 | int ufs_rpmb_probe(struct ufs_hba *hba)
>          |     ^~~~~~~~~~~~~~
>    In file included from drivers/ufs/core/ufs-rpmb.c:22:
>    drivers/ufs/core/ufshcd-priv.h:424:19: note: previous definition of
> 'ufs_rpmb_probe' with type 'int(struct ufs_hba *)'
>      424 | static inline int ufs_rpmb_probe(struct ufs_hba *hba)
>          |                   ^~~~~~~~~~~~~~
> > > drivers/ufs/core/ufs-rpmb.c:234:6: error: redefinition of
> > > 'ufs_rpmb_remove'
>      234 | void ufs_rpmb_remove(struct ufs_hba *hba)
>          |      ^~~~~~~~~~~~~~~
>    drivers/ufs/core/ufshcd-priv.h:428:20: note: previous definition of
> 'ufs_rpmb_remove' with type 'void(struct ufs_hba *)'
>      428 | static inline void ufs_rpmb_remove(struct ufs_hba *hba)
>          |                    ^~~~~~~~~~~~~~~
> 
> Kconfig warnings: (for reference only)
>    WARNING: unmet direct dependencies detected for OF_GPIO
>    Depends on [n]: GPIOLIB [=y] && OF [=n] && HAS_IOMEM [=y]
>    Selected by [y]:
>    - GPIO_TB10X [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && (ARC_PLAT_TB10X ||
> COMPILE_TEST [=y])
>    WARNING: unmet direct dependencies detected for GPIO_SYSCON
>    Depends on [n]: GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON [=y] && OF
> [=n]
>    Selected by [y]:
>    - GPIO_SAMA5D2_PIOBU [=y] && GPIOLIB [=y] && HAS_IOMEM [=y] && MFD_SYSCON
> [=y] && OF_GPIO [=y] && (ARCH_AT91 || COMPILE_TEST [=y])
>    WARNING: unmet direct dependencies detected for I2C_K1
>    Depends on [n]: I2C [=y] && HAS_IOMEM [=y] && (ARCH_SPACEMIT ||
> COMPILE_TEST [=y]) && OF [=n]
>    Selected by [m]:
>    - MFD_SPACEMIT_P1 [=m] && HAS_IOMEM [=y] && (ARCH_SPACEMIT || COMPILE_TEST
> [=y]) && I2C [=y]
> 
> 
> vim +/ufs_rpmb_probe +135 drivers/ufs/core/ufs-rpmb.c
> 
>    133  
>    134  /* UFS RPMB device registration */
>  > 135  int ufs_rpmb_probe(struct ufs_hba *hba)
>    136  {
>    137          struct ufs_rpmb_dev *ufs_rpmb, *it, *tmp;
>    138          struct rpmb_dev *rdev;
>    139          char *cid = NULL;
>    140          int region;
>    141          u32 cap;
>    142          int ret;
>    143  
>    144          if (!hba->ufs_rpmb_wlun || hba->dev_info.b_advanced_rpmb_en) {
>    145                  dev_info(hba->dev, "Skip OP-TEE RPMB registration\n");
>    146                  return -ENODEV;
>    147          }
>    148  
>    149          /* Check if device_id is available */
>    150          if (!hba->dev_info.device_id) {
>    151                  dev_err(hba->dev, "UFS Device ID not available\n");
>    152                  return -EINVAL;
>    153          }
>    154  
>    155          INIT_LIST_HEAD(&hba->rpmbs);
>    156  
>    157          struct rpmb_descr descr = {
>    158                  .type = RPMB_TYPE_UFS,
>    159                  .route_frames = ufs_rpmb_route_frames,
>    160                  .reliable_wr_count = hba->dev_info.rpmb_io_size,
>    161          };
>    162  
>    163          for (region = 0; region < ARRAY_SIZE(hba-
> >dev_info.rpmb_region_size); region++) {
>    164                  cap = hba->dev_info.rpmb_region_size[region];
>    165                  if (!cap)
>    166                          continue;
>    167  
>    168                  ufs_rpmb = devm_kzalloc(hba->dev, sizeof(*ufs_rpmb),
> GFP_KERNEL);
>    169                  if (!ufs_rpmb) {
>    170                          ret = -ENOMEM;
>    171                          goto err_out;
>    172                  }
>    173  
>    174                  ufs_rpmb->hba = hba;
>    175                  ufs_rpmb->dev.parent = &hba->ufs_rpmb_wlun-
> >sdev_gendev;
>    176                  ufs_rpmb->dev.bus = &ufs_rpmb_bus_type;
>    177                  ufs_rpmb->dev.release = ufs_rpmb_device_release;
>    178                  dev_set_name(&ufs_rpmb->dev, "ufs_rpmb%d", region);
>    179  
>    180                  /* Set driver data BEFORE device_register */
>    181                  dev_set_drvdata(&ufs_rpmb->dev, ufs_rpmb);
>    182  
>    183                  ret = device_register(&ufs_rpmb->dev);
>    184                  if (ret) {
>    185                          dev_err(hba->dev, "Failed to register UFS RPMB
> device %d\n", region);
>    186                          put_device(&ufs_rpmb->dev);
>    187                          goto err_out;
>    188                  }
>    189  
>    190                  /* Create unique ID by appending region number to
> device_id */
>    191                  cid = kasprintf(GFP_KERNEL, "%s-R%d", hba-
> >dev_info.device_id, region);
>    192                  if (!cid) {
>    193                          device_unregister(&ufs_rpmb->dev);
>    194                          ret = -ENOMEM;
>    195                          goto err_out;
>    196                  }
>    197  
>    198                  descr.dev_id = cid;
>    199                  descr.dev_id_len = strlen(cid);
>    200                  descr.capacity = cap;
>    201  
>    202                  /* Register RPMB device */
>    203                  rdev = rpmb_dev_register(&ufs_rpmb->dev, &descr);
>    204                  if (IS_ERR(rdev)) {
>    205                          dev_err(hba->dev, "Failed to register UFS RPMB
> device.\n");
>    206                          device_unregister(&ufs_rpmb->dev);
>    207                          ret = PTR_ERR(rdev);
>    208                          goto err_out;
>    209                  }
>    210  
>    211                  kfree(cid);
>    212                  cid = NULL;
>    213  
>    214                  ufs_rpmb->rdev = rdev;
>    215                  ufs_rpmb->region_id = region;
>    216  
>    217                  list_add_tail(&ufs_rpmb->node, &hba->rpmbs);
>    218  
>    219                  dev_info(hba->dev, "UFS RPMB region %d registered
> (capacity=%u)\n", region, cap);
>    220          }
>    221  
>    222          return 0;
>    223  err_out:
>    224          kfree(cid);
>    225          list_for_each_entry_safe(it, tmp, &hba->rpmbs, node) {
>    226                  list_del(&it->node);
>    227                  device_unregister(&it->dev);
>    228          }
>    229  
>    230          return ret;
>    231  }
>    232  
>    233  /* UFS RPMB remove handler */
>  > 234  void ufs_rpmb_remove(struct ufs_hba *hba)
>    235  {
>    236          struct ufs_rpmb_dev *ufs_rpmb, *tmp;
>    237  
>    238          if (list_empty(&hba->rpmbs))
>    239                  return;
>    240  
>    241          /* Remove all registered RPMB devices */
>    242          list_for_each_entry_safe(ufs_rpmb, tmp, &hba->rpmbs, node) {
>    243                  dev_info(hba->dev, "Removing UFS RPMB region %d\n",
> ufs_rpmb->region_id);
>    244                  /* Remove from list first */
>    245                  list_del(&ufs_rpmb->node);
>    246                  /* Unregister device */
>    247                  device_unregister(&ufs_rpmb->dev);
>    248          }
>    249  
>    250          dev_info(hba->dev, "All UFS RPMB devices unregistered\n");
>    251  }
>    252  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ