drivers/irqchip/irq-xilinx-intc.c:127:14: warning: no previous prototype for function 'xintc_get_irq'
by kernel test robot
Hi Robert,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dfa377c35d70c31139b1274ec49f87d380996c42
commit: debf69cfd4c618c7036a13cc4edd1faf87ce7d53 irqchip/xilinx: Expose Kconfig option for Zynq/ZynqMP
date: 4 months ago
config: arm64-randconfig-r026-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1f7b25ea76a925aca690da28de9d78db7ca99d0c)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout debf69cfd4c618c7036a13cc4edd1faf87ce7d53
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/irqchip/irq-xilinx-intc.c:127:14: warning: no previous prototype for function 'xintc_get_irq' [-Wmissing-prototypes]
unsigned int xintc_get_irq(void)
^
drivers/irqchip/irq-xilinx-intc.c:127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int xintc_get_irq(void)
^
static
1 warning generated.
vim +/xintc_get_irq +127 drivers/irqchip/irq-xilinx-intc.c
67862a3c47fcfc Mubin Sayyed 2020-03-17 126
4cea749d56bec9 Marc Zyngier 2020-03-30 @127 unsigned int xintc_get_irq(void)
4cea749d56bec9 Marc Zyngier 2020-03-30 128 {
4cea749d56bec9 Marc Zyngier 2020-03-30 129 unsigned int irq = -1;
4cea749d56bec9 Marc Zyngier 2020-03-30 130 u32 hwirq;
4cea749d56bec9 Marc Zyngier 2020-03-30 131
4cea749d56bec9 Marc Zyngier 2020-03-30 132 hwirq = xintc_read(primary_intc, IVR);
4cea749d56bec9 Marc Zyngier 2020-03-30 133 if (hwirq != -1U)
4cea749d56bec9 Marc Zyngier 2020-03-30 134 irq = irq_find_mapping(primary_intc->root_domain, hwirq);
4cea749d56bec9 Marc Zyngier 2020-03-30 135
4cea749d56bec9 Marc Zyngier 2020-03-30 136 pr_debug("irq-xilinx: hwirq=%d, irq=%d\n", hwirq, irq);
4cea749d56bec9 Marc Zyngier 2020-03-30 137
4cea749d56bec9 Marc Zyngier 2020-03-30 138 return irq;
4cea749d56bec9 Marc Zyngier 2020-03-30 139 }
4cea749d56bec9 Marc Zyngier 2020-03-30 140
:::::: The code at line 127 was first introduced by commit
:::::: 4cea749d56bec9409f3bd126d2b2f949dc6c66e2 Revert "irqchip/xilinx: Enable generic irq multi handler"
:::::: TO: Marc Zyngier <maz(a)kernel.org>
:::::: CC: Marc Zyngier <maz(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[kees:kspp/memcpy/next-20210803/v2-devel 42/86] drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210803/v2-devel
head: 4752984fc24104f399e70f99d48afa047d86a381
commit: 21b2d9d06a3a4d6bfafc9cfe88fcfa1a48e95162 [42/86] fortify: Detect struct member overflows in memcpy() at compile-time
config: x86_64-randconfig-s022-20210814 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210803/v2-devel
git checkout 21b2d9d06a3a4d6bfafc9cfe88fcfa1a48e95162
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/acpi/apei/erst.c:272:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *src @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:272:13: sparse: expected void *src
drivers/acpi/apei/erst.c:272:13: sparse: got void [noderef] __iomem *
drivers/acpi/apei/erst.c:275:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *dst @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:275:13: sparse: expected void *dst
drivers/acpi/apei/erst.c:275:13: sparse: got void [noderef] __iomem *
drivers/acpi/apei/erst.c:277:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *src @@
drivers/acpi/apei/erst.c:277:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:277:25: sparse: got void *src
drivers/acpi/apei/erst.c:283:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *src @@
drivers/acpi/apei/erst.c:283:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:283:17: sparse: got void *src
drivers/acpi/apei/erst.c:284:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *dst @@
drivers/acpi/apei/erst.c:284:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/acpi/apei/erst.c:284:17: sparse: got void *dst
>> drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void const *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
>> drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void const *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:792:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void * @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:792:9: sparse: expected void *
drivers/acpi/apei/erst.c:792:9: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:793:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cper_record_header *rcd_erange @@ got void [noderef] __iomem *static [toplevel] vaddr @@
drivers/acpi/apei/erst.c:793:20: sparse: expected struct cper_record_header *rcd_erange
drivers/acpi/apei/erst.c:793:20: sparse: got void [noderef] __iomem *static [toplevel] vaddr
drivers/acpi/apei/erst.c:830:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct cper_record_header *rcd_tmp @@ got void [noderef] __iomem * @@
drivers/acpi/apei/erst.c:830:17: sparse: expected struct cper_record_header *rcd_tmp
drivers/acpi/apei/erst.c:830:17: sparse: got void [noderef] __iomem *
vim +792 drivers/acpi/apei/erst.c
a08f82d08053fb Huang Ying 2010-05-18 766
a08f82d08053fb Huang Ying 2010-05-18 767 int erst_write(const struct cper_record_header *record)
a08f82d08053fb Huang Ying 2010-05-18 768 {
a08f82d08053fb Huang Ying 2010-05-18 769 int rc;
a08f82d08053fb Huang Ying 2010-05-18 770 unsigned long flags;
a08f82d08053fb Huang Ying 2010-05-18 771 struct cper_record_header *rcd_erange;
a08f82d08053fb Huang Ying 2010-05-18 772
a08f82d08053fb Huang Ying 2010-05-18 773 if (erst_disable)
a08f82d08053fb Huang Ying 2010-05-18 774 return -ENODEV;
a08f82d08053fb Huang Ying 2010-05-18 775
a08f82d08053fb Huang Ying 2010-05-18 776 if (memcmp(record->signature, CPER_SIG_RECORD, CPER_SIG_SIZE))
a08f82d08053fb Huang Ying 2010-05-18 777 return -EINVAL;
a08f82d08053fb Huang Ying 2010-05-18 778
a08f82d08053fb Huang Ying 2010-05-18 779 if (erst_erange.attr & ERST_RANGE_NVRAM) {
3b38bb5f7f0635 Huang Ying 2010-12-02 780 if (!raw_spin_trylock_irqsave(&erst_lock, flags))
a08f82d08053fb Huang Ying 2010-05-18 781 return -EBUSY;
a08f82d08053fb Huang Ying 2010-05-18 782 rc = __erst_write_to_nvram(record);
3b38bb5f7f0635 Huang Ying 2010-12-02 783 raw_spin_unlock_irqrestore(&erst_lock, flags);
a08f82d08053fb Huang Ying 2010-05-18 784 return rc;
a08f82d08053fb Huang Ying 2010-05-18 785 }
a08f82d08053fb Huang Ying 2010-05-18 786
a08f82d08053fb Huang Ying 2010-05-18 787 if (record->record_length > erst_erange.size)
a08f82d08053fb Huang Ying 2010-05-18 788 return -EINVAL;
a08f82d08053fb Huang Ying 2010-05-18 789
3b38bb5f7f0635 Huang Ying 2010-12-02 790 if (!raw_spin_trylock_irqsave(&erst_lock, flags))
a08f82d08053fb Huang Ying 2010-05-18 791 return -EBUSY;
a08f82d08053fb Huang Ying 2010-05-18 @792 memcpy(erst_erange.vaddr, record, record->record_length);
a08f82d08053fb Huang Ying 2010-05-18 793 rcd_erange = erst_erange.vaddr;
a08f82d08053fb Huang Ying 2010-05-18 794 /* signature for serialization system */
a08f82d08053fb Huang Ying 2010-05-18 795 memcpy(&rcd_erange->persistence_information, "ER", 2);
a08f82d08053fb Huang Ying 2010-05-18 796
a08f82d08053fb Huang Ying 2010-05-18 797 rc = __erst_write_to_storage(0);
3b38bb5f7f0635 Huang Ying 2010-12-02 798 raw_spin_unlock_irqrestore(&erst_lock, flags);
a08f82d08053fb Huang Ying 2010-05-18 799
a08f82d08053fb Huang Ying 2010-05-18 800 return rc;
a08f82d08053fb Huang Ying 2010-05-18 801 }
a08f82d08053fb Huang Ying 2010-05-18 802 EXPORT_SYMBOL_GPL(erst_write);
a08f82d08053fb Huang Ying 2010-05-18 803
:::::: The code at line 792 was first introduced by commit
:::::: a08f82d08053fb6e3aa3635c2c26456d96337c8b ACPI, APEI, Error Record Serialization Table (ERST) support
:::::: TO: Huang Ying <ying.huang(a)intel.com>
:::::: CC: Len Brown <len.brown(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *'
by kernel test robot
Hi Fabio,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dfa377c35d70c31139b1274ec49f87d380996c42
commit: 0ab785c894e618587e83bb67e8a8e96649868ad1 dmaengine: imx-dma: Remove unused .id_table
date: 9 months ago
config: arm64-randconfig-r024-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1f7b25ea76a925aca690da28de9d78db7ca99d0c)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0ab785c894e618587e83bb67e8a8e96649868ad1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
imxdma->devtype = (enum imx_dma_type)of_device_get_match_data(&pdev->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +1048 drivers/dma/imx-dma.c
1035
1036 static int __init imxdma_probe(struct platform_device *pdev)
1037 {
1038 struct imxdma_engine *imxdma;
1039 struct resource *res;
1040 int ret, i;
1041 int irq, irq_err;
1042
1043 imxdma = devm_kzalloc(&pdev->dev, sizeof(*imxdma), GFP_KERNEL);
1044 if (!imxdma)
1045 return -ENOMEM;
1046
1047 imxdma->dev = &pdev->dev;
> 1048 imxdma->devtype = (enum imx_dma_type)of_device_get_match_data(&pdev->dev);
1049
1050 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1051 imxdma->base = devm_ioremap_resource(&pdev->dev, res);
1052 if (IS_ERR(imxdma->base))
1053 return PTR_ERR(imxdma->base);
1054
1055 irq = platform_get_irq(pdev, 0);
1056 if (irq < 0)
1057 return irq;
1058
1059 imxdma->dma_ipg = devm_clk_get(&pdev->dev, "ipg");
1060 if (IS_ERR(imxdma->dma_ipg))
1061 return PTR_ERR(imxdma->dma_ipg);
1062
1063 imxdma->dma_ahb = devm_clk_get(&pdev->dev, "ahb");
1064 if (IS_ERR(imxdma->dma_ahb))
1065 return PTR_ERR(imxdma->dma_ahb);
1066
1067 ret = clk_prepare_enable(imxdma->dma_ipg);
1068 if (ret)
1069 return ret;
1070 ret = clk_prepare_enable(imxdma->dma_ahb);
1071 if (ret)
1072 goto disable_dma_ipg_clk;
1073
1074 /* reset DMA module */
1075 imx_dmav1_writel(imxdma, DCR_DRST, DMA_DCR);
1076
1077 if (is_imx1_dma(imxdma)) {
1078 ret = devm_request_irq(&pdev->dev, irq,
1079 dma_irq_handler, 0, "DMA", imxdma);
1080 if (ret) {
1081 dev_warn(imxdma->dev, "Can't register IRQ for DMA\n");
1082 goto disable_dma_ahb_clk;
1083 }
1084 imxdma->irq = irq;
1085
1086 irq_err = platform_get_irq(pdev, 1);
1087 if (irq_err < 0) {
1088 ret = irq_err;
1089 goto disable_dma_ahb_clk;
1090 }
1091
1092 ret = devm_request_irq(&pdev->dev, irq_err,
1093 imxdma_err_handler, 0, "DMA", imxdma);
1094 if (ret) {
1095 dev_warn(imxdma->dev, "Can't register ERRIRQ for DMA\n");
1096 goto disable_dma_ahb_clk;
1097 }
1098 imxdma->irq_err = irq_err;
1099 }
1100
1101 /* enable DMA module */
1102 imx_dmav1_writel(imxdma, DCR_DEN, DMA_DCR);
1103
1104 /* clear all interrupts */
1105 imx_dmav1_writel(imxdma, (1 << IMX_DMA_CHANNELS) - 1, DMA_DISR);
1106
1107 /* disable interrupts */
1108 imx_dmav1_writel(imxdma, (1 << IMX_DMA_CHANNELS) - 1, DMA_DIMR);
1109
1110 INIT_LIST_HEAD(&imxdma->dma_device.channels);
1111
1112 dma_cap_set(DMA_SLAVE, imxdma->dma_device.cap_mask);
1113 dma_cap_set(DMA_CYCLIC, imxdma->dma_device.cap_mask);
1114 dma_cap_set(DMA_MEMCPY, imxdma->dma_device.cap_mask);
1115 dma_cap_set(DMA_INTERLEAVE, imxdma->dma_device.cap_mask);
1116
1117 /* Initialize 2D global parameters */
1118 for (i = 0; i < IMX_DMA_2D_SLOTS; i++)
1119 imxdma->slots_2d[i].count = 0;
1120
1121 spin_lock_init(&imxdma->lock);
1122
1123 /* Initialize channel parameters */
1124 for (i = 0; i < IMX_DMA_CHANNELS; i++) {
1125 struct imxdma_channel *imxdmac = &imxdma->channel[i];
1126
1127 if (!is_imx1_dma(imxdma)) {
1128 ret = devm_request_irq(&pdev->dev, irq + i,
1129 dma_irq_handler, 0, "DMA", imxdma);
1130 if (ret) {
1131 dev_warn(imxdma->dev, "Can't register IRQ %d "
1132 "for DMA channel %d\n",
1133 irq + i, i);
1134 goto disable_dma_ahb_clk;
1135 }
1136
1137 imxdmac->irq = irq + i;
1138 timer_setup(&imxdmac->watchdog, imxdma_watchdog, 0);
1139 }
1140
1141 imxdmac->imxdma = imxdma;
1142
1143 INIT_LIST_HEAD(&imxdmac->ld_queue);
1144 INIT_LIST_HEAD(&imxdmac->ld_free);
1145 INIT_LIST_HEAD(&imxdmac->ld_active);
1146
1147 tasklet_setup(&imxdmac->dma_tasklet, imxdma_tasklet);
1148 imxdmac->chan.device = &imxdma->dma_device;
1149 dma_cookie_init(&imxdmac->chan);
1150 imxdmac->channel = i;
1151
1152 /* Add the channel to the DMAC list */
1153 list_add_tail(&imxdmac->chan.device_node,
1154 &imxdma->dma_device.channels);
1155 }
1156
1157 imxdma->dma_device.dev = &pdev->dev;
1158
1159 imxdma->dma_device.device_alloc_chan_resources = imxdma_alloc_chan_resources;
1160 imxdma->dma_device.device_free_chan_resources = imxdma_free_chan_resources;
1161 imxdma->dma_device.device_tx_status = imxdma_tx_status;
1162 imxdma->dma_device.device_prep_slave_sg = imxdma_prep_slave_sg;
1163 imxdma->dma_device.device_prep_dma_cyclic = imxdma_prep_dma_cyclic;
1164 imxdma->dma_device.device_prep_dma_memcpy = imxdma_prep_dma_memcpy;
1165 imxdma->dma_device.device_prep_interleaved_dma = imxdma_prep_dma_interleaved;
1166 imxdma->dma_device.device_config = imxdma_config;
1167 imxdma->dma_device.device_terminate_all = imxdma_terminate_all;
1168 imxdma->dma_device.device_issue_pending = imxdma_issue_pending;
1169
1170 platform_set_drvdata(pdev, imxdma);
1171
1172 imxdma->dma_device.copy_align = DMAENGINE_ALIGN_4_BYTES;
1173 dma_set_max_seg_size(imxdma->dma_device.dev, 0xffffff);
1174
1175 ret = dma_async_device_register(&imxdma->dma_device);
1176 if (ret) {
1177 dev_err(&pdev->dev, "unable to register\n");
1178 goto disable_dma_ahb_clk;
1179 }
1180
1181 if (pdev->dev.of_node) {
1182 ret = of_dma_controller_register(pdev->dev.of_node,
1183 imxdma_xlate, imxdma);
1184 if (ret) {
1185 dev_err(&pdev->dev, "unable to register of_dma_controller\n");
1186 goto err_of_dma_controller;
1187 }
1188 }
1189
1190 return 0;
1191
1192 err_of_dma_controller:
1193 dma_async_device_unregister(&imxdma->dma_device);
1194 disable_dma_ahb_clk:
1195 clk_disable_unprepare(imxdma->dma_ahb);
1196 disable_dma_ipg_clk:
1197 clk_disable_unprepare(imxdma->dma_ipg);
1198 return ret;
1199 }
1200
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
kernel/sys_ni.c:71:1: warning: no previous prototype for function '__arm64_sys_epoll_pwait2'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: dfa377c35d70c31139b1274ec49f87d380996c42
commit: b0a0c2615f6f199a656ed8549d7dce625d77aa77 epoll: wire up syscall epoll_pwait2
date: 8 months ago
config: arm64-randconfig-r011-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 1f7b25ea76a925aca690da28de9d78db7ca99d0c)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b0a0c2615f6f199a656ed8549d7dce625d77aa77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:42:1: note: expanded from here
__arm64_sys_io_uring_setup
^
kernel/sys_ni.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:52:1: warning: no previous prototype for function '__arm64_sys_io_uring_enter' [-Wmissing-prototypes]
COND_SYSCALL(io_uring_enter);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:43:1: note: expanded from here
__arm64_sys_io_uring_enter
^
kernel/sys_ni.c:52:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:53:1: warning: no previous prototype for function '__arm64_sys_io_uring_register' [-Wmissing-prototypes]
COND_SYSCALL(io_uring_register);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:44:1: note: expanded from here
__arm64_sys_io_uring_register
^
kernel/sys_ni.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:60:1: warning: no previous prototype for function '__arm64_sys_lookup_dcookie' [-Wmissing-prototypes]
COND_SYSCALL(lookup_dcookie);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:45:1: note: expanded from here
__arm64_sys_lookup_dcookie
^
kernel/sys_ni.c:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:64:1: warning: no previous prototype for function '__arm64_sys_eventfd2' [-Wmissing-prototypes]
COND_SYSCALL(eventfd2);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:50:1: note: expanded from here
__arm64_sys_eventfd2
^
kernel/sys_ni.c:64:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:67:1: warning: no previous prototype for function '__arm64_sys_epoll_create1' [-Wmissing-prototypes]
COND_SYSCALL(epoll_create1);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:51:1: note: expanded from here
__arm64_sys_epoll_create1
^
kernel/sys_ni.c:67:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:68:1: warning: no previous prototype for function '__arm64_sys_epoll_ctl' [-Wmissing-prototypes]
COND_SYSCALL(epoll_ctl);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:52:1: note: expanded from here
__arm64_sys_epoll_ctl
^
kernel/sys_ni.c:68:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:69:1: warning: no previous prototype for function '__arm64_sys_epoll_pwait' [-Wmissing-prototypes]
COND_SYSCALL(epoll_pwait);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:53:1: note: expanded from here
__arm64_sys_epoll_pwait
^
kernel/sys_ni.c:69:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
>> kernel/sys_ni.c:71:1: warning: no previous prototype for function '__arm64_sys_epoll_pwait2' [-Wmissing-prototypes]
COND_SYSCALL(epoll_pwait2);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:58:1: note: expanded from here
__arm64_sys_epoll_pwait2
^
kernel/sys_ni.c:71:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:77:1: warning: no previous prototype for function '__arm64_sys_inotify_init1' [-Wmissing-prototypes]
COND_SYSCALL(inotify_init1);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:63:1: note: expanded from here
__arm64_sys_inotify_init1
^
kernel/sys_ni.c:77:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:78:1: warning: no previous prototype for function '__arm64_sys_inotify_add_watch' [-Wmissing-prototypes]
COND_SYSCALL(inotify_add_watch);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:64:1: note: expanded from here
__arm64_sys_inotify_add_watch
^
kernel/sys_ni.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:79:1: warning: no previous prototype for function '__arm64_sys_inotify_rm_watch' [-Wmissing-prototypes]
COND_SYSCALL(inotify_rm_watch);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:65:1: note: expanded from here
__arm64_sys_inotify_rm_watch
^
kernel/sys_ni.c:79:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:84:1: warning: no previous prototype for function '__arm64_sys_ioprio_set' [-Wmissing-prototypes]
COND_SYSCALL(ioprio_set);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:66:1: note: expanded from here
__arm64_sys_ioprio_set
^
kernel/sys_ni.c:84:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:85:1: warning: no previous prototype for function '__arm64_sys_ioprio_get' [-Wmissing-prototypes]
COND_SYSCALL(ioprio_get);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:67:1: note: expanded from here
__arm64_sys_ioprio_get
^
kernel/sys_ni.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:88:1: warning: no previous prototype for function '__arm64_sys_flock' [-Wmissing-prototypes]
COND_SYSCALL(flock);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:68:1: note: expanded from here
__arm64_sys_flock
^
kernel/sys_ni.c:88:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
arch/arm64/include/asm/syscall_wrapper.h:76:13: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
kernel/sys_ni.c:101:1: warning: no previous prototype for function '__arm64_sys_quotactl' [-Wmissing-prototypes]
COND_SYSCALL(quotactl);
^
arch/arm64/include/asm/syscall_wrapper.h:76:25: note: expanded from macro 'COND_SYSCALL'
asmlinkage long __weak __arm64_sys_##name(const struct pt_regs *regs) \
^
<scratch space>:69:1: note: expanded from here
__arm64_sys_quotactl
^
kernel/sys_ni.c:101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
vim +/__arm64_sys_epoll_pwait2 +71 kernel/sys_ni.c
65
66 /* fs/eventfd.c */
67 COND_SYSCALL(epoll_create1);
68 COND_SYSCALL(epoll_ctl);
69 COND_SYSCALL(epoll_pwait);
70 COND_SYSCALL_COMPAT(epoll_pwait);
> 71 COND_SYSCALL(epoll_pwait2);
72 COND_SYSCALL_COMPAT(epoll_pwait2);
73
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[linux-next:master 3464/7963] drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 4b358aabb93a2c654cd1dcab1a25a589f6e2b153
commit: 3f5dff6c18aa0473158686f363184a1bdae0116b [3464/7963] drm/i915/selftest: Better error reporting from hangcheck selftest
config: x86_64-randconfig-a011-20210814 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 62df4df41c939205b2dc0a2a3bfb75b8c1ed74fa)
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/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 3f5dff6c18aa0473158686f363184a1bdae0116b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/gt/intel_reset.c:1514:
>> drivers/gpu/drm/i915/gt/selftest_hangcheck.c:455:62: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
pr_err("[%s] Create context failed: %d!\n", engine->name, err);
^~~
include/linux/printk.h:390:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:451:10: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:566:62: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
pr_err("[%s] Create context failed: %d!\n", engine->name, err);
^~~
include/linux/printk.h:390:33: note: expanded from macro 'pr_err'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:562:10: note: initialize the variable 'err' to silence this warning
int err;
^
= 0
2 errors generated.
vim +/err +455 drivers/gpu/drm/i915/gt/selftest_hangcheck.c
434
435 static int igt_reset_nop_engine(void *arg)
436 {
437 struct intel_gt *gt = arg;
438 struct i915_gpu_error *global = >->i915->gpu_error;
439 struct intel_engine_cs *engine;
440 enum intel_engine_id id;
441
442 /* Check that we can engine-reset during non-user portions */
443
444 if (!intel_has_reset_engine(gt))
445 return 0;
446
447 for_each_engine(engine, gt, id) {
448 unsigned int reset_count, reset_engine_count, count;
449 struct intel_context *ce;
450 IGT_TIMEOUT(end_time);
451 int err;
452
453 ce = intel_context_create(engine);
454 if (IS_ERR(ce)) {
> 455 pr_err("[%s] Create context failed: %d!\n", engine->name, err);
456 return PTR_ERR(ce);
457 }
458
459 reset_count = i915_reset_count(global);
460 reset_engine_count = i915_reset_engine_count(global, engine);
461 count = 0;
462
463 st_engine_heartbeat_disable(engine);
464 set_bit(I915_RESET_ENGINE + id, >->reset.flags);
465 do {
466 int i;
467
468 if (!wait_for_idle(engine)) {
469 pr_err("%s failed to idle before reset\n",
470 engine->name);
471 err = -EIO;
472 break;
473 }
474
475 for (i = 0; i < 16; i++) {
476 struct i915_request *rq;
477
478 rq = intel_context_create_request(ce);
479 if (IS_ERR(rq)) {
480 struct drm_printer p =
481 drm_info_printer(gt->i915->drm.dev);
482 intel_engine_dump(engine, &p,
483 "%s(%s): failed to submit request\n",
484 __func__,
485 engine->name);
486
487 GEM_TRACE("%s(%s): failed to submit request\n",
488 __func__,
489 engine->name);
490 GEM_TRACE_DUMP();
491
492 intel_gt_set_wedged(gt);
493
494 err = PTR_ERR(rq);
495 break;
496 }
497
498 i915_request_add(rq);
499 }
500 err = intel_engine_reset(engine, NULL);
501 if (err) {
502 pr_err("intel_engine_reset(%s) failed, err:%d\n",
503 engine->name, err);
504 break;
505 }
506
507 if (i915_reset_count(global) != reset_count) {
508 pr_err("Full GPU reset recorded! (engine reset expected)\n");
509 err = -EINVAL;
510 break;
511 }
512
513 if (i915_reset_engine_count(global, engine) !=
514 reset_engine_count + ++count) {
515 pr_err("%s engine reset not recorded!\n",
516 engine->name);
517 err = -EINVAL;
518 break;
519 }
520 } while (time_before(jiffies, end_time));
521 clear_bit(I915_RESET_ENGINE + id, >->reset.flags);
522 st_engine_heartbeat_enable(engine);
523
524 pr_info("%s(%s): %d resets\n", __func__, engine->name, count);
525
526 intel_context_put(ce);
527 if (igt_flush_test(gt->i915))
528 err = -EIO;
529 if (err)
530 return err;
531 }
532
533 return 0;
534 }
535
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
Re: [PATCH v4 01/13] KVM: x86: Cache total page count to avoid traversing the memslot array
by kernel test robot
Hi "Maciej,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on kvms390/next v5.14-rc5 next-20210813]
[cannot apply to kvm-ppc/kvm-ppc-next]
[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/Maciej-S-Szmigiero/KVM-Scalable-...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-s001-20210813 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
# https://github.com/0day-ci/linux/commit/172883fe88fb9dc0533b916b2f4177008...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Maciej-S-Szmigiero/KVM-Scalable-memslots-implementation/20210814-040318
git checkout 172883fe88fb9dc0533b916b2f4177008d35e05a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: arch/x86/kvm/x86.o: in function `kvm_arch_commit_memory_region':
>> arch/x86/kvm/x86.c:11602: undefined reference to `__udivdi3'
vim +11602 arch/x86/kvm/x86.c
11584
11585 void kvm_arch_commit_memory_region(struct kvm *kvm,
11586 const struct kvm_userspace_memory_region *mem,
11587 struct kvm_memory_slot *old,
11588 const struct kvm_memory_slot *new,
11589 enum kvm_mr_change change)
11590 {
11591 if (change == KVM_MR_CREATE)
11592 kvm->arch.n_memslots_pages += new->npages;
11593 else if (change == KVM_MR_DELETE) {
11594 WARN_ON(kvm->arch.n_memslots_pages < old->npages);
11595 kvm->arch.n_memslots_pages -= old->npages;
11596 }
11597
11598 if (!kvm->arch.n_requested_mmu_pages) {
11599 unsigned long nr_mmu_pages;
11600
11601 nr_mmu_pages = kvm->arch.n_memslots_pages *
11602 KVM_PERMILLE_MMU_PAGES / 1000;
11603 nr_mmu_pages = max(nr_mmu_pages, KVM_MIN_ALLOC_MMU_PAGES);
11604 kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages);
11605 }
11606
11607 kvm_mmu_slot_apply_flags(kvm, old, new, change);
11608
11609 /* Free the arrays associated with the old memslot. */
11610 if (change == KVM_MR_MOVE)
11611 kvm_arch_free_memslot(kvm, old);
11612 }
11613
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[android-common:android12-5.4 29/30] kernel/seccomp.c:2041:41: sparse: sparse: incorrect type in argument 3 (different address spaces)
by kernel test robot
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 15cec007c4a8973aa89c2a01e56797650cd622df
commit: 5444477e8a4d31f6e6ff720c2d018d06e405bcc1 [29/30] UPSTREAM: seccomp: Remove bogus __user annotations
config: i386-randconfig-s001-20210812 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 5444477e8a4d31f6e6ff720c2d018d06e405bcc1
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/seccomp.c:2041:41: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void *buffer @@
kernel/seccomp.c:2041:41: sparse: expected void [noderef] <asn:1> *
kernel/seccomp.c:2041:41: sparse: got void *buffer
kernel/seccomp.c:2059:40: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void *buffer @@
kernel/seccomp.c:2059:40: sparse: expected void [noderef] <asn:1> *
kernel/seccomp.c:2059:40: sparse: got void *buffer
>> kernel/seccomp.c:2115:54: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *buffer @@ got void [noderef] <asn:1> *buffer @@
kernel/seccomp.c:2115:54: sparse: expected void *buffer
kernel/seccomp.c:2115:54: sparse: got void [noderef] <asn:1> *buffer
kernel/seccomp.c:2119:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *buffer @@ got void [noderef] <asn:1> *buffer @@
kernel/seccomp.c:2119:53: sparse: expected void *buffer
kernel/seccomp.c:2119:53: sparse: got void [noderef] <asn:1> *buffer
vim +2041 kernel/seccomp.c
0ddec0fc890020 Tyler Hicks 2017-08-11 2025
5444477e8a4d31 Jann Horn 2020-11-20 2026 static int read_actions_logged(struct ctl_table *ro_table, void *buffer,
d013db029491b4 Tyler Hicks 2018-05-04 2027 size_t *lenp, loff_t *ppos)
0ddec0fc890020 Tyler Hicks 2017-08-11 2028 {
0ddec0fc890020 Tyler Hicks 2017-08-11 2029 char names[sizeof(seccomp_actions_avail)];
0ddec0fc890020 Tyler Hicks 2017-08-11 2030 struct ctl_table table;
0ddec0fc890020 Tyler Hicks 2017-08-11 2031
0ddec0fc890020 Tyler Hicks 2017-08-11 2032 memset(names, 0, sizeof(names));
0ddec0fc890020 Tyler Hicks 2017-08-11 2033
0ddec0fc890020 Tyler Hicks 2017-08-11 2034 if (!seccomp_names_from_actions_logged(names, sizeof(names),
beb44acaf000c9 Tyler Hicks 2018-05-04 2035 seccomp_actions_logged, " "))
0ddec0fc890020 Tyler Hicks 2017-08-11 2036 return -EINVAL;
d013db029491b4 Tyler Hicks 2018-05-04 2037
d013db029491b4 Tyler Hicks 2018-05-04 2038 table = *ro_table;
d013db029491b4 Tyler Hicks 2018-05-04 2039 table.data = names;
d013db029491b4 Tyler Hicks 2018-05-04 2040 table.maxlen = sizeof(names);
d013db029491b4 Tyler Hicks 2018-05-04 @2041 return proc_dostring(&table, 0, buffer, lenp, ppos);
0ddec0fc890020 Tyler Hicks 2017-08-11 2042 }
0ddec0fc890020 Tyler Hicks 2017-08-11 2043
5444477e8a4d31 Jann Horn 2020-11-20 2044 static int write_actions_logged(struct ctl_table *ro_table, void *buffer,
ea6eca778500b0 Tyler Hicks 2018-05-04 2045 size_t *lenp, loff_t *ppos, u32 *actions_logged)
d013db029491b4 Tyler Hicks 2018-05-04 2046 {
d013db029491b4 Tyler Hicks 2018-05-04 2047 char names[sizeof(seccomp_actions_avail)];
d013db029491b4 Tyler Hicks 2018-05-04 2048 struct ctl_table table;
d013db029491b4 Tyler Hicks 2018-05-04 2049 int ret;
d013db029491b4 Tyler Hicks 2018-05-04 2050
d013db029491b4 Tyler Hicks 2018-05-04 2051 if (!capable(CAP_SYS_ADMIN))
d013db029491b4 Tyler Hicks 2018-05-04 2052 return -EPERM;
d013db029491b4 Tyler Hicks 2018-05-04 2053
d013db029491b4 Tyler Hicks 2018-05-04 2054 memset(names, 0, sizeof(names));
d013db029491b4 Tyler Hicks 2018-05-04 2055
0ddec0fc890020 Tyler Hicks 2017-08-11 2056 table = *ro_table;
0ddec0fc890020 Tyler Hicks 2017-08-11 2057 table.data = names;
0ddec0fc890020 Tyler Hicks 2017-08-11 2058 table.maxlen = sizeof(names);
d013db029491b4 Tyler Hicks 2018-05-04 2059 ret = proc_dostring(&table, 1, buffer, lenp, ppos);
0ddec0fc890020 Tyler Hicks 2017-08-11 2060 if (ret)
0ddec0fc890020 Tyler Hicks 2017-08-11 2061 return ret;
0ddec0fc890020 Tyler Hicks 2017-08-11 2062
ea6eca778500b0 Tyler Hicks 2018-05-04 2063 if (!seccomp_actions_logged_from_names(actions_logged, table.data))
0ddec0fc890020 Tyler Hicks 2017-08-11 2064 return -EINVAL;
0ddec0fc890020 Tyler Hicks 2017-08-11 2065
ea6eca778500b0 Tyler Hicks 2018-05-04 2066 if (*actions_logged & SECCOMP_LOG_ALLOW)
0ddec0fc890020 Tyler Hicks 2017-08-11 2067 return -EINVAL;
0ddec0fc890020 Tyler Hicks 2017-08-11 2068
ea6eca778500b0 Tyler Hicks 2018-05-04 2069 seccomp_actions_logged = *actions_logged;
d013db029491b4 Tyler Hicks 2018-05-04 2070 return 0;
0ddec0fc890020 Tyler Hicks 2017-08-11 2071 }
0ddec0fc890020 Tyler Hicks 2017-08-11 2072
ea6eca778500b0 Tyler Hicks 2018-05-04 2073 static void audit_actions_logged(u32 actions_logged, u32 old_actions_logged,
ea6eca778500b0 Tyler Hicks 2018-05-04 2074 int ret)
ea6eca778500b0 Tyler Hicks 2018-05-04 2075 {
ea6eca778500b0 Tyler Hicks 2018-05-04 2076 char names[sizeof(seccomp_actions_avail)];
ea6eca778500b0 Tyler Hicks 2018-05-04 2077 char old_names[sizeof(seccomp_actions_avail)];
ea6eca778500b0 Tyler Hicks 2018-05-04 2078 const char *new = names;
ea6eca778500b0 Tyler Hicks 2018-05-04 2079 const char *old = old_names;
ea6eca778500b0 Tyler Hicks 2018-05-04 2080
ea6eca778500b0 Tyler Hicks 2018-05-04 2081 if (!audit_enabled)
ea6eca778500b0 Tyler Hicks 2018-05-04 2082 return;
ea6eca778500b0 Tyler Hicks 2018-05-04 2083
ea6eca778500b0 Tyler Hicks 2018-05-04 2084 memset(names, 0, sizeof(names));
ea6eca778500b0 Tyler Hicks 2018-05-04 2085 memset(old_names, 0, sizeof(old_names));
ea6eca778500b0 Tyler Hicks 2018-05-04 2086
ea6eca778500b0 Tyler Hicks 2018-05-04 2087 if (ret)
ea6eca778500b0 Tyler Hicks 2018-05-04 2088 new = "?";
ea6eca778500b0 Tyler Hicks 2018-05-04 2089 else if (!actions_logged)
ea6eca778500b0 Tyler Hicks 2018-05-04 2090 new = "(none)";
ea6eca778500b0 Tyler Hicks 2018-05-04 2091 else if (!seccomp_names_from_actions_logged(names, sizeof(names),
ea6eca778500b0 Tyler Hicks 2018-05-04 2092 actions_logged, ","))
ea6eca778500b0 Tyler Hicks 2018-05-04 2093 new = "?";
ea6eca778500b0 Tyler Hicks 2018-05-04 2094
ea6eca778500b0 Tyler Hicks 2018-05-04 2095 if (!old_actions_logged)
ea6eca778500b0 Tyler Hicks 2018-05-04 2096 old = "(none)";
ea6eca778500b0 Tyler Hicks 2018-05-04 2097 else if (!seccomp_names_from_actions_logged(old_names,
ea6eca778500b0 Tyler Hicks 2018-05-04 2098 sizeof(old_names),
ea6eca778500b0 Tyler Hicks 2018-05-04 2099 old_actions_logged, ","))
ea6eca778500b0 Tyler Hicks 2018-05-04 2100 old = "?";
ea6eca778500b0 Tyler Hicks 2018-05-04 2101
ea6eca778500b0 Tyler Hicks 2018-05-04 2102 return audit_seccomp_actions_logged(new, old, !ret);
ea6eca778500b0 Tyler Hicks 2018-05-04 2103 }
ea6eca778500b0 Tyler Hicks 2018-05-04 2104
d013db029491b4 Tyler Hicks 2018-05-04 2105 static int seccomp_actions_logged_handler(struct ctl_table *ro_table, int write,
d013db029491b4 Tyler Hicks 2018-05-04 2106 void __user *buffer, size_t *lenp,
d013db029491b4 Tyler Hicks 2018-05-04 2107 loff_t *ppos)
d013db029491b4 Tyler Hicks 2018-05-04 2108 {
ea6eca778500b0 Tyler Hicks 2018-05-04 2109 int ret;
ea6eca778500b0 Tyler Hicks 2018-05-04 2110
ea6eca778500b0 Tyler Hicks 2018-05-04 2111 if (write) {
ea6eca778500b0 Tyler Hicks 2018-05-04 2112 u32 actions_logged = 0;
ea6eca778500b0 Tyler Hicks 2018-05-04 2113 u32 old_actions_logged = seccomp_actions_logged;
ea6eca778500b0 Tyler Hicks 2018-05-04 2114
ea6eca778500b0 Tyler Hicks 2018-05-04 @2115 ret = write_actions_logged(ro_table, buffer, lenp, ppos,
ea6eca778500b0 Tyler Hicks 2018-05-04 2116 &actions_logged);
ea6eca778500b0 Tyler Hicks 2018-05-04 2117 audit_actions_logged(actions_logged, old_actions_logged, ret);
ea6eca778500b0 Tyler Hicks 2018-05-04 2118 } else
ea6eca778500b0 Tyler Hicks 2018-05-04 2119 ret = read_actions_logged(ro_table, buffer, lenp, ppos);
ea6eca778500b0 Tyler Hicks 2018-05-04 2120
ea6eca778500b0 Tyler Hicks 2018-05-04 2121 return ret;
0ddec0fc890020 Tyler Hicks 2017-08-11 2122 }
0ddec0fc890020 Tyler Hicks 2017-08-11 2123
:::::: The code at line 2041 was first introduced by commit
:::::: d013db029491b49e1459d5a55ecd9ec1be1447ca seccomp: Separate read and write code for actions_logged sysctl
:::::: TO: Tyler Hicks <tyhicks(a)canonical.com>
:::::: CC: Paul Moore <paul(a)paul-moore.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month
[xlnx:xlnx_rebase_v5.10 863/1761] drivers/crypto/xilinx/zynqmp-sha.c:116:3: error: implicit declaration of function '__flush_cache_user_range'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: e14d4574ca81a569ee6d07e03271f2ae2dad38e4
commit: cfd28773b697fdbf45ddac80813ce6b141a21725 [863/1761] crypto: zynqmp-sha: Adopted SHA3 support for ZynqMP Soc
config: s390-randconfig-r012-20210812 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 767496d19cb9a1fbba57ff08095faa161998ee36)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://github.com/Xilinx/linux-xlnx/commit/cfd28773b697fdbf45ddac80813ce...
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.10
git checkout cfd28773b697fdbf45ddac80813ce6b141a21725
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from drivers/crypto/xilinx/zynqmp-sha.c:9:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from drivers/crypto/xilinx/zynqmp-sha.c:9:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from drivers/crypto/xilinx/zynqmp-sha.c:9:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from drivers/crypto/xilinx/zynqmp-sha.c:9:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from drivers/crypto/xilinx/zynqmp-sha.c:9:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> drivers/crypto/xilinx/zynqmp-sha.c:116:3: error: implicit declaration of function '__flush_cache_user_range' [-Werror,-Wimplicit-function-declaration]
__flush_cache_user_range((unsigned long)kbuf,
^
drivers/crypto/xilinx/zynqmp-sha.c:116:3: note: did you mean 'flush_icache_user_page'?
include/asm-generic/cacheflush.h:86:20: note: 'flush_icache_user_page' declared here
static inline void flush_icache_user_page(struct vm_area_struct *vma,
^
20 warnings and 1 error generated.
vim +/__flush_cache_user_range +116 drivers/crypto/xilinx/zynqmp-sha.c
98
99 static int zynqmp_sha_update(struct ahash_request *req)
100 {
101 struct zynqmp_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm);
102 struct zynqmp_sha_dev *dd = tctx->dd;
103 char *kbuf;
104 size_t dma_size = req->nbytes;
105 dma_addr_t dma_addr;
106 int ret;
107
108 if (!req->nbytes)
109 return 0;
110
111 kbuf = dma_alloc_coherent(dd->dev, dma_size, &dma_addr, GFP_KERNEL);
112 if (!kbuf)
113 return -ENOMEM;
114
115 scatterwalk_map_and_copy(kbuf, req->src, 0, req->nbytes, 0);
> 116 __flush_cache_user_range((unsigned long)kbuf,
117 (unsigned long)kbuf + dma_size);
118 ret = zynqmp_pm_sha_hash(dma_addr, req->nbytes, ZYNQMP_SHA3_UPDATE);
119 dma_free_coherent(dd->dev, dma_size, kbuf, dma_addr);
120
121 return ret;
122 }
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 1 month