Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1235868ybl; Thu, 12 Dec 2019 11:47:16 -0800 (PST) X-Google-Smtp-Source: APXvYqx+OzxAk44rmkfbxblONV2Mmaq+XZgKj/yZa6KREyVXgGbtOKDTU0JSl2hGnEa1LrV/1hKc X-Received: by 2002:a9d:c29:: with SMTP id 38mr9510730otr.1.1576180036014; Thu, 12 Dec 2019 11:47:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576180036; cv=none; d=google.com; s=arc-20160816; b=x5Y0JFw8CoZj/0Q9nLrqrXm9xHEVIGPh3eip6jbWVmhewF/8WKWtOCRkql8zSgcwDa yKV8P6MpB/waGEoQnJo9YVjUhI44/x05duiKP+/4v9zuBlIsshsba12pZxyPUFTuowvS /DrwgRm3abqHT5Cxy5/7mNH08dnXUxar8tSgae8/E4SMjM3cx5Y0UbW3XqX1m7zn20gb YcqkOG5eAzPi9aOEj8Nox1riXCOfkgnlFIXkXjYibsgXH3yVOK1Gy/tpZGhQWDHpnHao uJHNUOw5fjYsQqfy9eDjGvBam+qd3OClCyUHFzy27G/559bmg45WnNG0ccMb+PlotUgC Y/pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=4mas6ku3WwoOUYRmFsgq255I2irV7iTVqCyM98MLTsI=; b=wLDVjZjBu7ana67Dg+EeK205o4QSltkrh0SPDovf/epTjPPXW6UHIP0AlboDCdldgV tq6qLOdwAfIz9AyVC3X9rSqmgO/0nODnOSKqAz4x3sjDY0aOEncQpVutMn3Hs4mVOAgJ 4YTWT+VXSpb3Wvjb2jGsFF6AWXiO8mLbNNKeQuPxU3aBKt4jk25GNjU3hxUCph3rQRjZ 4k2/Yz7rtNrQRQ/bQZUc1Gx84jRwyZ8s2U7FT/PmAJiVQjS0T815VJAHNNNeajFufNEa +CGtXn5EEOtdMQW03CfVUT3Ppo4TVGzko787NJszWxq/kqQgJnojGxRG6JD8mkQRSg3r DfqQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22si3495794oti.269.2019.12.12.11.46.57; Thu, 12 Dec 2019 11:47:15 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730708AbfLLTq2 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 12 Dec 2019 14:46:28 -0500 Received: from mga18.intel.com ([134.134.136.126]:41514 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730284AbfLLTq1 (ORCPT ); Thu, 12 Dec 2019 14:46:27 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2019 11:46:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,306,1571727600"; d="scan'208";a="211222079" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga008.fm.intel.com with ESMTP; 12 Dec 2019 11:46:26 -0800 Received: from orsmsx156.amr.corp.intel.com (10.22.240.22) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Dec 2019 11:46:25 -0800 Received: from orsmsx115.amr.corp.intel.com ([169.254.4.94]) by ORSMSX156.amr.corp.intel.com ([169.254.8.240]) with mapi id 14.03.0439.000; Thu, 12 Dec 2019 11:46:25 -0800 From: "Luck, Tony" To: 'Peter Zijlstra' , 'Andy Lutomirski' CC: "Yu, Fenghua" , 'Ingo Molnar' , 'Thomas Gleixner' , 'Ingo Molnar' , 'Borislav Petkov' , 'H Peter Anvin' , "Raj, Ashok" , "Shankar, Ravi V" , 'linux-kernel' , 'x86' Subject: RE: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Thread-Topic: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Thread-Index: AQHVoA1uR0NpEjA1wUmtm7eAgTQzs6eVqSUAgAB0jYCAAEXyAP//gC6AgAGn1ICAAEz+gP//pIgggACuT4CAAAUeAIAADDWAgB6dr4CAAB9eQIAADuCQ Date: Thu, 12 Dec 2019 19:46:25 +0000 Message-ID: <3908561D78D1C84285E8C5FCA982C28F7F5013AA@ORSMSX115.amr.corp.intel.com> References: <20191121060444.GA55272@gmail.com> <20191121130153.GS4097@hirez.programming.kicks-ass.net> <20191121171214.GD12042@gmail.com> <20191121173444.GA5581@agluck-desk2.amr.corp.intel.com> <20191122105141.GY4114@hirez.programming.kicks-ass.net> <20191122152715.GA1909@hirez.programming.kicks-ass.net> <3908561D78D1C84285E8C5FCA982C28F7F4DD20D@ORSMSX115.amr.corp.intel.com> <20191122202345.GC2844@hirez.programming.kicks-ass.net> <20191122204204.GA192370@romley-ivt3.sc.intel.com> <20191212085755.GR2827@hirez.programming.kicks-ass.net> <3908561D78D1C84285E8C5FCA982C28F7F5011B2@ORSMSX115.amr.corp.intel.com> In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7F5011B2@ORSMSX115.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjIxYmY1ODUtOWQzMC00MDBhLWI1OTQtN2YwMWYxY2E1M2YyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoid1dSbGpcL2lsQVd3MmFxSlwvamZyZjJmQm5zeFlSRjhJa3ExTnZyZURyMDh4RkJLZ0RUM3ZnWmtXeVZwZTRcL3dDeiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> If anything we could switch the entire bitmap interface to unsigned int, >> but I'm not sure that'd actually help much. > > As we've been looking for potential split lock issues in kernel code, most of > the ones we found relate to callers who have <=32 bits and thus stick: > > u32 flags; > > in their structure. So it would solve those places, and fix any future code > where someone does the same thing. If different architectures can do better with 8-bit/16-bit/32-bit/64-bit instructions to manipulate bitmaps, then perhaps this is justification to make all the functions operate on "bitmap_t" and have each architecture provide the typedef for their favorite width. -Tony