Linux-Next discussions
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>, Kees Cook <kees@kernel.org>,
	Joel Granados <joel.granados@kernel.org>,
	Feng Tang <feng.tang@linux.alibaba.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: manual merge of the sysctl tree with the mm-nonmm-unstable tree
Date: Thu, 31 Jul 2025 11:05:21 +1000	[thread overview]
Message-ID: <20250731110521.0cf9d6a2@canb.auug.org.au> (raw)
In-Reply-To: <20250708190003.4eabc8ab@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 3758 bytes --]

Hi all,

On Tue, 8 Jul 2025 19:00:03 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the sysctl tree got a conflict in:
> 
>   kernel/panic.c
> 
> between commits:
> 
>   f8dbd6138e05 ("panic: add 'panic_sys_info' sysctl to take human readable string parameter")
>   3699d83ae18b ("panic: add note that panic_print sysctl interface is deprecated")
> 
> from the mm-nonmm-unstable tree and commits:
> 
>   48f1dc94d25e ("sysctl: Move tainted ctl_table into kernel/panic.c")
>   9aa4e27ef60c ("sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c")
> 
> from the sysctl tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> 
> diff --cc kernel/panic.c
> index df92b763f857,64e58835086d..000000000000
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@@ -78,13 -84,50 +78,56 @@@ ATOMIC_NOTIFIER_HEAD(panic_notifier_lis
>   EXPORT_SYMBOL(panic_notifier_list);
>   
>   #ifdef CONFIG_SYSCTL
>  +static int sysctl_panic_print_handler(const struct ctl_table *table, int write,
>  +			   void *buffer, size_t *lenp, loff_t *ppos)
>  +{
>  +	pr_info_once("Kernel: 'panic_print' sysctl interface will be obsoleted by both 'panic_sys_info' and 'panic_console_replay'\n");
>  +	return proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
>  +}
>   
> + /*
> +  * Taint values can only be increased
> +  * This means we can safely use a temporary.
> +  */
> + static int proc_taint(const struct ctl_table *table, int write,
> + 			       void *buffer, size_t *lenp, loff_t *ppos)
> + {
> + 	struct ctl_table t;
> + 	unsigned long tmptaint = get_taint();
> + 	int err;
> + 
> + 	if (write && !capable(CAP_SYS_ADMIN))
> + 		return -EPERM;
> + 
> + 	t = *table;
> + 	t.data = &tmptaint;
> + 	err = proc_doulongvec_minmax(&t, write, buffer, lenp, ppos);
> + 	if (err < 0)
> + 		return err;
> + 
> + 	if (write) {
> + 		int i;
> + 
> + 		/*
> + 		 * If we are relying on panic_on_taint not producing
> + 		 * false positives due to userspace input, bail out
> + 		 * before setting the requested taint flags.
> + 		 */
> + 		if (panic_on_taint_nousertaint && (tmptaint & panic_on_taint))
> + 			return -EINVAL;
> + 
> + 		/*
> + 		 * Poor man's atomic or. Not worth adding a primitive
> + 		 * to everyone's atomic.h for this
> + 		 */
> + 		for (i = 0; i < TAINT_FLAGS_COUNT; i++)
> + 			if ((1UL << i) & tmptaint)
> + 				add_taint(i, LOCKDEP_STILL_OK);
> + 	}
> + 
> + 	return err;
> + }
> + 
>   static const struct ctl_table kern_panic_table[] = {
>   #ifdef CONFIG_SMP
>   	{
> @@@ -134,13 -183,16 +183,23 @@@
>   		.mode           = 0644,
>   		.proc_handler   = proc_douintvec,
>   	},
>  +	{
>  +		.procname	= "panic_sys_info",
>  +		.data		= &panic_print,
>  +		.maxlen         = sizeof(panic_print),
>  +		.mode		= 0644,
>  +		.proc_handler	= sysctl_sys_info_handler,
>  +	},
> + #if (defined(CONFIG_X86_32) || defined(CONFIG_PARISC)) && \
> + 	defined(CONFIG_DEBUG_STACKOVERFLOW)
> + 	{
> + 		.procname	= "panic_on_stackoverflow",
> + 		.data		= &sysctl_panic_on_stackoverflow,
> + 		.maxlen		= sizeof(int),
> + 		.mode		= 0644,
> + 		.proc_handler	= proc_dointvec,
> + 	},
> + #endif
>   };
>   
>   static __init int kernel_panic_sysctls_init(void)

This is now a conflict between the mm-nonmm-stable tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2025-07-31  1:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-08  9:00 linux-next: manual merge of the sysctl tree with the mm-nonmm-unstable tree Stephen Rothwell
2025-07-22  9:58 ` Joel Granados
2025-07-22 23:10   ` Stephen Rothwell
2025-07-31  1:05 ` Stephen Rothwell [this message]
2025-08-04  7:53   ` Joel Granados
  -- strict thread matches above, loose matches on Subject: below --
2026-07-28 17:39 Mark Brown
2026-07-28 20:47 ` Andrew Morton
2026-08-04  7:36   ` Joel Granados
2026-08-04  7:54     ` Joel Granados
2026-08-04 20:14       ` Andrew Morton
2026-08-05  8:06         ` Joel Granados
2026-08-06 18:04           ` Oleg Nesterov
2026-08-07  9:21             ` Joel Granados
2026-08-04  7:44 ` Joel Granados

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250731110521.0cf9d6a2@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=feng.tang@linux.alibaba.com \
    --cc=joel.granados@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox