Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp734396pxu; Fri, 23 Oct 2020 11:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIFz5tm2YO7ESl8651iQro6Qj/fcm2xuRPRj6k3GlSzV2P6XCjM3axIPeBxwZV3i6MQh87 X-Received: by 2002:a17:906:513:: with SMTP id j19mr3425081eja.129.1603479417554; Fri, 23 Oct 2020 11:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603479417; cv=none; d=google.com; s=arc-20160816; b=AK6+c5faFaFNbWE5l6/wPYFsDOYwTiCdyHWmnm/AOLXYXm1xCujJxv4nxmUzKD//kc 6pEppks0XWckrE2UpYu9ei6eRF2z28rKL/K5SReqqr22RSWSNPQ28LPOdzhe2ZVTpjts QpbwLKInLCk2mQVdOFWiC75/OuGrhxmQRcH33nPg9+jqYpxVihhWIdskLeIBciY56Pwj ND6NsVh/Z8rXAbeb9jvROcXMTVbkN4ENmqX9AbjE+Qkcb7XFLQ9YNODXdGEHBUviDbVf H5NqDjmO79y/oU0XNia8/J0cItn/lZ/EYVE0z55JCFQg0ReLIT/wwYW8qUGIXWex3wZA 6J9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=o1VEizSN6TM+raklNtIXpsapMZWxETouBV0mamAPQo0=; b=CwMCInxGJxMrzUXZ2pQQI4+rgayudvf+jC0I8uCfwieat7myoNQg0jhJcLuM/MGIqc CBR/LqxJ6YeHhAMbvG5E5YdenqeyLn5k4Phi8HsnjTmAL1X+0xZ46mlj3OIbot8jsSBD 2qd82dNGqNXjgtv6AQTjG/7XPa9z4SJhXCkIulobLQ9NtKa6IOYmbtmOS8lGZxmgzUfM OKl2Li5Kwq4gX1JMfKq02QbpFzDrE/w1WjbbfYMY4EyEblTFPVC9A9UNBbZ0svuLfst9 mi0qEVLOSI6AiBcVbwwexJNTbLoM7bCGFCeuAKPwMXOn/lRfpL4Qlc1zjWa2EdmbDDLe kvlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+Gg9uIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si1326872edj.549.2020.10.23.11.56.35; Fri, 23 Oct 2020 11:56:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+Gg9uIC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751460AbgJWRAZ (ORCPT + 99 others); Fri, 23 Oct 2020 13:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751221AbgJWRAY (ORCPT ); Fri, 23 Oct 2020 13:00:24 -0400 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69C11C0613D2 for ; Fri, 23 Oct 2020 10:00:24 -0700 (PDT) Received: by mail-il1-x141.google.com with SMTP id w17so2021790ilg.8 for ; Fri, 23 Oct 2020 10:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=o1VEizSN6TM+raklNtIXpsapMZWxETouBV0mamAPQo0=; b=V+Gg9uICyKn5tIe46atfWAON+AixWQBBQ6Pn1mKsJ9LTyk3eEKENj8UdU0jz8oEJ/T iY3pDKKGEDsjM5zsL71qeD2upMbTwf/0oJPU2qhreG0VoH8Btr+eBgBDvB9g58CZSQ96 Sgr8eEMx01tJ+JJaSGqxsdIW8XuWtidjH3RUren590Av2KVvyiUDBkwd3pzRSI5r/akg 4Be7/bT6OAM0TaD6IR1KR8VzV6ouQZqBCGjLPr0uzK1WtJoC3shbqQqA3Z4hhhb9EDl9 hZ/RmeUyYqgXTzKPMWN2s3dmpVJISsGiyopT/jpiQLJijpHH+ZJruUA+qldH7HfKM+2Z DsWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=o1VEizSN6TM+raklNtIXpsapMZWxETouBV0mamAPQo0=; b=nCwj/HTuKAr7ghCIf6m75QzcIag6m3MbyOuCXQIa0Cs6txRVcrjO59ardYjMD3TJjy pvixUl+y69JiOitGvJvz7OD5t/1eQPqJcd7sGcgt+Sy/YVQFzwvbWQihFzcthVw2GrHz UdFMWuvMHJxwKfybhML93kr+fr5KHVCoxUAZiSHTrZYCAL7ROovPbNwOwuYFXBu0pTdp ZAC+lsKBdB7dlgRSMMXwP4WSIqtb2CRwoSKX38LAvlbvgf6Q2pCjMlcy/lgjfukqKfGf Cw4h7IU3Gq2WJizzHVopvo51putNulEs6veN+PmvhnRa8Jd0R10wA1BYdT+jiE6fle1v 7KVQ== X-Gm-Message-State: AOAM531JfRhIXsjjAQHvD28OYA0VHNEypGGgeQjWerahtU2bVH/0igAM FLUHHRSWFVg0kbXFk5HNoMsPWvuhfh+qIgoYPViigg== X-Received: by 2002:a92:b6d2:: with SMTP id m79mr1190406ill.216.1603472422474; Fri, 23 Oct 2020 10:00:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Fri, 23 Oct 2020 22:30:11 +0530 Message-ID: Subject: Re: [LTP] mmstress[1309]: segfault at 7f3d71a36ee8 ip 00007f3d77132bdf sp 00007f3d71a36ee8 error 4 in libc-2.27.so[7f3d77058000+1aa000] To: Linus Torvalds Cc: =?UTF-8?B?RGFuaWVsIETDrWF6?= , Stephen Rothwell , "Matthew Wilcox (Oracle)" , "Peter Zijlstra (Intel)" , Viresh Kumar , X86 ML , open list , lkft-triage@lists.linaro.org, "Eric W. Biederman" , linux-mm , linux-m68k , Linux-Next Mailing List , Thomas Gleixner , kasan-dev , Dmitry Vyukov , Geert Uytterhoeven , Christian Brauner , Ingo Molnar , LTP List , Al Viro Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 23 Oct 2020 at 08:35, Linus Torvalds wrote: > > On Thu, Oct 22, 2020 at 6:36 PM Daniel D=C3=ADaz = wrote: > > > > The kernel Naresh originally referred to is here: > > https://builds.tuxbuild.com/SCI7Xyjb7V2NbfQ2lbKBZw/ > > is unnecessary (because the 8-byte case is still just a single > register, no %eax:%edx games needed), it would be interesting to hear > if the attached patch fixes it. That would confirm that the problem > really is due to some register allocation issue interaction (or, > alternatively, it would tell me that there's something else going on). [Old patch from yesterday] After applying your patch on top on linux next tag 20201015 there are two observations, 1) i386 build failed. please find build error build 2) x86_64 kasan test PASS and the reported error not found. i386 build failure, ---------------------- make -sk KBUILD_BUILD_USER=3DTuxBuild -C/linux -j16 ARCH=3Di386 HOSTCC=3Dgc= c CC=3D"sccache gcc" O=3Dbuild # In file included from ../include/linux/uaccess.h:11, from ../arch/x86/include/asm/fpu/xstate.h:5, from ../arch/x86/include/asm/pgtable.h:26, from ../include/linux/pgtable.h:6, from ../include/linux/mm.h:33, from ../include/linux/memblock.h:13, from ../fs/proc/page.c:2: ../fs/proc/page.c: In function =E2=80=98kpagecgroup_read=E2=80=99: ../arch/x86/include/asm/uaccess.h:217:2: error: inconsistent operand constraints in an =E2=80=98asm=E2=80=99 217 | asm volatile("call __" #fn "_%P[size]" \ | ^~~ ../arch/x86/include/asm/uaccess.h:244:44: note: in expansion of macro =E2=80=98do_put_user_call=E2=80=99 244 | #define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); }) | ^~~~~~~~~~~~~~~~ ../fs/proc/page.c:307:7: note: in expansion of macro =E2=80=98put_user=E2= =80=99 307 | if (put_user(ino, out)) { | ^~~~~~~~ make[3]: *** [../scripts/Makefile.build:283: fs/proc/page.o] Error 1 make[3]: Target '__build' not remade because of errors. make[2]: *** [../scripts/Makefile.build:500: fs/proc] Error 2 In file included from ../include/linux/uaccess.h:11, from ../include/linux/sched/task.h:11, from ../include/linux/sched/signal.h:9, from ../include/linux/rcuwait.h:6, from ../include/linux/percpu-rwsem.h:7, from ../include/linux/fs.h:33, from ../include/linux/cgroup.h:17, from ../include/linux/memcontrol.h:13, from ../include/linux/swap.h:9, from ../include/linux/suspend.h:5, from ../kernel/power/user.c:10: ../kernel/power/user.c: In function =E2=80=98snapshot_ioctl=E2=80=99: ../arch/x86/include/asm/uaccess.h:217:2: error: inconsistent operand constraints in an =E2=80=98asm=E2=80=99 217 | asm volatile("call __" #fn "_%P[size]" \ | ^~~ ../arch/x86/include/asm/uaccess.h:244:44: note: in expansion of macro =E2=80=98do_put_user_call=E2=80=99 244 | #define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); }) | ^~~~~~~~~~~~~~~~ ../kernel/power/user.c:340:11: note: in expansion of macro =E2=80=98put_use= r=E2=80=99 340 | error =3D put_user(size, (loff_t __user *)arg); | ^~~~~~~~ ../arch/x86/include/asm/uaccess.h:217:2: error: inconsistent operand constraints in an =E2=80=98asm=E2=80=99 217 | asm volatile("call __" #fn "_%P[size]" \ | ^~~ ../arch/x86/include/asm/uaccess.h:244:44: note: in expansion of macro =E2=80=98do_put_user_call=E2=80=99 244 | #define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); }) | ^~~~~~~~~~~~~~~~ ../kernel/power/user.c:346:11: note: in expansion of macro =E2=80=98put_use= r=E2=80=99 346 | error =3D put_user(size, (loff_t __user *)arg); | ^~~~~~~~ ../arch/x86/include/asm/uaccess.h:217:2: error: inconsistent operand constraints in an =E2=80=98asm=E2=80=99 217 | asm volatile("call __" #fn "_%P[size]" \ | ^~~ ../arch/x86/include/asm/uaccess.h:244:44: note: in expansion of macro =E2=80=98do_put_user_call=E2=80=99 244 | #define put_user(x, ptr) ({ might_fault(); do_put_user_call(put_user,x,ptr); }) | ^~~~~~~~~~~~~~~~ ../kernel/power/user.c:357:12: note: in expansion of macro =E2=80=98put_use= r=E2=80=99 357 | error =3D put_user(offset, (loff_t __user *)arg); | ^~~~~~~~ x86_64 Kasan tested and the reported issue not found. https://lkft.validation.linaro.org/scheduler/job/1868029#L2374 - Naresh