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]
Date:   Thu, 8 Jul 2021 21:37:23 +0800
From:   kernel test robot <lkp@...el.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [linux-rt-devel:linux-5.13.y-rt-rebase 9/222]
 kernel/printk/printk.c:2648:4: error: implicit declaration of function
 'latched_seq_write'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-rebase
head:   7e175e6b59975c8901ad370f7818937f68de45c1
commit: 7995ace9ab04969b9d5577e5fd74d77765c7d917 [9/222] printk: use seqcount_latch for console_seq
config: i386-tinyconfig (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/rt/linux-rt-devel.git/commit/?id=7995ace9ab04969b9d5577e5fd74d77765c7d917
        git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
        git fetch --no-tags linux-rt-devel linux-5.13.y-rt-rebase
        git checkout 7995ace9ab04969b9d5577e5fd74d77765c7d917
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   kernel/printk/printk.c:176:5: warning: no previous prototype for 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes]
     176 | int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/printk/printk.c:2282:2: error: #error FIXME
    2282 | #error FIXME
         |  ^~~~~
   kernel/printk/printk.c: In function 'console_unlock':
   kernel/printk/printk.c:2642:9: error: implicit declaration of function 'latched_seq_read_nolock' [-Werror=implicit-function-declaration]
    2642 |   seq = latched_seq_read_nolock(&console_seq);
         |         ^~~~~~~~~~~~~~~~~~~~~~~
>> kernel/printk/printk.c:2648:4: error: implicit declaration of function 'latched_seq_write' [-Werror=implicit-function-declaration]
    2648 |    latched_seq_write(&console_seq, r.info->seq);
         |    ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/latched_seq_write +2648 kernel/printk/printk.c

  2576	
  2577	/**
  2578	 * console_unlock - unlock the console system
  2579	 *
  2580	 * Releases the console_lock which the caller holds on the console system
  2581	 * and the console driver list.
  2582	 *
  2583	 * While the console_lock was held, console output may have been buffered
  2584	 * by printk().  If this is the case, console_unlock(); emits
  2585	 * the output prior to releasing the lock.
  2586	 *
  2587	 * If there is output waiting, we wake /dev/kmsg and syslog() users.
  2588	 *
  2589	 * console_unlock(); may be called from any context.
  2590	 */
  2591	void console_unlock(void)
  2592	{
  2593		static char ext_text[CONSOLE_EXT_LOG_MAX];
  2594		static char text[CONSOLE_LOG_MAX];
  2595		unsigned long flags;
  2596		bool do_cond_resched, retry;
  2597		struct printk_info info;
  2598		struct printk_record r;
  2599		u64 seq;
  2600	
  2601		if (console_suspended) {
  2602			up_console_sem();
  2603			return;
  2604		}
  2605	
  2606		prb_rec_init_rd(&r, &info, text, sizeof(text));
  2607	
  2608		/*
  2609		 * Console drivers are called with interrupts disabled, so
  2610		 * @console_may_schedule should be cleared before; however, we may
  2611		 * end up dumping a lot of lines, for example, if called from
  2612		 * console registration path, and should invoke cond_resched()
  2613		 * between lines if allowable.  Not doing so can cause a very long
  2614		 * scheduling stall on a slow console leading to RCU stall and
  2615		 * softlockup warnings which exacerbate the issue with more
  2616		 * messages practically incapacitating the system.
  2617		 *
  2618		 * console_trylock() is not able to detect the preemptive
  2619		 * context reliably. Therefore the value must be stored before
  2620		 * and cleared after the "again" goto label.
  2621		 */
  2622		do_cond_resched = console_may_schedule;
  2623	again:
  2624		console_may_schedule = 0;
  2625	
  2626		/*
  2627		 * We released the console_sem lock, so we need to recheck if
  2628		 * cpu is online and (if not) is there at least one CON_ANYTIME
  2629		 * console.
  2630		 */
  2631		if (!can_use_console()) {
  2632			console_locked = 0;
  2633			up_console_sem();
  2634			return;
  2635		}
  2636	
  2637		for (;;) {
  2638			size_t ext_len = 0;
  2639			size_t len;
  2640	
  2641	skip:
  2642			seq = latched_seq_read_nolock(&console_seq);
  2643			if (!prb_read_valid(prb, seq, &r))
  2644				break;
  2645	
  2646			if (seq != r.info->seq) {
  2647				console_dropped += r.info->seq - seq;
> 2648				latched_seq_write(&console_seq, r.info->seq);
  2649				seq = r.info->seq;
  2650			}
  2651	
  2652			if (suppress_message_printing(r.info->level)) {
  2653				/*
  2654				 * Skip record we have buffered and already printed
  2655				 * directly to the console when we received it, and
  2656				 * record that has level above the console loglevel.
  2657				 */
  2658				latched_seq_write(&console_seq, seq + 1);
  2659				goto skip;
  2660			}
  2661	
  2662			/* Output to all consoles once old messages replayed. */
  2663			if (unlikely(exclusive_console &&
  2664				     seq >= exclusive_console_stop_seq)) {
  2665				exclusive_console = NULL;
  2666			}
  2667	
  2668			/*
  2669			 * Handle extended console text first because later
  2670			 * record_print_text() will modify the record buffer in-place.
  2671			 */
  2672			if (nr_ext_console_drivers) {
  2673				ext_len = info_print_ext_header(ext_text,
  2674							sizeof(ext_text),
  2675							r.info);
  2676				ext_len += msg_print_ext_body(ext_text + ext_len,
  2677							sizeof(ext_text) - ext_len,
  2678							&r.text_buf[0],
  2679							r.info->text_len,
  2680							&r.info->dev_info);
  2681			}
  2682			len = record_print_text(&r,
  2683					console_msg_format & MSG_FORMAT_SYSLOG,
  2684					printk_time);
  2685			latched_seq_write(&console_seq, seq + 1);
  2686	
  2687			printk_safe_enter_irqsave(flags);
  2688	
  2689			/*
  2690			 * While actively printing out messages, if another printk()
  2691			 * were to occur on another CPU, it may wait for this one to
  2692			 * finish. This task can not be preempted if there is a
  2693			 * waiter waiting to take over.
  2694			 */
  2695			console_lock_spinning_enable();
  2696	
  2697			stop_critical_timings();	/* don't trace print latency */
  2698			call_console_drivers(ext_text, ext_len, text, len);
  2699			start_critical_timings();
  2700	
  2701			if (console_lock_spinning_disable_and_check()) {
  2702				printk_safe_exit_irqrestore(flags);
  2703				return;
  2704			}
  2705	
  2706			printk_safe_exit_irqrestore(flags);
  2707	
  2708			if (do_cond_resched)
  2709				cond_resched();
  2710		}
  2711	
  2712		console_locked = 0;
  2713	
  2714		up_console_sem();
  2715	
  2716		/*
  2717		 * Someone could have filled up the buffer again, so re-check if there's
  2718		 * something to flush. In case we cannot trylock the console_sem again,
  2719		 * there's a new owner and the console_unlock() from them will do the
  2720		 * flush, no worries.
  2721		 */
  2722		retry = prb_read_valid(prb, latched_seq_read_nolock(&console_seq), NULL);
  2723		if (retry && console_trylock())
  2724			goto again;
  2725	}
  2726	EXPORT_SYMBOL(console_unlock);
  2727	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ