Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6990501rwr; Tue, 25 Apr 2023 06:48:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/kSfzNVUkdFqmVhb40SppapiA54VYtcwWIB2tOnWn1xgmEjJgsHyTbvqOGusRFxH2hoIi X-Received: by 2002:a17:903:1245:b0:1a9:96d0:f73c with SMTP id u5-20020a170903124500b001a996d0f73cmr648547plh.20.1682430526373; Tue, 25 Apr 2023 06:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682430526; cv=none; d=google.com; s=arc-20160816; b=DDgVOfF17HYI6oZICzv3+HuT98lB6fTrLbJ3lnIDpgof5zPnxDLsNA8mAJLa1TDPMJ dymYqiB/4BR9roKMuK+YJsFHjIm/os303G200XIcZfW2A+2SRP+fozD2Pot9xxN8Vje4 7QKJ0cqTSu7VlTcEOqQ2S+IV0NG7j5Nmwr6fVvE+GJIzUtlFFd4HxWDGd3lZuIkS2PDF 1TLavMe/zsgeA19omtnh6LemZK0S5yLKLvwIm6nNEdSs/bMePUPojBmycyZ2XYt6cCj9 2TAe8htyVjYFOVj4uZB+q9SQcxXfPgNkFTfCdxieW4rrCC+tTmcmHPLwlgYVzMb93y6m sXcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=yL70Rc7HzGeZUoqLDlSCDrwe16+F8INjLhdwD4sRim0=; b=WIS6Y+OwmZqZKgv7RAyjMWqn6sHpNZeErhYh6G0uS2KGZOnJHit/4Tl2GUVHsxW888 1Sw9rbpcUZin5ldFInLLFXiOj5mVgBm6WFjq6/mvveQjMVK/CzvPJqowpiwd1TY2O4Ld 6+ihz9oVyEXoGFqwti0N7NGkaN/JuFUZwX/6VcWyjT/bSO3WhqHSVGFdbElhaZ/9qjIu nI2CpQdp8DrP3GrzoohI8DG0bN3O9rUtJoJixF8zxS9lPEqs4OGWBHfuqYx/el79pM6M 8KeEuXsE+02fmol5RAyTa7EcevdpwVXiHxzR5ccvhI5WxYEE4P+STwpgAgdph8EU2SDJ tJ0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=XJ6hTJmA; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a1709029a4200b001a922d1f4c7si13139485plv.60.2023.04.25.06.48.33; Tue, 25 Apr 2023 06:48:46 -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=@gmail.com header.s=20221208 header.b=XJ6hTJmA; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233875AbjDYNnr (ORCPT + 99 others); Tue, 25 Apr 2023 09:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233368AbjDYNnq (ORCPT ); Tue, 25 Apr 2023 09:43:46 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A27EE58; Tue, 25 Apr 2023 06:43:44 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2a8aea2a654so56107881fa.1; Tue, 25 Apr 2023 06:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682430223; x=1685022223; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yL70Rc7HzGeZUoqLDlSCDrwe16+F8INjLhdwD4sRim0=; b=XJ6hTJmA79SxhcWsncYDGRQAHC8yuAJ4yJls/gUbDA28G07pwVjM+vnz6TEAHng0T8 Vlzwc852rcvUjutLOYfoMcAhZsKP2Yz0N6ASljEexoeUoatymuRIPElCovKV310bOGTf nejC4plihdpXPyemrl+t6oeBQ7HhFxEIFyMcMR0MI5DL/lNJ5UzVQ4L9gs8kJeOBI550 8Hc4/rM3SCrvle7AIpngypcysazAGRzQGRsFWsGdAgYvDp430uxxWV1Tz8/R2bL+Ivpb 0HMV/vPvOli5pqSK2YAUjZ4fCXkP1nfExku0YsAc8XH7fjSmbSSQXqgXc9fJsIDyMlzk hwkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682430223; x=1685022223; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yL70Rc7HzGeZUoqLDlSCDrwe16+F8INjLhdwD4sRim0=; b=H9s1fHFq48Q/fPeD7DTm7XpiLfxsc2j+vOpMBzlGYNkEAwt1JXwsUv8oeMjLfQFWpg 2x1gs57YXNQt8s2tP7LdkiX5Zv5qJZNWeFM2ItDELJvfuMFdq5sjpdbPMSprffLcxKNM EsnF8SRXbZ0m6PZ6PCN4Wq/G1nAp5rEX/G3boYXhGPkTAnHO4Fk41GFYmUXRtlKBNbk9 K1uaf9xPDz8Lv2GoqMYYSXPsDqyyUbndhR6K3bB/ZSU7KAQ+p3jPAMLZ62ja6qIkI6Jz nVIGRmP8qyPjYGg798vC+YktCwzae1Khtn/3j8v9XQt1vCyQlP3P6oOU5fZXIXlYjzIu OuEg== X-Gm-Message-State: AAQBX9fQ/czq1GmzJKJdMCbYpOolnbqGyunNiTYK5Y/CLivzPA9hWA0u DRhe4JLDPh6ZfnTQuL9VP+uxZTjvJq7sxg19pVA= X-Received: by 2002:a2e:8255:0:b0:2ab:d1b:dcb2 with SMTP id j21-20020a2e8255000000b002ab0d1bdcb2mr2071882ljh.38.1682430222632; Tue, 25 Apr 2023 06:43:42 -0700 (PDT) MIME-Version: 1.0 References: <20230419151321.6167-1-jorge.lopez2@hp.com> <20230419151321.6167-3-jorge.lopez2@hp.com> <6ddd373b-6bcb-85a7-2423-ceea5d3f1246@redhat.com> In-Reply-To: <6ddd373b-6bcb-85a7-2423-ceea5d3f1246@redhat.com> From: Jorge Lopez Date: Tue, 25 Apr 2023 08:43:18 -0500 Message-ID: Subject: Re: [PATCH v10 02/14] HP BIOSCFG driver - biosattr-interface To: Hans de Goede Cc: Pavel Machek , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, thomas@t-8ch.de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 On Tue, Apr 25, 2023 at 5:31=E2=80=AFAM Hans de Goede = wrote: > > 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 variabl= e > >> + * 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). I will add the prefix 'hp_' to those generic functions such ascii_to_utf16_unicode. > > Regards, > > Hans > >