arch/m68k/kernel/signal.c:867:29: error: 'tregs' undeclared; did you mean 'regs'?
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git linux-4.4.y-st-rc head: 4daf8df4558b5aae717516f7e941014c463772c2 commit: 9cabe0442a98d77cc23fb8b8cd2549d5c8e8995a [1078/1809] m68k: Move signal frame following exception on 68020/030 config: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20240131/[email protected]/config) compiler: m68k-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
arch/m68k/kernel/signal.c: In function 'setup_frame':
>> arch/m68k/kernel/signal.c:867:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'?
frame = get_sigframe(ksig, tregs, sizeof(*frame) + fsize);
^~~~~
regs
arch/m68k/kernel/signal.c:867:29: note: each undeclared identifier is reported only once for each function it appears in
arch/m68k/kernel/signal.c: In function 'setup_rt_frame':
arch/m68k/kernel/signal.c:947:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'?
frame = get_sigframe(ksig, tregs, sizeof(*frame));
^~~~~
regsvim +867 arch/m68k/kernel/signal.c
850
851 static int setup_frame(struct ksignal *ksig, sigset_t *set,
852 struct pt_regs *regs)
853 {
854 struct sigframe __user *frame;
855 int fsize = frame_extra_sizes(regs->format);
856 struct sigcontext context;
857 int err = 0, sig = ksig->sig;
858
859 if (fsize < 0) {
860 #ifdef DEBUG
861 printk ("setup_frame: Unknown frame format %#x\n",
862 regs->format);
863 #endif
864 return -EFAULT;
865 }
866
> 867 frame = get_sigframe(ksig, tregs, sizeof(*frame) + fsize);
868
869 if (fsize)
870 err |= copy_to_user (frame + 1, regs + 1, fsize);
871
872 err |= __put_user(sig, &frame->sig);
873
874 err |= __put_user(regs->vector, &frame->code);
875 err |= __put_user(&frame->sc, &frame->psc);
876
877 if (_NSIG_WORDS > 1)
878 err |= copy_to_user(frame->extramask, &set->sig[1],
879 sizeof(frame->extramask));
880
881 setup_sigcontext(&context, regs, set->sig[0]);
882 err |= copy_to_user (&frame->sc, &context, sizeof(context));
883
884 /* Set up to return from userspace. */
885 #ifdef CONFIG_MMU
886 err |= __put_user(frame->retcode, &frame->pretcode);
887 /* moveq #,d0; trap #0 */
888 err |= __put_user(0x70004e40 + (__NR_sigreturn << 16),
889 (long __user *)(frame->retcode));
890 #else
891 err |= __put_user((void *) ret_from_user_signal, &frame->pretcode);
892 #endif
893
894 if (err)
895 return -EFAULT;
896
897 push_cache ((unsigned long) &frame->retcode);
898
899 /*
900 * Set up registers for signal handler. All the state we are about
901 * to destroy is successfully copied to sigframe.
902 */
903 wrusp ((unsigned long) frame);
904 regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
905 adjustformat(regs);
906
907 /*
908 * This is subtle; if we build more than one sigframe, all but the
909 * first one will see frame format 0 and have fsize == 0, so we won't
910 * screw stkadj.
911 */
912 if (fsize)
913 regs->stkadj = fsize;
914
915 /* Prepare to skip over the extra stuff in the exception frame. */
916 if (regs->stkadj) {
917 struct pt_regs *tregs =
918 (struct pt_regs *)((ulong)regs + regs->stkadj);
919 #ifdef DEBUG
920 printk("Performing stackadjust=%04x\n", regs->stkadj);
921 #endif
922 /* This must be copied with decreasing addresses to
923 handle overlaps. */
924 tregs->vector = 0;
925 tregs->format = 0;
926 tregs->pc = regs->pc;
927 tregs->sr = regs->sr;
928 }
929 return 0;
930 }
931
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Hi Finn,
incomplete patch backport? This patch needs commit 4bb0bd81ce5e9 as a prerequisite, I suppose?
Cheers,
Michael
Am 31.01.2024 um 14:48 schrieb kernel test robot:
Quoted 112 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git linux-4.4.y-st-rc head: 4daf8df4558b5aae717516f7e941014c463772c2 commit: 9cabe0442a98d77cc23fb8b8cd2549d5c8e8995a [1078/1809] m68k: Move signal frame following exception on 68020/030 config: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20240131/[email protected]/config) compiler: m68k-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
arch/m68k/kernel/signal.c: In function 'setup_frame':Quoted 1 line
Quoted 1 line
arch/m68k/kernel/signal.c:867:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'?frame = get_sigframe(ksig, tregs, sizeof(*frame) + fsize); ^~~~~ regs arch/m68k/kernel/signal.c:867:29: note: each undeclared identifier is reported only once for each function it appears in arch/m68k/kernel/signal.c: In function 'setup_rt_frame': arch/m68k/kernel/signal.c:947:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'? frame = get_sigframe(ksig, tregs, sizeof(*frame)); ^~~~~ regsvim +867
arch/m68k/kernel/signal.c850 851 static int setup_frame(struct ksignal *ksig, sigset_t *set, 852 struct pt_regs *regs) 853 { 854 struct sigframe __user *frame; 855 int fsize = frame_extra_sizes(regs->format); 856 struct sigcontext context; 857 int err = 0, sig = ksig->sig; 858 859 if (fsize < 0) { 860 #ifdef DEBUG 861 printk ("setup_frame: Unknown frame format %#x\n", 862 regs->format); 863 #endif 864 return -EFAULT; 865 } 866Quoted 1 line
867 frame =
get_sigframe(ksig, tregs, sizeof(*frame) + fsize);868
869 if (fsize)870 err |= copy_to_user (frame + 1, regs + 1, fsize); 871 872 err |= __put_user(sig, &frame->sig); 873 874 err |= __put_user(regs->vector, &frame->code); 875 err |= __put_user(&frame->sc, &frame->psc); 876 877 if (_NSIG_WORDS > 1) 878 err |= copy_to_user(frame->extramask, &set->sig[1], 879 sizeof(frame->extramask)); 880 881 setup_sigcontext(&context, regs, set->sig[0]); 882 err |= copy_to_user (&frame->sc, &context, sizeof(context)); 883 884 /* Set up to return from userspace. */ 885 #ifdef CONFIG_MMU 886 err |= __put_user(frame->retcode, &frame->pretcode); 887 /* moveq #,d0; trap #0 */ 888 err |= __put_user(0x70004e40 + (__NR_sigreturn << 16), 889 (long __user *)(frame->retcode)); 890 #else 891 err |= __put_user((void *) ret_from_user_signal, &frame->pretcode); 892 #endif 893 894 if (err) 895 return -EFAULT; 896 897 push_cache ((unsigned long) &frame->retcode); 898 899 /* 900 * Set up registers for signal handler. All the state we are about 901 * to destroy is successfully copied to sigframe. 902 */ 903 wrusp ((unsigned long) frame); 904 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; 905 adjustformat(regs); 906 907 /* 908 * This is subtle; if we build more than one sigframe, all but the 909 * first one will see frame format 0 and have fsize == 0, so we won't 910 * screw stkadj. 911 */ 912 if (fsize) 913 regs->stkadj = fsize; 914 915 /* Prepare to skip over the extra stuff in the exception frame. */ 916 if (regs->stkadj) { 917 struct pt_regs *tregs = 918 (struct pt_regs *)((ulong)regs + regs->stkadj); 919 #ifdef DEBUG 920 printk("Performing stackadjust=%04x\n", regs->stkadj); 921 #endif 922 /* This must be copied with decreasing addresses to 923 handle overlaps. */ 924 tregs->vector = 0; 925 tregs->format = 0; 926 tregs->pc = regs->pc; 927 tregs->sr = regs->sr; 928 } 929 return 0; 930 } 931
Hello Michael
Quoted 5 lines · Michael Schmitz
Hi Finn,
incomplete patch backport? This patch needs commit
4bb0bd81ce5e9as a prerequisite, I suppose?
The v4.4 build failure below appears to come from a Civil Infrastructure Project (CIP) branch. v4.4.y is no longer an active -stable branch and has fallen from my radar too.
Many of Al Viro's fixes have not been backported. When I build v4.14.y binaries for upload to the mac68k project on sourceforge, I backport those fixes myself.
To answer your question, after a shallow reading of 4bb0bd81ce5e9, I don't see anything that would prevent backporting that commit to v4.4 but that would need to be tested. Unfortunately my git repo is suffering from "bad packed object CRC" right now, and I haven't had time to repair it yet.
I can see the value in backporting all of those fixes -- both Al's fixes and our own -- but there is some work involved. The v4.19.y banch could be a more realisitic goal. Hard to say... I'm not familiar with the CIP and its aims.
Regards
Finn
Quoted 141 lines
Cheers,
Michael
Am 31.01.2024 um 14:48 schrieb kernel test robot:
Quoted 134 lines
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cip/linux-cip.git
linux-4.4.y-st-rchead: 4daf8df4558b5aae717516f7e941014c463772c2 commit: 9cabe0442a98d77cc23fb8b8cd2549d5c8e8995a [1078/1809] m68k: Movesignal frame following exception on 68020/030
config: m68k-allnoconfig
(https://download.01.org/0day-ci/archive/20240131/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
(https://download.01.org/0day-ci/archive/20240131/[email protected]/reproduce)If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags| Reported-by: kernel test robot <[email protected]> | Closes: | https://lore.kernel.org/oe-kbuild-all/[email protected]/All errors (new ones prefixed by >>):
arch/m68k/kernel/signal.c: In function 'setup_frame':Quoted 2 lines
Quoted 2 lines
arch/m68k/kernel/signal.c:867:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'?frame = get_sigframe(ksig, tregs, sizeof(*frame) + fsize); ^~~~~ regs arch/m68k/kernel/signal.c:867:29: note: each undeclared identifier is reported only once for each function it appears in arch/m68k/kernel/signal.c: In function 'setup_rt_frame': arch/m68k/kernel/signal.c:947:29: error: 'tregs' undeclared (first use in this function); did you mean 'regs'? frame = get_sigframe(ksig, tregs, sizeof(*frame)); ^~~~~ regsvim +867
arch/m68k/kernel/signal.c850 851 static int setup_frame(struct ksignal *ksig, sigset_t *set, 852 struct pt_regs *regs) 853 { 854 struct sigframe __user *frame; 855 int fsize = frame_extra_sizes(regs->format); 856 struct sigcontext context; 857 int err = 0, sig = ksig->sig; 858 859 if (fsize < 0) { 860 #ifdef DEBUG 861 printk ("setup_frame: Unknown frame format %#x\n", 862 regs->format); 863 #endif 864 return -EFAULT; 865 } 866Quoted 2 lines
867 frame = get_sigframe(ksig, tregs,
sizeof(*frame)+
fsize);868
869 if (fsize)
870 err |=copy_to_user(frame + 1, regs + 1,fsize); 871 872 err |= __put_user(sig, &frame->sig); 873 874 err |= __put_user(regs->vector, &frame->code); 875 err |= __put_user(&frame->sc, &frame->psc); 876 877 if (_NSIG_WORDS > 1) 878 err |= copy_to_user(frame->extramask, &set->sig[1], 879 sizeof(frame->extramask)); 880 881 setup_sigcontext(&context, regs, set->sig[0]); 882 err |= copy_to_user (&frame->sc, &context, sizeof(context)); 883 884 /* Set up to return from userspace. */ 885 #ifdef CONFIG_MMU 886 err |= __put_user(frame->retcode, &frame->pretcode); 887 /* moveq #,d0; trap #0 */ 888 err |= __put_user(0x70004e40 + (__NR_sigreturn << 16), 889 (long __user *)(frame->retcode)); 890 #else 891 err |= __put_user((void *) ret_from_user_signal, &frame->pretcode); 892 #endif 893 894 if (err) 895 return -EFAULT; 896 897 push_cache ((unsigned long) &frame->retcode); 898 899 /* 900 * Set up registers for signal handler. All the state we are about 901 * to destroy is successfully copied to sigframe. 902 */ 903 wrusp ((unsigned long) frame); 904 regs->pc = (unsigned long) ksig->ka.sa.sa_handler; 905 adjustformat(regs); 906 907 /* 908 * This is subtle; if we build more than one sigframe, all but the 909 * first one will see frame format 0 and have fsize == 0, so we won't 910 * screw stkadj. 911 */ 912 if (fsize) 913 regs->stkadj = fsize; 914 915 /* Prepare to skip over the extra stuff in the exception frame. */ 916 if (regs->stkadj) { 917 struct pt_regs *tregs = 918 (struct pt_regs *)((ulong)regs + regs->stkadj); 919 #ifdef DEBUG 920 printk("Performing stackadjust=%04x\n", regs->stkadj); 921 #endif 922 /* This must be copied with decreasing addresses to 923 handle overlaps. */ 924 tregs->vector = 0; 925 tregs->format = 0; 926 tregs->pc = regs->pc; 927 tregs->sr = regs->sr; 928 } 929 return 0; 930 } 931