Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4645217rwb; Sun, 13 Nov 2022 10:11:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf54xlHjWbitTaBr91NSi1uULGUl8LTBfIlPKmQ0E7jvHdvUZEOBG41/R8DlD/bIDcihxGzx X-Received: by 2002:a17:906:1746:b0:79f:9ff6:6576 with SMTP id d6-20020a170906174600b0079f9ff66576mr7725406eje.414.1668363098449; Sun, 13 Nov 2022 10:11:38 -0800 (PST) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk35-20020a1709077fa300b00791a6455597si7628166ejc.955.2022.11.13.10.11.16; Sun, 13 Nov 2022 10:11:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gWZD9YU4; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235368AbiKMRzS (ORCPT + 89 others); Sun, 13 Nov 2022 12:55:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbiKMRzQ (ORCPT ); Sun, 13 Nov 2022 12:55:16 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98BE1DEC5; Sun, 13 Nov 2022 09:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668362114; x=1699898114; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=iL0A5Sxv6yqd9qnagnpUoaPselOcGQjzP36/8XLzgJo=; b=gWZD9YU4Dv6o8lI+lqnHiYig2wIgberBFxyrJVxrjVsaUFddZ+QCvnMF OsFwGJw6YQhUFMP5sC0B3rXriUvnK3QhCzJ0+Jnl/E6Ec/DU33a6OGzHX 22uFDjW5p0n1KwM2f1Z4/xJ0oo8MdvEjdddxFPsyU4+W4qDY3YqvtTlKJ PEKAQZ7KojQ9x6aYaL9GNzJMO6OC6ApN8ntgjIJuZUTZge+hstrjhV3Py 8fr3hVDt6HxfCwkhYD3USl/lotFqAT5nxXlko4LTjoXR47i88fV23hqnT yMMI0puZ3D8lA62+6BNGgr3wHkJvvV6ZWLHiufLMSsA0n0Pl5u4nDdVls w==; X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="310538962" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="310538962" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2022 09:55:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10530"; a="671293097" X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="671293097" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP; 13 Nov 2022 09:55:13 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 13 Nov 2022 09:55:12 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 13 Nov 2022 09:55:12 -0800 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Sun, 13 Nov 2022 09:55:12 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Sun, 13 Nov 2022 09:55:11 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K50j3nDU+vmIafI4yK9oHtQ3OBch7I+HL/fRU104kg0if1zLgqG8rEkidrf+494LcY9Y2NO+i7v5OiNGt8J2KQkFoF8/gS1aAKxJqTEcCqDo3k0/bPJ9sgPf61fZylLR/Ple0Xj2uSPeVlxgbSnfA4vDePL/lojYo10LqxmMNeGpP+EB1w+UeC51hAhPGKdd32qNRu2cW8xq5cbQ7NMRS8ZbA+XhPaCdwUenuBqXmLPK72TLM6Nz+NWGXfXfXas0EDtnDRugmFRtK53HWJRvhfxgS1PGstKyTkgHo/bRl6YTSJzdEJTMzxraAnbwgla35sIG9Sk6Zp6ejfngJxVMuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=820WcdPScOSHiTTCQr/q8q6bwXcn/AwfH9CqUX9m0+U=; b=VPoXc4XtezwkX/auYZTKWrNy9iM01BZZtODK+i68F0byNL8v+dZlr6LtRCH0fWfriNLl1+RhKLHmIBSy9n2uV/4W8L76gIUEZsErTJmVIdQrZPbIzHM1o6oYephlwJevjxsZz92fZERAsTEK0AR5IsCkR/Y8r7sh4g0PGy2eIAIBaCIZVJP2AB/arxSrp1aQAPHzUyQEVshF8bBbxCMOM2wMTyGK7xV48kDuVY9QCbWA09W0Pa0WCS3OHqn27vR2o0Iw7JEAiA+CtndOYuJqLK1PiH68UHDYNGcJrBxNVmkAFqY7iNaAOYa5q7biEAKUhPt7SrEtWwBzlWRB0rUT8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3768.namprd11.prod.outlook.com (2603:10b6:a03:fa::20) by PH7PR11MB7641.namprd11.prod.outlook.com (2603:10b6:510:27b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13; Sun, 13 Nov 2022 17:55:03 +0000 Received: from BYAPR11MB3768.namprd11.prod.outlook.com ([fe80::f980:8dbd:ddf0:11c0]) by BYAPR11MB3768.namprd11.prod.outlook.com ([fe80::f980:8dbd:ddf0:11c0%4]) with mapi id 15.20.5813.016; Sun, 13 Nov 2022 17:55:03 +0000 Message-ID: Date: Sun, 13 Nov 2022 09:55:00 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 12/14] platform/x86/intel/ifs: Add current_batch sysfs entry Content-Language: en-US To: Borislav Petkov CC: "gregkh@linuxfoundation.org" , Thiago Macieira , "Luck, Tony" , "hdegoede@redhat.com" , "markgross@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "Raj, Ashok" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "patches@lists.linux.dev" , "Shankar, Ravi V" , "Jimenez Gonzalez, Athenas" , "Mehta, Sohil" References: <20221021203413.1220137-1-jithu.joseph@intel.com> <20221107225323.2733518-1-jithu.joseph@intel.com> <20221107225323.2733518-13-jithu.joseph@intel.com> <5e65889d-d68c-b29d-6cea-7b4ce4c87b4a@intel.com> From: "Joseph, Jithu" In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR13CA0125.namprd13.prod.outlook.com (2603:10b6:a03:2c6::10) To BYAPR11MB3768.namprd11.prod.outlook.com (2603:10b6:a03:fa::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB3768:EE_|PH7PR11MB7641:EE_ X-MS-Office365-Filtering-Correlation-Id: ca870ecc-3c7f-46fa-a0da-08dac5a030d8 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nZuI3x5WTaR4gdy3fWlsAn5U55jMt9zCNkCxeKWfZmDALPf65fp84L4k1TUtFTQJzgnNRQpOvj1RRdZpQIEA0rpBcIUXImakztdWkK9CAZFRLTLUMarUkoACJApDWE2jSbmIw6gPKE/UvQgouTL+stR/H/Vox9wTZ1AjfRn7ie+wopHZ/KUaTgznZsGG7d3ptwPtnWLlu3pLfb+9PD2VZFIuCPlc0z6mZhd0ikal41K6JUoKIMsgU27wPYKMqgTCyljuezIl8of2cahB6RNQKVJODQj+2W//G0htOCrTtJor39zaQpVk0uY7eqFQt0aI7Jyo2J3NhF+IsHgKZXPMm0e0RcEW9gQ538162VXuI7OSBtJ+4ZfruUOdFR6LScshkH7kw2bs2VDAf3fACF3rBujgl8f2kGfuGFTg91LXGx+FGL8G25vzEzryQST8gA0Tvgy02YRlBW9WEMZsIflTjcDqMX8R5P9tHP9spEErym1IZdtRplZdFdLNl6s5V9M+rzZK1JFap7xtJbbw8D0+gBKY8do9oTUHAJiDV8ftRaggc9MG6Q+JiDPdccGWiDQhrd/lvPIkDWbcr7CkhIwyVZyfFJMOjCZN/O/0EVidq3mFH4jTgZbuCOlIOBfblouaTOIoSZX5y9msbxv//xiAPtHs0En6e47pJoBCvjunqwPNaHJmlGuYK1N+F+Jw+4uZ1Y6i+0+WcTIWey8urn9Kn8gG1XgfDDyUwQl0OP42/mUynOEMkjv8+imCQ7Xc/JGxVSCD2ildyTrHQLG8ytT1h8LE/5fnvSUUIQMQdL/vpQ8x85cF2u8xbhfE1ICBCuLiy/SF2jXYOCmgGU2GiVPepA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3768.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(346002)(39860400002)(366004)(376002)(136003)(451199015)(36756003)(31686004)(316002)(31696002)(86362001)(82960400001)(38100700002)(2906002)(4326008)(66476007)(41300700001)(8676002)(66556008)(66946007)(8936002)(6506007)(7416002)(53546011)(6916009)(54906003)(5660300002)(2616005)(6486002)(83380400001)(966005)(478600001)(186003)(26005)(6512007)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WkJhNVRHLzV0eE1mSTVKdkpMODVYckZuNkdYbjZteHdaZkdGSURXWnFWNm9l?= =?utf-8?B?NWQrUHNkQm1DR241MjlPSENLUWgwenhhZllaMWp0dVhwSmpvU0VFTVRaU2NF?= =?utf-8?B?VFc5L1lpMjZ2bERxNjBxeG1weUxUNnZtWWpCMGdkNUovOHF4MU5nQzdjdUNs?= =?utf-8?B?T1Bjc1NKZ1crNW9RWUR1cXMxV3NYS0FPU2N2S2paOVNrUytuUnY4SER3Tm1H?= =?utf-8?B?cG9rc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dERrT29nYXpZZExNRmM5Y2Vk?= =?utf-8?B?dHlITWt3dDNyN01xS2VrSzRISU82K0tVM0l0UmlzeU1VelhGTjVuWlowMU1J?= =?utf-8?B?VEt2bU5iazRvVzBYUnQrd0tRVE5YWFdmYTM1d3Q0YWI5MVB3NlpKalVQOWxs?= =?utf-8?B?dmc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: ca870ecc-3c7f-46fa-a0da-08dac5a030d8 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3768.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2022 17:55:03.2538 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XOjLNOojiuhni9Skl10E3PdqZyij2+gPPPiap2/uaKhoVJB6ZoHtYuSidvkdllb2kKiES4Aq5VqSUtpr0pHB4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7641 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/13/2022 8:58 AM, Borislav Petkov wrote: > On Sun, Nov 13, 2022 at 08:41:47AM -0800, Joseph, Jithu wrote: >> Do you think it is better to restrict filename input to confirm >> to ff-mm-ss-xy. format rather than accepting any string and >> treating it as a file-name and trying to load it, if it is present ? > > Yap, that way you pre-filter filenames. Yeah, the header checks *must* > absolutely happen too but it would be a simple first test. > > Also, you can check for: > > ff-mm-ss-X. > > where X is a [0-9]+ of arbitrary length and this way won't have the > artificial 256 limit you have now. > Thanks for clarifying >> (Given that, before loading, We do intel_find_matching_signature(), >> which validates if the signature/pf entries in header confirms to the >> machine we are on before loading) >> >> We did accepting file-name as input before [1] (except for validating >> if the filename confirms to ff-mm-ss format) > > Yeah, except now you want to do multiple sets of scan files. The earlier change (which modified reload sysfs file from accepting a file-name instead of 1) was for allowing multiple test files (i.e no different from what we are doing now) Then we were told not to specify a filename via sysfs file (apologies for being repetitive) Jithu [1] https://lore.kernel.org/lkml/20220710160011.995800-1-jithu.joseph@intel.com/