Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3468820pxb; Mon, 25 Jan 2021 17:49:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwu/PHqzzhfDh579oLGPUyPdYCOOZRqazCvm65dxovwMNAdYuXwFjJGN0JSAw1f32KR8qjX X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr2820379edc.174.1611625781430; Mon, 25 Jan 2021 17:49:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611625781; cv=none; d=google.com; s=arc-20160816; b=QXzBeQnmEOoeulfmrzsGq5IVKLUhNQ1lrHA9Y/O09wSvxWWbUbhO0TvUO86mT6tejh 99AFNfqsjnOXLi3shOXghFwqeEYVy2NGCS/atUL3hWY6YhoHpHj83dpqQv9Y/qr7LZ28 lHDlJsHql4M0fCUBkELU+vZ+ptfcHro/7wr5yIe8pZbdAb23crdqNRupGeWY7FuHU1W9 x6X00kJ20H0puqYFDW8ux2cDWPo6RdcSV05uDEnBYd/nUjs0DrKsl4yyyZ+wMGfrF1kz XTREUDiJnio9+gJmFBEnMvUju8/Plyk+mREEOQikB/SgWo0AWiM2FT6fqA7uQicO5Aea sAeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2RzgFx4bVzCyoVBI8IRrWv56bXh+C2simTbpmFGdt1c=; b=Q6wyvZL0h8Bfv/r7ykutJQL0r/PKD6za6uz9rZwrryeIO4g0/OE3O7tVwnXPCkAACo XYhHVvkusAKBALZgpde661eeu0YU6ophoqnsQLipokJ/X/a8m6+zbLTmZyYqGU8Taijf obIdpKRjbEsOav63lTrkbFB7ItGuPbWrtVm4ZMzo0FoEFoQ12z7pJV4LDDazYND0dkzx nGTJ364lx1ieSzKq9jiTP8qWUZPS8lay568EVlN6rcb4wBpcPnqPN/Vh0J6gnpCT/ZNj rq+ck6SHIu+BkMdyqWEU7/yFu+CF4tVGNcdCvwVNjVltNkrr+bhLmTd10Xj6IPqoiTZS 7jFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eyunknpL; 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 t14si8518173edd.161.2021.01.25.17.49.16; Mon, 25 Jan 2021 17:49:41 -0800 (PST) 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=eyunknpL; 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 S1730134AbhAYQdr (ORCPT + 99 others); Mon, 25 Jan 2021 11:33:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730612AbhAYQcn (ORCPT ); Mon, 25 Jan 2021 11:32:43 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A45DAC06174A for ; Mon, 25 Jan 2021 08:32:02 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id a10so18924779ejg.10 for ; Mon, 25 Jan 2021 08:32:02 -0800 (PST) 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; bh=2RzgFx4bVzCyoVBI8IRrWv56bXh+C2simTbpmFGdt1c=; b=eyunknpLzjfpE9Vh5qFqaREXOsPbYtFO6TDAKZYKCbFEv9x7t12KpcyXgVu9HeKU9f orT3yRZ2aXxMYJCWeWdFYNAks6JWCZG6u3G6oXvYIwZxGXPfpHuS6sN++w8HOYzpfZNe byE/VlgxRCzxHUxqW/A4mwOXw+YsJQAiY+e5kmmyeie+VaNc/WgdQMBrpNYI46kq/A5m hHjXSoWuD1VxXnBppunOqxQAEhfD6SXf/547Isyv41nTQGu/9dwp9CddYsasXVzQ0m/7 3yNCOfxkrgG1QD/rbyz4plhF4xkyOAvJ+aPCUUITizFpRQpkLkSNd3s3wR3lTD66m2hw kwAA== 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; bh=2RzgFx4bVzCyoVBI8IRrWv56bXh+C2simTbpmFGdt1c=; b=PYJpA5yfqh+Hf58ZsYSR5z6uirZHkS6DMZBBlnvt1vKDo51sDd6nGFIyfUiRxrPKZL 6NXKAErmvNidrUYMj9XwNkYedCw5dgIiwJQRTb4QbO1tmIyXrMdHp4dlBW7ZnpelX2BG 3ECZW5vbZfaLFwaFJr9ZZSaxVRs+a0v5WOuqu1D4RR/cvGObfdJoQf62AJW+LhejFnEH KZ0IS2m8dUg5u8UPcmTd1wbVi8XBbmd9Jtbg11G/xB/5gG03cwOiBofdOrACx4Jk6Gcs njwnEb+G2Xynh0SgbrFQiU8JwLZrhSa2/UiJJDYfiUwvhUJ4dvrTZqi0ywGBeOQLueBf 19Nw== X-Gm-Message-State: AOAM530lgKLfNHOKMUdCgcQ3LctwXnd5OS+dPUWxlthQVkCoEmOoOezp RDo5VSa/L4YBBnAEY01sAnmLF/y2Q7kA5WIPLDu0VQ== X-Received: by 2002:a17:907:104c:: with SMTP id oy12mr867060ejb.503.1611592321246; Mon, 25 Jan 2021 08:32:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Mon, 25 Jan 2021 22:01:48 +0530 Message-ID: Subject: Re: LTP: madvise08.c:203: TFAIL: No sequence in dump after MADV_DODUMP. To: Arnd Bergmann , Al Viro Cc: open list , Linux-Next Mailing List , LTP List , lkft-triage@lists.linaro.org, chrubis , Jan Stancek , Stephen Rothwell , Arnd Bergmann , "Eric W. Biederman" , Christian Brauner , Kees Cook , Peter Xu , Andrew Morton , Petr Vorel , Richard Palethorpe , Joerg.Vehlow@aox-tech.de Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On Mon, 25 Jan 2021 at 20:41, Arnd Bergmann wrote: > > On Mon, Jan 25, 2021 at 3:48 PM Naresh Kamboju > wrote: > > > > LTP syscalls madvise08 test case failed on all devices from > > Linux next 20210118 to till day. > > strace log attached to this email and link provided below. > > > > BAD: next-20210118 > > GOOD: next-20210115 > > > > This failure is easily reproducible on Linux next tag 20210118 above. > > > > tst_test.c:1250: TINFO: Timeout per run is 0h 15m 00s > > madvise08.c:73: TINFO: Temporary core pattern is > > '/scratch/ltp-2nftQzNI1K/HclFMH/dump-%p' > > madvise08.c:112: TINFO: Dump file should be dump-10109 > > madvise08.c:196: TPASS: madvise(..., MADV_DONTDUMP) > > madvise08.c:112: TINFO: Dump file should be dump-10110 > > madvise08.c:203: TFAIL: No sequence in dump after MADV_DODUMP. > > > > strace log, > > https://lkft.validation.linaro.org/scheduler/job/2184866#L1257 > > Ok, so in this part of the log, > > [pid 485] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, > si_pid=487, si_uid=0, si_status=SIGABRT, si_utime=0, si_stime=0} --- > [pid 485] write(2, \"madvise08.c:117: \33[1;34mTINFO: \33\"..., > 64madvise08.c:117: [1;34mTINFO: [0mDump file should be dump-487 > ) = 64 > [pid 485] access(\"dump-487\", F_OK) = 0 > [pid 485] openat(AT_FDCWD, \"dump-487\", O_RDONLY) = 3 > [pid 485] read(3, > \"\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\4\0>\0\1\0\0\0\0\0\0\0\0\0\0\0\"..., > 1024) = 1024 > [pid 485] read(3, > \"\0\320\3\0\0\0\0\0\0\340\375\24\304\177\0\0\0\0\0\0\0\0\0\0\0\20\0\0\0\0\0\0\"..., > 1024) = 292 > [pid 485] read(3, \"\", 1024) = 0 > [pid 485] close(3) = 0 > [pid 485] write(2, \"madvise08.c:208: \33[1;31mTFAIL: \33\"..., > 74madvise08.c:208: [1;31mTFAIL: [0mNo sequence in dump after > MADV_DODUMP. > > it seems that the data that was requested to be dumped with MADV_DODUMP is > indeed completely absent. > > There was exactly one commit that got merged between next-20210115 and > next-20120118 > related to core dumps: 8a3cc755b138 ("coredump: don't bother with > do_truncate()"). > Adding Al Viro to Cc for that. > > Naresh, could you try reverting that patch? This suspecting commit reverted and tested and the test case PASS. commit 8a3cc755b13808eba74846dfd1033fcbc21f9a65 Author: Al Viro Date: Sun Mar 8 09:16:37 2020 -0400 coredump: don't bother with do_truncate() have dump_skip() just remember how much needs to be skipped, leave actual seeks/writing zeroes to the next dump_emit() or the end of coredump output, whichever comes first. And instead of playing with do_truncate() in the end, just write one NUL at the end of the last gap (if any). Signed-off-by: Al Viro fs/binfmt_elf.c | 1 - fs/coredump.c | 56 +++++++++++++++++++++++++++--------------------- include/linux/binfmts.h | 1 + include/linux/coredump.h | 1 - Test case output link, https://lkft.validation.linaro.org/scheduler/job/2184975#L1369 https://lkft.validation.linaro.org/scheduler/job/2184972#L1358 - Naresh