fs/nfsd/nfs4xdr.c:4657 nfsd4_encode_read_plus_hole() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 368094df48e680fa51cedb68537408cfa64b788e
commit: 2db27992dd565bf400658edc18f67aed0b6bc6cb NFSD: Add READ_PLUS hole segment encoding
date: 8 months ago
config: h8300-randconfig-m031-20210609 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
fs/nfsd/nfs4xdr.c:4657 nfsd4_encode_read_plus_hole() warn: inconsistent indenting
Old smatch warnings:
fs/nfsd/nfs4xdr.c:679 nfsd4_decode_close() warn: ignoring unreachable code.
vim +4657 fs/nfsd/nfs4xdr.c
4642
4643 static __be32
4644 nfsd4_encode_read_plus_hole(struct nfsd4_compoundres *resp,
4645 struct nfsd4_read *read,
4646 unsigned long maxcount, u32 *eof)
4647 {
4648 struct file *file = read->rd_nf->nf_file;
4649 __be32 *p;
4650
4651 /* Content type, offset, byte count */
4652 p = xdr_reserve_space(&resp->xdr, 4 + 8 + 8);
4653 if (!p)
4654 return nfserr_resource;
4655
4656 *p++ = htonl(NFS4_CONTENT_HOLE);
> 4657 p = xdr_encode_hyper(p, read->rd_offset);
4658 p = xdr_encode_hyper(p, maxcount);
4659
4660 *eof = (read->rd_offset + maxcount) >= i_size_read(file_inode(file));
4661 return nfs_ok;
4662 }
4663
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[drm-drm-misc:for-linux-next 9/9] drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:52: error: 'struct nouveau_connector' has no member named 'backlight'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head: 6eca310e8924ab98c73b81dfd39e7dd553ceddfd
commit: 6eca310e8924ab98c73b81dfd39e7dd553ceddfd [9/9] drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau
config: arc-randconfig-r005-20210608 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.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
git remote add drm-drm-misc git://anongit.freedesktop.org/drm/drm-misc
git fetch --no-tags drm-drm-misc for-linux-next
git checkout 6eca310e8924ab98c73b81dfd39e7dd553ceddfd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
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 >>):
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_cleanup':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1390:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1390 | int ret;
| ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_mstm_prepare':
drivers/gpu/drm/nouveau/dispnv50/disp.c:1414:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
1414 | int ret;
| ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_sor_atomic_disable':
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1665:52: error: 'struct nouveau_connector' has no member named 'backlight'
1665 | struct nouveau_backlight *backlight = nv_connector->backlight;
| ^~
>> drivers/gpu/drm/nouveau/dispnv50/disp.c:1670:28: error: dereferencing pointer to incomplete type 'struct nouveau_backlight'
1670 | if (backlight && backlight->uses_dpcd) {
| ^~
drivers/gpu/drm/nouveau/dispnv50/disp.c: At top level:
drivers/gpu/drm/nouveau/dispnv50/disp.c:2661:1: warning: no previous prototype for 'nv50_display_create' [-Wmissing-prototypes]
2661 | nv50_display_create(struct drm_device *dev)
| ^~~~~~~~~~~~~~~~~~~
vim +1665 drivers/gpu/drm/nouveau/dispnv50/disp.c
1652
1653 /* TODO: Should we extend this to PWM-only backlights?
1654 * As well, should we add a DRM helper for waiting for the backlight to acknowledge
1655 * the panel backlight has been shut off? Intel doesn't seem to do this, and uses a
1656 * fixed time delay from the vbios…
1657 */
1658 static void
1659 nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *state)
1660 {
1661 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1662 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
1663 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
1664 struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder);
> 1665 struct nouveau_backlight *backlight = nv_connector->backlight;
1666 struct drm_dp_aux *aux = &nv_connector->aux;
1667 int ret;
1668 u8 pwr;
1669
> 1670 if (backlight && backlight->uses_dpcd) {
1671 ret = drm_edp_backlight_disable(aux, &backlight->edp_info);
1672 if (ret < 0)
1673 NV_ERROR(drm, "Failed to disable backlight on [CONNECTOR:%d:%s]: %d\n",
1674 nv_connector->base.base.id, nv_connector->base.name, ret);
1675 }
1676
1677 if (nv_encoder->dcb->type == DCB_OUTPUT_DP) {
1678 int ret = drm_dp_dpcd_readb(aux, DP_SET_POWER, &pwr);
1679
1680 if (ret == 0) {
1681 pwr &= ~DP_SET_POWER_MASK;
1682 pwr |= DP_SET_POWER_D3;
1683 drm_dp_dpcd_writeb(aux, DP_SET_POWER, pwr);
1684 }
1685 }
1686
1687 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
1688 nv50_audio_disable(encoder, nv_crtc);
1689 nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
1690 nv50_outp_release(nv_encoder);
1691 nv_encoder->crtc = NULL;
1692 }
1693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[pm:bleeding-edge 102/108] include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 7604cba9f860bcae8fd95c907ffee8ebeab73bef
commit: f06e8901662d5c5c80f47d1cef6207688ee42e81 [102/108] ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype
config: x86_64-randconfig-b001-20210608 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm bleeding-edge
git checkout f06e8901662d5c5c80f47d1cef6207688ee42e81
# 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/hwmon/acpi_power_meter.c:20:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
1 error generated.
--
In file included from drivers/hwmon/ads7828.c:18:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/ads7828.c:142:10: warning: cast to smaller integer type 'enum ads7828_chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
chip = (enum ads7828_chips)
^~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/lm63.c:31:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/lm63.c:1108:16: warning: cast to smaller integer type 'enum chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
data->kind = (enum chips)of_device_get_match_data(&client->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/ad7418.c:14:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/ad7418.c:256:16: warning: cast to smaller integer type 'enum chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
data->type = (enum chips)of_device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/lm75.c:12:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/lm75.c:565:10: warning: cast to smaller integer type 'enum lm75_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
kind = (enum lm75_type)of_device_get_match_data(&client->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/max6697.c:13:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/max6697.c:706:16: warning: cast to smaller integer type 'enum chips' from 'const void *' [-Wvoid-pointer-to-enum-cast]
data->type = (enum chips)of_device_get_match_data(&client->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/tmp513.c:24:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/tmp513.c:724:14: warning: cast to smaller integer type 'enum tmp51x_ids' from 'const void *' [-Wvoid-pointer-to-enum-cast]
data->id = (enum tmp51x_ids)device_get_match_data(&client->dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/hwmon/pmbus/ibm-cffps.c:11:
In file included from include/linux/i2c.h:13:
>> include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
drivers/hwmon/pmbus/ibm-cffps.c:489:8: warning: cast to smaller integer type 'enum versions' from 'const void *' [-Wvoid-pointer-to-enum-cast]
vs = (enum versions)md;
^~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +135 include/linux/acpi.h
129
130
131 /* Table Handlers */
132 union acpi_subtable_headers {
133 struct acpi_subtable_header common;
134 struct acpi_hmat_structure hmat;
> 135 struct acpi_prmt_module_header prmt;
136 };
137
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[pm:bleeding-edge 102/108] drivers/gpu/drm/xen/xen_drm_front.c:710:42: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 7604cba9f860bcae8fd95c907ffee8ebeab73bef
commit: f06e8901662d5c5c80f47d1cef6207688ee42e81 [102/108] ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype
config: x86_64-randconfig-a015-20210608 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm bleeding-edge
git checkout f06e8901662d5c5c80f47d1cef6207688ee42e81
# 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 warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/xen/xen_drm_front.c:16:
In file included from include/drm/drm_atomic_helper.h:31:
In file included from include/drm/drm_crtc.h:28:
In file included from include/linux/i2c.h:13:
include/linux/acpi.h:135:33: error: field has incomplete type 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
include/linux/acpi.h:135:9: note: forward declaration of 'struct acpi_prmt_module_header'
struct acpi_prmt_module_header prmt;
^
>> drivers/gpu/drm/xen/xen_drm_front.c:710:42: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 1 error generated.
vim +710 drivers/gpu/drm/xen/xen_drm_front.c
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 702
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 703 static int xen_drv_probe(struct xenbus_device *xb_dev,
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 704 const struct xenbus_device_id *id)
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 705 {
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 706 struct xen_drm_front_info *front_info;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 707 struct device *dev = &xb_dev->dev;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 708 int ret;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 709
ee7f5225dc3cc7 Rob Herring 2019-10-08 @710 ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 711 if (ret < 0) {
ee7f5225dc3cc7 Rob Herring 2019-10-08 712 DRM_ERROR("Cannot setup DMA mask, ret %d", ret);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 713 return ret;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 714 }
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 715
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 716 front_info = devm_kzalloc(&xb_dev->dev,
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 717 sizeof(*front_info), GFP_KERNEL);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 718 if (!front_info)
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 719 return -ENOMEM;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 720
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 721 front_info->xb_dev = xb_dev;
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 722 spin_lock_init(&front_info->io_lock);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 723 INIT_LIST_HEAD(&front_info->dbuf_list);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 724 dev_set_drvdata(&xb_dev->dev, front_info);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 725
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 726 return xenbus_switch_state(xb_dev, XenbusStateInitialising);
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 727 }
c575b7eeb89f94 Oleksandr Andrushchenko 2018-04-03 728
:::::: The code at line 710 was first introduced by commit
:::::: ee7f5225dc3cc7c19df1603597532ff34571f895 xen: Stop abusing DT of_dma_configure API
:::::: TO: Rob Herring <robh(a)kernel.org>
:::::: CC: Boris Ostrovsky <boris.ostrovsky(a)oracle.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[pm:bleeding-edge 102/106] drivers/acpi/prmt.c:109:60: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head: 30ef794b1526be9fa11fd41725dc0032d1018956
commit: f06e8901662d5c5c80f47d1cef6207688ee42e81 [102/106] ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commi...
git remote add pm https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
git fetch --no-tags pm bleeding-edge
git checkout f06e8901662d5c5c80f47d1cef6207688ee42e81
# save the attached .config to linux build tree
make W=1 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/acpi/prmt.c:19:
include/linux/acpi.h:135:33: error: field 'prmt' has incomplete type
135 | struct acpi_prmt_module_header prmt;
| ^~~~
In file included from include/linux/device.h:29,
from include/linux/rtc.h:37,
from include/linux/efi.h:20,
from drivers/acpi/prmt.c:18:
drivers/acpi/prmt.c: In function 'acpi_parse_prmt':
>> drivers/acpi/prmt.c:109:60: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
109 | module_info_size = struct_size(tm, handlers, module_info->handler_count);
| ^~~~~~~~~~~~~
include/linux/overflow.h:325:14: note: in definition of macro 'struct_size'
325 | __ab_c_size(count, \
| ^~~~~
>> drivers/acpi/prmt.c:112:45: error: 'struct acpi_prmt_module_info' has no member named 'guid'
112 | guid_copy(&tm->guid, (guid_t *) module_info->guid);
| ^~
drivers/acpi/prmt.c:115:35: error: 'struct acpi_prmt_module_info' has no member named 'handler_count'; did you mean 'handler_info_count'?
115 | tm->handler_count = module_info->handler_count;
| ^~~~~~~~~~~~~
| handler_info_count
>> drivers/acpi/prmt.c:92:84: error: 'struct acpi_prmt_module_info' has no member named 'handler_offset'; did you mean 'handler_info_offset'?
92 | #define get_first_handler(a) ((struct acpi_prmt_handler_info *) ((char *) (a) + a->handler_offset))
| ^~~~~~~~~~~~~~
drivers/acpi/prmt.c:137:17: note: in expansion of macro 'get_first_handler'
137 | handler_info = get_first_handler(module_info);
| ^~~~~~~~~~~~~~~~~
>> drivers/acpi/prmt.c:141:46: error: 'struct acpi_prmt_handler_info' has no member named 'guid'
141 | guid_copy(&th->guid, (guid_t *)handler_info->guid);
| ^~
>> drivers/acpi/prmt.c:142:51: error: 'struct acpi_prmt_handler_info' has no member named 'address'
142 | th->handler_addr = efi_pa_va_lookup(handler_info->address);
| ^~
vim +109 drivers/acpi/prmt.c
90
91
> 92 #define get_first_handler(a) ((struct acpi_prmt_handler_info *) ((char *) (a) + a->handler_offset))
93 #define get_next_handler(a) ((struct acpi_prmt_handler_info *) (sizeof(struct acpi_prmt_handler_info) + (char *) a))
94
95 static int __init
96 acpi_parse_prmt(union acpi_subtable_headers *header, const unsigned long end)
97 {
98 struct acpi_prmt_module_info *module_info;
99 struct acpi_prmt_handler_info *handler_info;
100 struct prm_handler_info *th;
101 struct prm_module_info *tm;
102 u64 mmio_count = 0;
103 u64 cur_handler = 0;
104 u32 module_info_size = 0;
105 u64 mmio_range_size = 0;
106 void *temp_mmio;
107
108 module_info = (struct acpi_prmt_module_info *) header;
> 109 module_info_size = struct_size(tm, handlers, module_info->handler_count);
110 tm = kmalloc(module_info_size, GFP_KERNEL);
111
> 112 guid_copy(&tm->guid, (guid_t *) module_info->guid);
113 tm->major_rev = module_info->major_rev;
114 tm->minor_rev = module_info->minor_rev;
115 tm->handler_count = module_info->handler_count;
116 tm->updatable = true;
117
118 if (module_info->mmio_list_pointer) {
119 /*
120 * Each module is associated with a list of addr
121 * ranges that it can use during the service
122 */
123 mmio_count = *(u64 *) memremap(module_info->mmio_list_pointer, 8, MEMREMAP_WB);
124 mmio_range_size = struct_size(tm->mmio_info, addr_ranges, mmio_count);
125 tm->mmio_info = kmalloc(mmio_range_size, GFP_KERNEL);
126 temp_mmio = memremap(module_info->mmio_list_pointer, mmio_range_size, MEMREMAP_WB);
127 memmove(tm->mmio_info, temp_mmio, mmio_range_size);
128 } else {
129 mmio_range_size = struct_size(tm->mmio_info, addr_ranges, mmio_count);
130 tm->mmio_info = kmalloc(mmio_range_size, GFP_KERNEL);
131 tm->mmio_info->mmio_count = 0;
132 }
133
134 INIT_LIST_HEAD(&tm->module_list);
135 list_add(&tm->module_list, &prm_module_list);
136
137 handler_info = get_first_handler(module_info);
138 do {
139 th = &tm->handlers[cur_handler];
140
> 141 guid_copy(&th->guid, (guid_t *)handler_info->guid);
> 142 th->handler_addr = efi_pa_va_lookup(handler_info->address);
143 th->static_data_buffer_addr = efi_pa_va_lookup(handler_info->static_data_buffer_address);
144 th->acpi_param_buffer_addr = efi_pa_va_lookup(handler_info->acpi_param_buffer_address);
145 } while (++cur_handler < tm->handler_count && (handler_info = get_next_handler(handler_info)));
146
147 return 0;
148 }
149
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
kernel/rcu/tree.c:2073:23: warning: stack frame size of 2704 bytes in function 'rcu_gp_kthread'
by kernel test robot
Hi Paul,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f5b6eb1e018203913dfefcf6fa988649ad11ad6e
commit: 7dffe01765d9309b8bd5505503933ec0ec53d192 rcu: Add lockdep_assert_irqs_disabled() to raw_spin_unlock_rcu_node() macros
date: 5 months ago
config: powerpc-randconfig-r023-20210606 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 551a697c5cf33275b66add4fc467fcf59084cffb)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# 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 7dffe01765d9309b8bd5505503933ec0ec53d192
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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 >>):
In file included from kernel/rcu/tree.c:21:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:310:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> kernel/rcu/tree.c:2073:23: warning: stack frame size of 2704 bytes in function 'rcu_gp_kthread' [-Wframe-larger-than=]
static int __noreturn rcu_gp_kthread(void *unused)
^
2 warnings generated.
vim +/rcu_gp_kthread +2073 kernel/rcu/tree.c
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2069
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2070 /*
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2071 * Body of kthread that handles grace periods.
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2072 */
0854a05c9fa554 kernel/rcu/tree.c Paul E. McKenney 2018-07-03 @2073 static int __noreturn rcu_gp_kthread(void *unused)
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2074 {
5871968d531f39 kernel/rcu/tree.c Paul E. McKenney 2015-02-24 2075 rcu_bind_gp_kthread();
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2076 for (;;) {
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2077
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2078 /* Handle grace-period start. */
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2079 for (;;) {
0f11ad323dd3d3 kernel/rcu/tree.c Paul E. McKenney 2020-02-10 2080 trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq,
63c4db78e80407 kernel/rcutree.c Paul E. McKenney 2013-08-09 2081 TPS("reqwait"));
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2082 rcu_state.gp_state = RCU_GP_WAIT_GPS;
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2083 swait_event_idle_exclusive(rcu_state.gp_wq,
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2084 READ_ONCE(rcu_state.gp_flags) &
4cdfc175c25c89 kernel/rcutree.c Paul E. McKenney 2012-06-22 2085 RCU_GP_FLAG_INIT);
55b2dcf5870004 kernel/rcu/tree.c Paul E. McKenney 2020-04-01 2086 rcu_gp_torture_wait();
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2087 rcu_state.gp_state = RCU_GP_DONE_GPS;
78e4bc34e5d966 kernel/rcu/tree.c Paul E. McKenney 2013-09-24 2088 /* Locking provides needed memory barrier. */
0854a05c9fa554 kernel/rcu/tree.c Paul E. McKenney 2018-07-03 2089 if (rcu_gp_init())
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2090 break;
cee43939893337 kernel/rcu/tree.c Paul E. McKenney 2018-03-02 2091 cond_resched_tasks_rcu_qs();
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2092 WRITE_ONCE(rcu_state.gp_activity, jiffies);
73a860cd58a1eb kernel/rcu/tree.c Paul E. McKenney 2014-08-14 2093 WARN_ON(signal_pending(current));
0f11ad323dd3d3 kernel/rcu/tree.c Paul E. McKenney 2020-02-10 2094 trace_rcu_grace_period(rcu_state.name, rcu_state.gp_seq,
63c4db78e80407 kernel/rcutree.c Paul E. McKenney 2013-08-09 2095 TPS("reqwaitsig"));
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2096 }
7fdefc10e1d730 kernel/rcutree.c Paul E. McKenney 2012-06-22 2097
4cdfc175c25c89 kernel/rcutree.c Paul E. McKenney 2012-06-22 2098 /* Handle quiescent-state forcing. */
c3854a055bc834 kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2099 rcu_gp_fqs_loop();
4cdfc175c25c89 kernel/rcutree.c Paul E. McKenney 2012-06-22 2100
4cdfc175c25c89 kernel/rcutree.c Paul E. McKenney 2012-06-22 2101 /* Handle grace-period end. */
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2102 rcu_state.gp_state = RCU_GP_CLEANUP;
0854a05c9fa554 kernel/rcu/tree.c Paul E. McKenney 2018-07-03 2103 rcu_gp_cleanup();
9cbc5b97029bff kernel/rcu/tree.c Paul E. McKenney 2018-07-05 2104 rcu_state.gp_state = RCU_GP_CLEANED;
4cdfc175c25c89 kernel/rcutree.c Paul E. McKenney 2012-06-22 2105 }
b3dbec76e5334f kernel/rcutree.c Paul E. McKenney 2012-06-18 2106 }
b3dbec76e5334f kernel/rcutree.c Paul E. McKenney 2012-06-18 2107
:::::: The code at line 2073 was first introduced by commit
:::::: 0854a05c9fa554930174f0fa7453c18f99108a4a rcu: Remove rsp parameter from rcu_gp_kthread() and friends
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 368094df48e680fa51cedb68537408cfa64b788e
commit: 4eeef098b43242ed145c83fba9989d586d707589 powerpc/44x: Remove STDBINUTILS kconfig option
date: 4 months ago
config: powerpc-randconfig-r012-20210609 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.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/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 4eeef098b43242ed145c83fba9989d586d707589
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
fs/buffer.c: In function 'block_read_full_page':
>> fs/buffer.c:2342:1: warning: the frame size of 2048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
2342 | }
| ^
--
fs/ext4/move_extent.c: In function 'mext_page_mkuptodate':
>> fs/ext4/move_extent.c:227:1: warning: the frame size of 2056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
227 | }
| ^
--
fs/fat/dir.c: In function 'fat_add_new_entries':
>> fs/fat/dir.c:1279:1: warning: the frame size of 2088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1279 | }
| ^
fs/fat/dir.c: In function 'fat_alloc_new_dir':
fs/fat/dir.c:1195:1: warning: the frame size of 2064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1195 | }
| ^
--
fs/fat/fatent.c: In function 'fat_free_clusters':
>> fs/fat/fatent.c:632:1: warning: the frame size of 2080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
632 | }
| ^
fs/fat/fatent.c: In function 'fat_alloc_clusters':
fs/fat/fatent.c:550:1: warning: the frame size of 2112 bytes is larger than 1024 bytes [-Wframe-larger-than=]
550 | }
| ^
--
fs/exfat/fatent.c: In function 'exfat_zeroed_cluster':
>> fs/exfat/fatent.c:277:1: warning: the frame size of 2048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
277 | }
| ^
--
In file included from <command-line>:
fs/btrfs/inode.c: In function 'compress_file_range':
>> include/linux/compiler_types.h:326:38: error: call to '__compiletime_assert_791' declared with attribute error: BUILD_BUG_ON failed: (BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:307:4: note: in definition of macro '__compiletime_assert'
307 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:326:2: note: in expansion of macro '_compiletime_assert'
326 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
fs/btrfs/inode.c:563:2: note: in expansion of macro 'BUILD_BUG_ON'
563 | BUILD_BUG_ON((BTRFS_MAX_COMPRESSED % PAGE_SIZE) != 0);
| ^~~~~~~~~~~~
vim +/__compiletime_assert_791 +326 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 320 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 322 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 323 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 324 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 325 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @326 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 327
:::::: The code at line 326 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
security/integrity/ima/ima_kexec.c:81:6: warning: no previous prototype for function 'ima_add_kexec_buffer'
by kernel test robot
Hi Lakshmi,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 368094df48e680fa51cedb68537408cfa64b788e
commit: dce92f6b11c3174737bd65eaf933458909b633ff arm64: Enable passing IMA log to next kernel on kexec
date: 3 months ago
config: arm64-randconfig-r004-20210609 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project d2012d965d60c3258b3a69d024491698f8aec386)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# 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 dce92f6b11c3174737bd65eaf933458909b633ff
# 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 >>):
>> security/integrity/ima/ima_kexec.c:81:6: warning: no previous prototype for function 'ima_add_kexec_buffer' [-Wmissing-prototypes]
void ima_add_kexec_buffer(struct kimage *image)
^
security/integrity/ima/ima_kexec.c:81:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ima_add_kexec_buffer(struct kimage *image)
^
static
1 warning generated.
vim +/ima_add_kexec_buffer +81 security/integrity/ima/ima_kexec.c
7b8589cc29e7c3 Mimi Zohar 2016-12-19 74
7b8589cc29e7c3 Mimi Zohar 2016-12-19 75 /*
7b8589cc29e7c3 Mimi Zohar 2016-12-19 76 * Called during kexec_file_load so that IMA can add a segment to the kexec
7b8589cc29e7c3 Mimi Zohar 2016-12-19 77 * image for the measurement list for the next kernel.
7b8589cc29e7c3 Mimi Zohar 2016-12-19 78 *
7b8589cc29e7c3 Mimi Zohar 2016-12-19 79 * This function assumes that kexec_mutex is held.
7b8589cc29e7c3 Mimi Zohar 2016-12-19 80 */
7b8589cc29e7c3 Mimi Zohar 2016-12-19 @81 void ima_add_kexec_buffer(struct kimage *image)
7b8589cc29e7c3 Mimi Zohar 2016-12-19 82 {
7b8589cc29e7c3 Mimi Zohar 2016-12-19 83 struct kexec_buf kbuf = { .image = image, .buf_align = PAGE_SIZE,
7b8589cc29e7c3 Mimi Zohar 2016-12-19 84 .buf_min = 0, .buf_max = ULONG_MAX,
7b8589cc29e7c3 Mimi Zohar 2016-12-19 85 .top_down = true };
7b8589cc29e7c3 Mimi Zohar 2016-12-19 86 unsigned long binary_runtime_size;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 87
7b8589cc29e7c3 Mimi Zohar 2016-12-19 88 /* use more understandable variable names than defined in kbuf */
7b8589cc29e7c3 Mimi Zohar 2016-12-19 89 void *kexec_buffer = NULL;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 90 size_t kexec_buffer_size;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 91 size_t kexec_segment_size;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 92 int ret;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 93
7b8589cc29e7c3 Mimi Zohar 2016-12-19 94 /*
7b8589cc29e7c3 Mimi Zohar 2016-12-19 95 * Reserve an extra half page of memory for additional measurements
7b8589cc29e7c3 Mimi Zohar 2016-12-19 96 * added during the kexec load.
7b8589cc29e7c3 Mimi Zohar 2016-12-19 97 */
7b8589cc29e7c3 Mimi Zohar 2016-12-19 98 binary_runtime_size = ima_get_binary_runtime_size();
7b8589cc29e7c3 Mimi Zohar 2016-12-19 99 if (binary_runtime_size >= ULONG_MAX - PAGE_SIZE)
7b8589cc29e7c3 Mimi Zohar 2016-12-19 100 kexec_segment_size = ULONG_MAX;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 101 else
7b8589cc29e7c3 Mimi Zohar 2016-12-19 102 kexec_segment_size = ALIGN(ima_get_binary_runtime_size() +
7b8589cc29e7c3 Mimi Zohar 2016-12-19 103 PAGE_SIZE / 2, PAGE_SIZE);
7b8589cc29e7c3 Mimi Zohar 2016-12-19 104 if ((kexec_segment_size == ULONG_MAX) ||
ca79b0c211af63 Arun KS 2018-12-28 105 ((kexec_segment_size >> PAGE_SHIFT) > totalram_pages() / 2)) {
7b8589cc29e7c3 Mimi Zohar 2016-12-19 106 pr_err("Binary measurement list too large.\n");
7b8589cc29e7c3 Mimi Zohar 2016-12-19 107 return;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 108 }
7b8589cc29e7c3 Mimi Zohar 2016-12-19 109
7b8589cc29e7c3 Mimi Zohar 2016-12-19 110 ima_dump_measurement_list(&kexec_buffer_size, &kexec_buffer,
7b8589cc29e7c3 Mimi Zohar 2016-12-19 111 kexec_segment_size);
7b8589cc29e7c3 Mimi Zohar 2016-12-19 112 if (!kexec_buffer) {
7b8589cc29e7c3 Mimi Zohar 2016-12-19 113 pr_err("Not enough memory for the kexec measurement buffer.\n");
7b8589cc29e7c3 Mimi Zohar 2016-12-19 114 return;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 115 }
7b8589cc29e7c3 Mimi Zohar 2016-12-19 116
7b8589cc29e7c3 Mimi Zohar 2016-12-19 117 kbuf.buffer = kexec_buffer;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 118 kbuf.bufsz = kexec_buffer_size;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 119 kbuf.memsz = kexec_segment_size;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 120 ret = kexec_add_buffer(&kbuf);
7b8589cc29e7c3 Mimi Zohar 2016-12-19 121 if (ret) {
7b8589cc29e7c3 Mimi Zohar 2016-12-19 122 pr_err("Error passing over kexec measurement buffer.\n");
6d14c6517885fa Lakshmi Ramasubramanian 2021-02-04 123 vfree(kexec_buffer);
7b8589cc29e7c3 Mimi Zohar 2016-12-19 124 return;
7b8589cc29e7c3 Mimi Zohar 2016-12-19 125 }
7b8589cc29e7c3 Mimi Zohar 2016-12-19 126
0c605158be3210 Lakshmi Ramasubramanian 2021-02-21 127 image->ima_buffer_addr = kbuf.mem;
0c605158be3210 Lakshmi Ramasubramanian 2021-02-21 128 image->ima_buffer_size = kexec_segment_size;
f31e3386a4e92b Lakshmi Ramasubramanian 2021-02-04 129 image->ima_buffer = kexec_buffer;
f31e3386a4e92b Lakshmi Ramasubramanian 2021-02-04 130
7b8589cc29e7c3 Mimi Zohar 2016-12-19 131 pr_debug("kexec measurement buffer for the loaded kernel at 0x%lx.\n",
7b8589cc29e7c3 Mimi Zohar 2016-12-19 132 kbuf.mem);
7b8589cc29e7c3 Mimi Zohar 2016-12-19 133 }
7b8589cc29e7c3 Mimi Zohar 2016-12-19 134 #endif /* IMA_KEXEC */
7b8589cc29e7c3 Mimi Zohar 2016-12-19 135
:::::: The code at line 81 was first introduced by commit
:::::: 7b8589cc29e7c35dcfd2d5138979f17b48f90110 ima: on soft reboot, save the measurement list
:::::: TO: Mimi Zohar <zohar(a)linux.vnet.ibm.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months