lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201912141356.iuWYkARx%lkp@intel.com>
Date:   Sat, 14 Dec 2019 13:02:58 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Oskar Senft <osk@...gle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/tty/serial/8250/8250_aspeed_vuart.c:501:1: warning: the
 frame size of 1040 bytes is larger than 1024 bytes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   37d4e84f765bb3038ddfeebdc5d1cfd7e1ef688f
commit: 8d310c9107a2a3f19dc7bb54dd50f70c65ef5409 drivers/tty/serial/8250: Make Aspeed VUART SIRQ polarity configurable
date:   2 months ago
config: mips-randconfig-a001-20191214 (attached as .config)
compiler: mips64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8d310c9107a2a3f19dc7bb54dd50f70c65ef5409
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=mips 

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

All warnings (new ones prefixed by >>):

   drivers/tty/serial/8250/8250_aspeed_vuart.c: In function 'aspeed_vuart_probe':
>> drivers/tty/serial/8250/8250_aspeed_vuart.c:501:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^

vim +501 drivers/tty/serial/8250/8250_aspeed_vuart.c

8d310c9107a2a3 Oskar Senft        2019-09-05  373  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  374  static int aspeed_vuart_probe(struct platform_device *pdev)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  375  {
8d310c9107a2a3 Oskar Senft        2019-09-05  376  	struct of_phandle_args sirq_polarity_sense_args;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  377  	struct uart_8250_port port;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  378  	struct aspeed_vuart *vuart;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  379  	struct device_node *np;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  380  	struct resource *res;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  381  	u32 clk, prop;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  382  	int rc;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  383  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  384  	np = pdev->dev.of_node;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  385  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  386  	vuart = devm_kzalloc(&pdev->dev, sizeof(*vuart), GFP_KERNEL);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  387  	if (!vuart)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  388  		return -ENOMEM;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  389  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  390  	vuart->dev = &pdev->dev;
5909c0bf9c7a17 Jeremy Kerr        2018-03-27  391  	timer_setup(&vuart->unthrottle_timer, aspeed_vuart_unthrottle_exp, 0);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  392  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  393  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  394  	vuart->regs = devm_ioremap_resource(&pdev->dev, res);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  395  	if (IS_ERR(vuart->regs))
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  396  		return PTR_ERR(vuart->regs);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  397  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  398  	memset(&port, 0, sizeof(port));
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  399  	port.port.private_data = vuart;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  400  	port.port.membase = vuart->regs;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  401  	port.port.mapbase = res->start;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  402  	port.port.mapsize = resource_size(res);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  403  	port.port.startup = aspeed_vuart_startup;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  404  	port.port.shutdown = aspeed_vuart_shutdown;
989983ea849d94 Jeremy Kerr        2018-03-27  405  	port.port.throttle = aspeed_vuart_throttle;
989983ea849d94 Jeremy Kerr        2018-03-27  406  	port.port.unthrottle = aspeed_vuart_unthrottle;
989983ea849d94 Jeremy Kerr        2018-03-27  407  	port.port.status = UPSTAT_SYNC_FIFO;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  408  	port.port.dev = &pdev->dev;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  409  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  410  	rc = sysfs_create_group(&vuart->dev->kobj, &aspeed_vuart_attr_group);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  411  	if (rc < 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  412  		return rc;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  413  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  414  	if (of_property_read_u32(np, "clock-frequency", &clk)) {
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  415  		vuart->clk = devm_clk_get(&pdev->dev, NULL);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  416  		if (IS_ERR(vuart->clk)) {
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  417  			dev_warn(&pdev->dev,
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  418  				"clk or clock-frequency not defined\n");
cbafe9d5c34673 Alexey Khoroshilov 2017-07-28  419  			rc = PTR_ERR(vuart->clk);
cbafe9d5c34673 Alexey Khoroshilov 2017-07-28  420  			goto err_sysfs_remove;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  421  		}
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  422  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  423  		rc = clk_prepare_enable(vuart->clk);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  424  		if (rc < 0)
cbafe9d5c34673 Alexey Khoroshilov 2017-07-28  425  			goto err_sysfs_remove;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  426  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  427  		clk = clk_get_rate(vuart->clk);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  428  	}
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  429  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  430  	/* If current-speed was set, then try not to change it. */
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  431  	if (of_property_read_u32(np, "current-speed", &prop) == 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  432  		port.port.custom_divisor = clk / (16 * prop);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  433  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  434  	/* Check for shifted address mapping */
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  435  	if (of_property_read_u32(np, "reg-offset", &prop) == 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  436  		port.port.mapbase += prop;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  437  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  438  	/* Check for registers offset within the devices address range */
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  439  	if (of_property_read_u32(np, "reg-shift", &prop) == 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  440  		port.port.regshift = prop;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  441  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  442  	/* Check for fifo size */
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  443  	if (of_property_read_u32(np, "fifo-size", &prop) == 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  444  		port.port.fifosize = prop;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  445  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  446  	/* Check for a fixed line number */
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  447  	rc = of_alias_get_id(np, "serial");
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  448  	if (rc >= 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  449  		port.port.line = rc;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  450  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  451  	port.port.irq = irq_of_parse_and_map(np, 0);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  452  	port.port.irqflags = IRQF_SHARED;
5909c0bf9c7a17 Jeremy Kerr        2018-03-27  453  	port.port.handle_irq = aspeed_vuart_handle_irq;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  454  	port.port.iotype = UPIO_MEM;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  455  	port.port.type = PORT_16550A;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  456  	port.port.uartclk = clk;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  457  	port.port.flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  458  		| UPF_FIXED_PORT | UPF_FIXED_TYPE | UPF_NO_THRE_TEST;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  459  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  460  	if (of_property_read_bool(np, "no-loopback-test"))
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  461  		port.port.flags |= UPF_SKIP_TEST;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  462  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  463  	if (port.port.fifosize)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  464  		port.capabilities = UART_CAP_FIFO;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  465  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  466  	if (of_property_read_bool(np, "auto-flow-control"))
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  467  		port.capabilities |= UART_CAP_AFE;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  468  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  469  	rc = serial8250_register_8250_port(&port);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  470  	if (rc < 0)
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  471  		goto err_clk_disable;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  472  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  473  	vuart->line = rc;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  474  
8d310c9107a2a3 Oskar Senft        2019-09-05  475  	rc = of_parse_phandle_with_fixed_args(
8d310c9107a2a3 Oskar Senft        2019-09-05  476  		np, "aspeed,sirq-polarity-sense", 2, 0,
8d310c9107a2a3 Oskar Senft        2019-09-05  477  		&sirq_polarity_sense_args);
8d310c9107a2a3 Oskar Senft        2019-09-05  478  	if (rc < 0) {
8d310c9107a2a3 Oskar Senft        2019-09-05  479  		dev_dbg(&pdev->dev,
8d310c9107a2a3 Oskar Senft        2019-09-05  480  			"aspeed,sirq-polarity-sense property not found\n");
8d310c9107a2a3 Oskar Senft        2019-09-05  481  	} else {
8d310c9107a2a3 Oskar Senft        2019-09-05  482  		aspeed_vuart_auto_configure_sirq_polarity(
8d310c9107a2a3 Oskar Senft        2019-09-05  483  			vuart, sirq_polarity_sense_args.np,
8d310c9107a2a3 Oskar Senft        2019-09-05  484  			sirq_polarity_sense_args.args[0],
8d310c9107a2a3 Oskar Senft        2019-09-05  485  			BIT(sirq_polarity_sense_args.args[1]));
8d310c9107a2a3 Oskar Senft        2019-09-05  486  		of_node_put(sirq_polarity_sense_args.np);
8d310c9107a2a3 Oskar Senft        2019-09-05  487  	}
8d310c9107a2a3 Oskar Senft        2019-09-05  488  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  489  	aspeed_vuart_set_enabled(vuart, true);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  490  	aspeed_vuart_set_host_tx_discard(vuart, true);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  491  	platform_set_drvdata(pdev, vuart);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  492  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  493  	return 0;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  494  
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  495  err_clk_disable:
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  496  	clk_disable_unprepare(vuart->clk);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  497  	irq_dispose_mapping(port.port.irq);
cbafe9d5c34673 Alexey Khoroshilov 2017-07-28  498  err_sysfs_remove:
cbafe9d5c34673 Alexey Khoroshilov 2017-07-28  499  	sysfs_remove_group(&vuart->dev->kobj, &aspeed_vuart_attr_group);
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  500  	return rc;
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02 @501  }
7fbcf3afe6e8e1 Jeremy Kerr        2017-05-02  502  

:::::: The code at line 501 was first introduced by commit
:::::: 7fbcf3afe6e8e180bfc39fb3f41657fa6e4af55c drivers/serial: Add driver for Aspeed virtual UART

:::::: TO: Jeremy Kerr <jk@...abs.org>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ