Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp748602imm; Thu, 5 Jul 2018 08:14:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdCHlb/SwP7wzuEX5JMUNHPY3tx4Tv5P0tlp+3umSvKWE6PUafZbaC1x63yIO6OkT7sV5OT X-Received: by 2002:a17:902:708b:: with SMTP id z11-v6mr6529213plk.231.1530803684960; Thu, 05 Jul 2018 08:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530803684; cv=none; d=google.com; s=arc-20160816; b=Bhb8tvvdDNUGc94gDGlgnhykfemDJuziMf8ZLhZHFJhMKc6GLr8iEAsAFdZDBwOOvB EuY3iDzLnKvzh5Yg/aAqpHjnbKvcWSXKQKQGQuIvtEgnXwPgIL0+3zLjxei9nfAy/wsx 7QQVrAzT6Ay8fIQ33uPdk2d04y/oj1T0Dg3+x9egW4ZHEkdzjonOKVUgXctkDPG5y5QI uSuRmDnC18CFnZ0cKp4FZCKHEsU3pEVJX8d2VfAtX9Zx9ESdp8dy6vMvyJ4QpKfW969l YUNG3T20mfRHmGu504FRnY6ElLeCVlWj+X/z/YqUllbUiVmrMkikeGxKC7r17qufLeX3 gliA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=JUqZAhmQYnDqkewI+PaINspuFIPrjFl7Up5zMaCFsrU=; b=Sui3HR0DOV3kdNDC11GBloJqEyZEl74RBkKMJtkt8ZPQHgb4kTB5U8RARIV3Dy59yx 3yVS0eWZWJdb8aHkdtX5DdyDYNMc9Ku6bMt04FCt95Gy1sg1p35Tl1GblLybOfUQ0xZ8 Jtqr+35PXZd7ed0Mk9HJ/M3PaB6zspiSRCnB2LjXb7Cww5JJjpuGaH26Ykw0t0wBZXcY He4A8x0xuSIo8pah+AOUbmq9YWm5u0tJla2Qx7R6yfqvlrtt8FgYvtqd8zff6rbFIb8/ /ZFUWAjVYW780GJiqioz5Tq+FIThqcVrOxcObWqAhMco58PX8TANicK/8ZbncwG04Vmw puXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@colorfullife-com.20150623.gappssmtp.com header.s=20150623 header.b=cslEVcoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si6339151pgc.122.2018.07.05.08.14.29; Thu, 05 Jul 2018 08:14:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@colorfullife-com.20150623.gappssmtp.com header.s=20150623 header.b=cslEVcoi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754040AbeGEPMk (ORCPT + 99 others); Thu, 5 Jul 2018 11:12:40 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38531 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753592AbeGEPMj (ORCPT ); Thu, 5 Jul 2018 11:12:39 -0400 Received: by mail-wm0-f68.google.com with SMTP id 69-v6so11503828wmf.3 for ; Thu, 05 Jul 2018 08:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=colorfullife-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=JUqZAhmQYnDqkewI+PaINspuFIPrjFl7Up5zMaCFsrU=; b=cslEVcoiMJBCpPvqlcIEUvUeC50CrQ17OixqSWg5MhgfQIdZNAZCAz3VxdPImLpepq m3iZmoSWWVtrLKQfHl3koNqzBBYLfk+K+sPBsW+dONJ5TK/aTOQm3nECF6rOKQAsnwlC NH+T/c6c+DeUC74iEOWHczdLv/NA/+WHuaNsxMaQrAzn+9D7X0WZt3ilxPlQxF1+vp1S rSAtLccWuI8qX37JlRkH1/mEKdU31nZfFrQn6ys8QJSlGbops/ETi41rx78zUEND4vBB wqwJ6fRwJnbCIZBdLkJfGwEnOgjfSbXzsrODv16kmvriHhpofuq68ZblUxCzlBCmF1dS RpFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=JUqZAhmQYnDqkewI+PaINspuFIPrjFl7Up5zMaCFsrU=; b=CigXFYjLKArtngAF30D2O31dKMyZ4IiJmfAhzMGoDA8iLAeyH+QGrLlNi52qGMnokq tM2BSUG16NU6YFiTw3H8euTbVHys65uABEMyJCfaralMGZlcR+z9cpi+8WmQRpBc6wzi ChlFVVjC+mpmtErnPwZ1Ek/UY+NnrXLu231qsLeET8KSSOAZpCHRhMkeJKng1mGDZqL3 C+TeCAXHvN4Rdrlp75VVim7hdt3yMa2wJhNqTua6yrwAJsBWaEK1DXQPnGyF/rUTX4tR cCkdCQfvO2Hb37hNZPSRgY0kJDy1/VP2zbR6hllGX+OoosKh7xwa2DorFh/FbaxjleG/ bIcg== X-Gm-Message-State: APt69E1nBVMgWH7xk4l8DwEXleau1zV3lk/vilBs7hFoZYU/LVoo4LRV 1OcwTYC+Wf1WFkVoDk+1ABaLJn1LrpE= X-Received: by 2002:adf:e14a:: with SMTP id f10-v6mr4676164wri.42.1530803558353; Thu, 05 Jul 2018 08:12:38 -0700 (PDT) Received: from localhost.localdomain (p200300D993C4E0002E4725E865D6E031.dip0.t-ipconnect.de. [2003:d9:93c4:e000:2e47:25e8:65d6:e031]) by smtp.googlemail.com with ESMTPSA id p11-v6sm1209870wmc.9.2018.07.05.08.12.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 08:12:37 -0700 (PDT) Subject: Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq To: Dmitry Vyukov , Davidlohr Bueso , Andrew Morton Cc: LKML , 1vier1@web.de, Kees Cook , Michael Kerrisk References: <20180705055920.19611-1-manfred@colorfullife.com> <20180705055920.19611-3-manfred@colorfullife.com> From: Manfred Spraul Message-ID: <7143da44-448b-8beb-7583-1a5516623649@colorfullife.com> Date: Thu, 5 Jul 2018 17:12:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On 07/05/2018 10:36 AM, Dmitry Vyukov wrote: > [...] > Hi Manfred, > > The series looks like a significant improvement to me. Thanks! > > I feel that this code can be further simplified (unless I am missing > something here). Please take a look at this version: > > https://github.com/dvyukov/linux/commit/f77aeaf80f3c4ab524db92184d874b03063fea3a?diff=split > > This is on top of your patches. It basically does the same as your > code, but consolidates all id/seq assignment and dealing with next_id, > and deduplicates code re CONFIG_CHECKPOINT_RESTORE. Currently it's a > bit tricky to follow e.g. where exactly next_id is consumed and where > it needs to be left intact. > The only difference is that my code assigns new->id earlier. Not sure > if it can lead to anything bad. But if yes, then it seems that > currently uninitialized new->id is exposed. If necessary (?) we could > reset new->id in the same place where we set new->deleted. Everything looks correct for me, it is better than the current code. Except that you didn't sign off your last patch. As next step: Who can merge the patches towards linux-next? The only open point that I see are stress tests of the error codepaths. And: I don't think that the patches are relevant for linux-stable, correct? --     Manfred