Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6777472rwr; Tue, 25 Apr 2023 03:45:42 -0700 (PDT) X-Google-Smtp-Source: AKy350bkCuhDL9mrfz7fXwr6n54RFX80ZtKl1CG/x6tymdhAY3o34ugTpGmkCEIH5VffcMqkm9uj X-Received: by 2002:a05:6a20:3ca4:b0:f2:7da5:f276 with SMTP id b36-20020a056a203ca400b000f27da5f276mr17103440pzj.51.1682419542427; Tue, 25 Apr 2023 03:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682419542; cv=none; d=google.com; s=arc-20160816; b=SavDqjhcAY4USWUK3pmqirGgzBIYlKxlWsncfX6Tt4d/MwtaTntPlOwg5mvsdn7tfJ U34J10ZTvLvOjXI0yFdT3r3YFKBmcCj7teoFllnXtG94q/6MDmcKQFmzE+pAaxf4hQre 6mXduPkO1+jqRlQpZi7QAJITVT3BMF6O7DiAwQRsK8wHVFoni6u3WZ0qRRtGWDrIuY14 0DfeTorPyIg+ZRfSJ/yvBQmnE5HTdu7726f6FYZAg0CVyY0d9HooIHPbJ1AFCvD6w11C /yVnac47rsENWfDJWoD3YiuRLM5ShVU0WkUUy+JRf5tkHOxgT7IOvrXN6Z+lKFmcY2hj TQ8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kkMHifCLaqZQe23JCKz0wmjfgG+ZZZ7m9ycDSIKx5x0=; b=dT5OGK9NSBhEu2vveSy4bop7koGU2BqBLHZzBJaLt2VOqzy3TOsgkwiphHmq7jchNV R8RA+QONaZt65Iqcnq5W5VMKQHToJlJUSPEeATvRCH+I/ptE8uppF04phMQ2u411pk/F 2K+Cf4a3M1ZhNB/7hNamR6by1YdE7FdJLinVfO/XQQKHt6xelNJqAs97v2g/+4msXaY2 1uxA2ym7B6EJ2etA/3YPbxHflNmN2jX8Zm+91xscChYT+Xorz7LXKikBTQO6Uq+HTE0i WbM7GwXq49Zuxp0FWcDJKFyWSMYqorV6T6MYZ58sWFQ6kDxgBmf7J2Gz1ABEoQjt6Rxc GzWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X6lCvllw; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b005130d9f6e66si12847866pgp.366.2023.04.25.03.45.02; Tue, 25 Apr 2023 03:45:42 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=X6lCvllw; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbjDYKcA (ORCPT + 99 others); Tue, 25 Apr 2023 06:32:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233709AbjDYKbw (ORCPT ); Tue, 25 Apr 2023 06:31:52 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 035C7468C for ; Tue, 25 Apr 2023 03:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682418663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kkMHifCLaqZQe23JCKz0wmjfgG+ZZZ7m9ycDSIKx5x0=; b=X6lCvllwbEjC3LRTte2zF83uTzcvT0VEQoiqGLPWiKmqNeJ3XCM/BZi0/07ObugR+GcEAW kUYvuL/ofR5n82FwHn0hptqUOUZWpydA4SQbJihSLmTeAhCnSgYuWH/8hg/K0ytlvrZizv UE2iX79BPPOFpzviNn2yI/Xr/IEKs6A= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-563-sDakO3UgNHqEz9V-OtpPwQ-1; Tue, 25 Apr 2023 06:31:01 -0400 X-MC-Unique: sDakO3UgNHqEz9V-OtpPwQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-94ec76d7a26so512831366b.1 for ; Tue, 25 Apr 2023 03:31:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682418660; x=1685010660; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kkMHifCLaqZQe23JCKz0wmjfgG+ZZZ7m9ycDSIKx5x0=; b=aF7XGOtNOSa6EvKSsThmZKFLPPuzr5smnxBluXJQiALS3DHzt7VSYwf7ogPA7RVmc5 EZJzZQrl9uAyour9evtfyELwFVW4SEu5111ik9MHSUcy7R/rVgYgSkfZi3PvvpuxRi01 OCLxCrSWtFE+Mi8xw0LVF69KKtezDZhbhPJa6lmSYdpuJ0JOuuaAccil4jybsWmmh1dx /EC/Pf/YP/MV7gN5mgDK69prOIQUqtOukCqwOFpl3465W/0bHGYyQ3UpkisdC7WtBaav 7+vxn+14LJtMomA8mvtxAPJdgjM2n9lT4VEHRwBYtzFlPWv2OCbNbOxF1IaFsI/V4Cbe H1iw== X-Gm-Message-State: AAQBX9dF99cviaNAWTcuwzB3UsBtYbKQvaGe7J8+SpO5WeeqUjOrj/xE i1GslzwqZ2B+X0mI6COx6mvd/XFMPuefcSdv59t5OLQIiHwlSamsdzlTv6DCFehLGuNNUhkxN+l wsewhyljfRIw8DzQdRz3h86mL X-Received: by 2002:a17:906:19ce:b0:94e:dd3f:b650 with SMTP id h14-20020a17090619ce00b0094edd3fb650mr13035671ejd.18.1682418660732; Tue, 25 Apr 2023 03:31:00 -0700 (PDT) X-Received: by 2002:a17:906:19ce:b0:94e:dd3f:b650 with SMTP id h14-20020a17090619ce00b0094edd3fb650mr13035657ejd.18.1682418660467; Tue, 25 Apr 2023 03:31:00 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id 10-20020a170906328a00b009599c3a019fsm2455809ejw.60.2023.04.25.03.30.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 03:30:59 -0700 (PDT) Message-ID: <6ddd373b-6bcb-85a7-2423-ceea5d3f1246@redhat.com> Date: Tue, 25 Apr 2023 12:30:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v10 02/14] HP BIOSCFG driver - biosattr-interface Content-Language: en-US, nl To: Pavel Machek , Jorge Lopez Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@t-8ch.de References: <20230419151321.6167-1-jorge.lopez2@hp.com> <20230419151321.6167-3-jorge.lopez2@hp.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 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_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Hi, On 4/21/23 13:37, Pavel Machek wrote: > Hi! > >> Linux Security components are under development and not published yet. >> The only linux component is the driver (hp bioscfg) at this time. >> Other published security components are under Windows. >> >> Signed-off-by: Jorge Lopez > >> +/* >> + * ascii_to_utf16_unicode - Convert ascii string to UTF-16 unicode >> + * >> + * BIOS supports UTF-16 characters that are 2 bytes long. No variable >> + * multi-byte language supported. >> + * >> + * @p: Unicode buffer address >> + * @str: string to convert to unicode >> + * >> + * Returns a void pointer to the buffer containing unicode string >> + */ >> +void *ascii_to_utf16_unicode(u16 *p, const u8 *str) >> +{ > > Does this need to go to library somewhere? This has already been discussed in earlier submissions of the driver, the utf16 format is HP specific (prefixed with a 16 bit le lenght, and the 0 length string needs special encoding) so despite the name this is not generic. It should probably be prefixed with hp_ because of this though, to avoid potential symbol conflicts when builtin. (and the same applies to other generic functions). Regards, Hans