* Re: [PATCH] imx6ullevk: Add machine file
From: Otavio Salvador @ 2017-10-04 20:44 UTC (permalink / raw)
To: Daiane Angolini; +Cc: meta-freescale@yoctoproject.org
In-Reply-To: <1507139372-4642-1-git-send-email-daiane.angolini@nxp.com>
On Wed, Oct 4, 2017 at 2:49 PM, Daiane Angolini <daiane.angolini@nxp.com> wrote:
> CPU: Freescale i.MX6ULL rev1.0 at 396MHz
> CPU: Commercial temperature grade (0C to 95C) at 41C
> Reset cause: POR
> Board: MX6ULL 14x14 EVK
> I2C: ready
> DRAM: 512 MiB
>
> Signed-off-by: Daiane Angolini <daiane.angolini@nxp.com>
> ---
> conf/machine/imx6ullevk.conf | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
> create mode 100644 conf/machine/imx6ullevk.conf
>
> diff --git a/conf/machine/imx6ullevk.conf b/conf/machine/imx6ullevk.conf
> new file mode 100644
> index 0000000..3018c0d
> --- /dev/null
> +++ b/conf/machine/imx6ullevk.conf
> @@ -0,0 +1,28 @@
> +#@TYPE: Machine
> +#@NAME: Freescale i.MX6ULL Evaluation Kit
> +#@SOC: i.MX6ULL
> +#@DESCRIPTION: Machine configuration for Freescale i.MX6ULL EVK
> +#@MAINTAINER: Daiane Angolini <daiane.angolini@nxp.com>
> +
> +MACHINEOVERRIDES =. "mx6:mx6ull:"
> +
> +include conf/machine/include/imx-base.inc
> +include conf/machine/include/tune-cortexa7.inc
> +
> +KERNEL_DEVICETREE = "imx6ull-14x14-evk.dtb imx6ull-14x14-evk-btwifi.dtb"
> +
> +UBOOT_CONFIG ??= "sd"
> +UBOOT_CONFIG[sd] = "mx6ull_14x14_evk_config,sdcard"
> +UBOOT_CONFIG[mfgtool] = "mx6ull_14x14_evk_config"
> +
> +PREFERRED_PROVIDER_u-boot = "u-boot-imx"
> +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx"
> +PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
> +
> +SERIAL_CONSOLE = "115200 ttymxc0"
> +
> +MACHINE_FEATURES += " pci wifi bluetooth"
> +
> +IMAGE_FSTYPES = "wic.gz"
> +IMAGE_BOOT_FILES = "${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}"
Please see the generic definition for the boot files I sent for
imx-base.inc, it should work for this case as well.
> +WKS_FILE ?= "imx-uboot-bootpart.wks"
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply
* Re: [3rdparty][PATCH] Add wic image support
From: Otavio Salvador @ 2017-10-04 20:42 UTC (permalink / raw)
To: Pierre-Jean TEXIER; +Cc: meta-freescale@yoctoproject.org
In-Reply-To: <1507148509-21957-1-git-send-email-texier.pj2@gmail.com>
Hello,
On Wed, Oct 4, 2017 at 5:21 PM, Pierre-Jean TEXIER <texier.pj2@gmail.com> wrote:
> Signed-off-by: Pierre-Jean TEXIER <texier.pj2@gmail.com>
> ---
> conf/machine/imx7s-warp.conf | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/conf/machine/imx7s-warp.conf b/conf/machine/imx7s-warp.conf
> index 7a23fd6..87a740c 100644
> --- a/conf/machine/imx7s-warp.conf
> +++ b/conf/machine/imx7s-warp.conf
> @@ -18,4 +18,12 @@ PREFERRED_PROVIDER_virtual/kernel ?= "linux-warp7"
> UBOOT_CONFIG ??= "sd"
> UBOOT_CONFIG[sd] = "warp7_secure_defconfig,sdcard"
>
> +# wic
> +IMAGE_FSTYPES = "wic.gz"
> +IMAGE_BOOT_FILES = " \
> + ${KERNEL_IMAGETYPE} \
> + ${KERNEL_IMAGETYPE}-imx7s-warp.dtb;imx7s-warp.dtb \
> +"
I just sent a generic definition for the IMAGE_BOOT_FILES for
imx-base.inc. Please check if it works for you so we can avoid
duplicating it over all machines.
> +WKS_FILE ?= "imx-uboot-bootpart.wks"
> +
> MACHINE_EXTRA_RRECOMMENDS += "firmware-imx-brcm"
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply
* Re: [v10 3/6] mm, oom: cgroup-aware OOM killer
From: Johannes Weiner @ 2017-10-04 20:41 UTC (permalink / raw)
To: David Rientjes
Cc: Roman Gushchin, linux-mm, Michal Hocko, Vladimir Davydov,
Tetsuo Handa, Andrew Morton, Tejun Heo, kernel-team, cgroups,
linux-doc, linux-kernel
In-Reply-To: <alpine.DEB.2.10.1710041322160.67374@chino.kir.corp.google.com>
On Wed, Oct 04, 2017 at 01:27:14PM -0700, David Rientjes wrote:
> By only considering leaf memcgs, does this penalize users if their memcg
> becomes oc->chosen_memcg purely because it has aggregated all of its
> processes to be members of that memcg, which would otherwise be the
> standard behavior?
>
> What prevents me from spreading my memcg with N processes attached over N
> child memcgs instead so that memcg_oom_badness() becomes very small for
> each child memcg specifically to avoid being oom killed?
It's no different from forking out multiple mm to avoid being the
biggest process.
It's up to the parent to enforce limits on that group and prevent you
from being able to cause global OOM in the first place, in particular
if you delegate to untrusted and potentially malicious users.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [v10 3/6] mm, oom: cgroup-aware OOM killer
From: Johannes Weiner @ 2017-10-04 20:41 UTC (permalink / raw)
To: David Rientjes
Cc: Roman Gushchin, linux-mm, Michal Hocko, Vladimir Davydov,
Tetsuo Handa, Andrew Morton, Tejun Heo, kernel-team, cgroups,
linux-doc, linux-kernel
In-Reply-To: <alpine.DEB.2.10.1710041322160.67374@chino.kir.corp.google.com>
On Wed, Oct 04, 2017 at 01:27:14PM -0700, David Rientjes wrote:
> By only considering leaf memcgs, does this penalize users if their memcg
> becomes oc->chosen_memcg purely because it has aggregated all of its
> processes to be members of that memcg, which would otherwise be the
> standard behavior?
>
> What prevents me from spreading my memcg with N processes attached over N
> child memcgs instead so that memcg_oom_badness() becomes very small for
> each child memcg specifically to avoid being oom killed?
It's no different from forking out multiple mm to avoid being the
biggest process.
It's up to the parent to enforce limits on that group and prevent you
from being able to cause global OOM in the first place, in particular
if you delegate to untrusted and potentially malicious users.
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v4 1/2] config: qemu_config_parse() return number of config groups
From: Eduardo Habkost @ 2017-10-04 20:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Markus Armbruster
In-Reply-To: <20171004025043.3788-2-ehabkost@redhat.com>
On Tue, Oct 03, 2017 at 11:50:42PM -0300, Eduardo Habkost wrote:
> Change qemu_config_parse() to return the number of config groups
> in success and -EINVAL on error. This will allow callers of
> qemu_config_parse() to check if something was really loaded from
> the config file.
>
> All existing callers of qemu_config_parse() and
> qemu_read_config_file() only check if the return value was
> negative, so the change shouldn't affect them.
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Paolo, if you are OK with this I'm queueing it (only 1/2 by now)
on machine-next.
--
Eduardo
^ permalink raw reply
* Re: [MPTCP] [PATCH 06/18] tcp: Register handlers for extra TCP options
From: Mat Martineau @ 2017-10-04 20:41 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 19930 bytes --]
On Wed, 4 Oct 2017, Christoph Paasch wrote:
> On 04/10/17 - 13:07:38, Mat Martineau wrote:
>>
>> On Tue, 3 Oct 2017, Christoph Paasch wrote:
>>
>>> From: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
>>>
>>> Allow additional TCP options to be handled by registered hook
>>> functions.
>>>
>>> Option parsing will call the provided 'parse' function when a TCP option
>>> number is not recognized by the normal option parsing code.
>>>
>>> The 'prepare' and 'prepare_req' functions determine the required space
>>> for registered options and store associated data. There are two variants
>>> because options must be generated for connections that are associated
>>> with either tcp_sock or request_sock structures.
>>
>> I have a newer version of this patch where there's a single prepare callback
>> that takes a struct sock *, so I'll send that out.
>
> Nice, will you push it to the git repo?
I needed to rebase it to the current upstream tree, but now I've posted it
to the list and pushed to
https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git/commit/?h=mptcp
Mat
>>
>>
>> Mat
>>
>>
>>>
>>> A static key and RCU synchronization are used to minimize the
>>> performance impact of these extensible TCP features.
>>>
>>> Before this is posted upstream, I plan to split the patch in two parts
>>> (at least), since making tcp_out_options public should be separate. The
>>> extra parameter for tcp_parse_options may also warrant its own
>>> patch. I'd also like to discuss where to store information for the
>>> options that are parsed or generated using these hooks, since the
>>> tcp_options_received and tcp_out_options structs don't have places to
>>> store extra information yet.
>>>
>>> I've confirmed that this code builds, but haven't tested yet.
>>>
>>> This commit is also available at
>>> https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git
>>> branch: mptcp
>>>
>>> Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
>>> ---
>>> drivers/infiniband/hw/cxgb4/cm.c | 2 +-
>>> include/linux/tcp.h | 17 +++++
>>> include/net/tcp.h | 49 ++++++++++++++-
>>> net/ipv4/syncookies.c | 2 +-
>>> net/ipv4/tcp.c | 133 +++++++++++++++++++++++++++++++++++++++
>>> net/ipv4/tcp_input.c | 15 +++--
>>> net/ipv4/tcp_minisocks.c | 4 +-
>>> net/ipv4/tcp_output.c | 35 ++++++-----
>>> net/ipv6/syncookies.c | 2 +-
>>> 9 files changed, 231 insertions(+), 28 deletions(-)
>>>
>>> diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
>>> index daf7a56e5d7e..c3eb31611011 100644
>>> --- a/drivers/infiniband/hw/cxgb4/cm.c
>>> +++ b/drivers/infiniband/hw/cxgb4/cm.c
>>> @@ -3752,7 +3752,7 @@ static void build_cpl_pass_accept_req(struct sk_buff *skb, int stid , u8 tos)
>>> */
>>> memset(&tmp_opt, 0, sizeof(tmp_opt));
>>> tcp_clear_options(&tmp_opt);
>>> - tcp_parse_options(&init_net, skb, &tmp_opt, 0, NULL);
>>> + tcp_parse_options(&init_net, skb, &tmp_opt, 0, NULL, NULL);
>>>
>>> req = __skb_push(skb, sizeof(*req));
>>> memset(req, 0, sizeof(*req));
>>> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
>>> index 4aa40ef02d32..6175caf2e309 100644
>>> --- a/include/linux/tcp.h
>>> +++ b/include/linux/tcp.h
>>> @@ -112,6 +112,23 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
>>> rx_opt->wscale_ok = rx_opt->snd_wscale = 0;
>>> }
>>>
>>> +#define OPTION_SACK_ADVERTISE (1 << 0)
>>> +#define OPTION_TS (1 << 1)
>>> +#define OPTION_MD5 (1 << 2)
>>> +#define OPTION_WSCALE (1 << 3)
>>> +#define OPTION_FAST_OPEN_COOKIE (1 << 8)
>>> +
>>> +struct tcp_out_options {
>>> + u16 options; /* bit field of OPTION_* */
>>> + u16 mss; /* 0 to disable */
>>> + u8 ws; /* window scale, 0 to disable */
>>> + u8 num_sack_blocks; /* number of SACK blocks to include */
>>> + u8 hash_size; /* bytes in hash_location */
>>> + __u8 *hash_location; /* temporary pointer, overloaded */
>>> + __u32 tsval, tsecr; /* need to include OPTION_TS */
>>> + struct tcp_fastopen_cookie *fastopen_cookie; /* Fast open cookie */
>>> +};
>>> +
>>> /* This is the max number of SACKS that we'll generate and process. It's safe
>>> * to increase this, although since:
>>> * size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
>>> diff --git a/include/net/tcp.h b/include/net/tcp.h
>>> index 770b608c8439..676ae8991e7f 100644
>>> --- a/include/net/tcp.h
>>> +++ b/include/net/tcp.h
>>> @@ -433,7 +433,8 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
>>> int flags, int *addr_len);
>>> void tcp_parse_options(const struct net *net, const struct sk_buff *skb,
>>> struct tcp_options_received *opt_rx,
>>> - int estab, struct tcp_fastopen_cookie *foc);
>>> + int estab, struct tcp_fastopen_cookie *foc,
>>> + struct tcp_sock *tp);
>>> const u8 *tcp_parse_md5sig_option(const struct tcphdr *th);
>>>
>>> /*
>>> @@ -2103,4 +2104,50 @@ static inline bool tcp_bpf_ca_needs_ecn(struct sock *sk)
>>> {
>>> return (tcp_call_bpf(sk, BPF_SOCK_OPS_NEEDS_ECN) == 1);
>>> }
>>> +
>>> +extern struct static_key_false tcp_extra_options_enabled;
>>> +
>>> +struct tcp_extra_option_ops {
>>> + struct list_head list;
>>> + unsigned char option_kind;
>>> + void (*parse)(int opsize, const unsigned char *opptr,
>>> + const struct sk_buff *skb,
>>> + struct tcp_options_received *opt_rx,
>>> + struct tcp_sock *tp);
>>> + /* Return the number of bytes consumed */
>>> + unsigned int (*prepare)(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct tcp_sock *tp);
>>> + /* Return the number of bytes consumed */
>>> + unsigned int (*prepare_req)(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct request_sock *req);
>>> + void (*write)(__be32 *ptr, struct tcp_out_options *opts,
>>> + struct tcp_sock *tp);
>>> + struct module *owner;
>>> +};
>>> +
>>> +void tcp_extra_options_parse(int opcode, int opsize, const unsigned char *opptr,
>>> + const struct sk_buff *skb,
>>> + struct tcp_options_received *opt_rx,
>>> + struct tcp_sock *tp);
>>> +
>>> +unsigned int tcp_extra_options_prepare(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct tcp_sock *tp);
>>> +
>>> +unsigned int tcp_extra_options_prepare_req(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct request_sock *req);
>>> +
>>> +void tcp_extra_options_write(__be32 *ptr, struct tcp_out_options *opts,
>>> + struct tcp_sock *tp);
>>> +
>>> +int tcp_register_extra_option(struct tcp_extra_option_ops *ops);
>>> +void tcp_unregister_extra_option(struct tcp_extra_option_ops *ops);
>>> +
>>> #endif /* _TCP_H */
>>> diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
>>> index b1bb1b3a1082..6c8d750a2243 100644
>>> --- a/net/ipv4/syncookies.c
>>> +++ b/net/ipv4/syncookies.c
>>> @@ -313,7 +313,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
>>>
>>> /* check for timestamp cookie support */
>>> memset(&tcp_opt, 0, sizeof(tcp_opt));
>>> - tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL);
>>> + tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL, tp);
>>>
>>> if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
>>> tsoff = secure_tcp_ts_off(sock_net(sk),
>>> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
>>> index 5091402720ab..82b022d5f215 100644
>>> --- a/net/ipv4/tcp.c
>>> +++ b/net/ipv4/tcp.c
>>> @@ -270,6 +270,7 @@
>>> #include <linux/time.h>
>>> #include <linux/slab.h>
>>> #include <linux/errqueue.h>
>>> +#include <linux/static_key.h>
>>>
>>> #include <net/icmp.h>
>>> #include <net/inet_common.h>
>>> @@ -306,6 +307,11 @@ EXPORT_SYMBOL(tcp_memory_allocated);
>>> struct percpu_counter tcp_sockets_allocated;
>>> EXPORT_SYMBOL(tcp_sockets_allocated);
>>>
>>> +/* Optional TCP option handlers */
>>> +static DEFINE_SPINLOCK(tcp_option_list_lock);
>>> +static LIST_HEAD(tcp_option_list);
>>> +DEFINE_STATIC_KEY_FALSE(tcp_extra_options_enabled);
>>> +
>>> /*
>>> * TCP splice context
>>> */
>>> @@ -3375,6 +3381,132 @@ EXPORT_SYMBOL(tcp_md5_hash_key);
>>>
>>> #endif
>>>
>>> +/* Linear search, few entries are expected. The RCU read lock must
>>> + * be held before calling.
>>> + */
>>> +static struct tcp_extra_option_ops *tcp_extra_options_find_kind(unsigned char kind)
>>> +{
>>> + struct tcp_extra_option_ops *entry;
>>> +
>>> + list_for_each_entry_rcu(entry, &tcp_option_list, list) {
>>> + if (entry->option_kind == kind)
>>> + return entry;
>>> + }
>>> +
>>> + return NULL;
>>> +}
>>> +
>>> +void tcp_extra_options_parse(int opcode, int opsize, const unsigned char *opptr,
>>> + const struct sk_buff *skb,
>>> + struct tcp_options_received *opt_rx,
>>> + struct tcp_sock *tp)
>>> +{
>>> + struct tcp_extra_option_ops *entry;
>>> +
>>> + rcu_read_lock();
>>> + entry = tcp_extra_options_find_kind(opcode);
>>> + if (entry && entry->parse)
>>> + entry->parse(opsize, opptr, skb, opt_rx, tp);
>>> + rcu_read_unlock();
>>> +}
>>> +
>>> +unsigned int tcp_extra_options_prepare(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct tcp_sock *tp)
>>> +{
>>> + struct tcp_extra_option_ops *entry;
>>> + unsigned int used = 0;
>>> +
>>> + rcu_read_lock();
>>> + list_for_each_entry_rcu(entry, &tcp_option_list, list) {
>>> + if (unlikely(!entry->prepare))
>>> + continue;
>>> +
>>> + used += entry->prepare(skb, flags, remaining - used, opts, tp);
>>> + }
>>> + rcu_read_unlock();
>>> +
>>> + return used;
>>> +}
>>> +
>>> +unsigned int tcp_extra_options_prepare_req(struct sk_buff *skb, u8 flags,
>>> + unsigned int remaining,
>>> + struct tcp_out_options *opts,
>>> + struct request_sock *req)
>>> +{
>>> + struct tcp_extra_option_ops *entry;
>>> + unsigned int used = 0;
>>> +
>>> + rcu_read_lock();
>>> + list_for_each_entry_rcu(entry, &tcp_option_list, list) {
>>> + if (unlikely(!entry->prepare_req))
>>> + continue;
>>> +
>>> + used += entry->prepare_req(skb, flags, remaining - used, opts,
>>> + req);
>>> + }
>>> + rcu_read_unlock();
>>> +
>>> + return used;
>>> +}
>>> +
>>> +void tcp_extra_options_write(__be32 *ptr, struct tcp_out_options *opts,
>>> + struct tcp_sock *tp)
>>> +{
>>> + struct tcp_extra_option_ops *entry;
>>> +
>>> + rcu_read_lock();
>>> + list_for_each_entry_rcu(entry, &tcp_option_list, list) {
>>> + if (unlikely(!entry->write))
>>> + continue;
>>> +
>>> + entry->write(ptr, opts, tp);
>>> + }
>>> + rcu_read_unlock();
>>> +}
>>> +
>>> +int tcp_register_extra_option(struct tcp_extra_option_ops *ops)
>>> +{
>>> + int ret = 0;
>>> +
>>> + if (!ops->option_kind)
>>> + return -EINVAL;
>>> +
>>> + if (!try_module_get(ops->owner))
>>> + return -ENOENT;
>>> +
>>> + spin_lock(&tcp_option_list_lock);
>>> + if (tcp_extra_options_find_kind(ops->option_kind)) {
>>> + pr_notice("Option kind %u already registered\n",
>>> + ops->option_kind);
>>> + spin_unlock(&tcp_option_list_lock);
>>> + module_put(ops->owner);
>>> + return -EEXIST;
>>> + }
>>> +
>>> + list_add_tail_rcu(&ops->list, &tcp_option_list);
>>> + pr_debug("Option kind %u registered\n", ops->option_kind);
>>> + spin_unlock(&tcp_option_list_lock);
>>> +
>>> + static_branch_inc(&tcp_extra_options_enabled);
>>> +
>>> + return ret;
>>> +}
>>> +
>>> +void tcp_unregister_extra_option(struct tcp_extra_option_ops *ops)
>>> +{
>>> + spin_lock(&tcp_option_list_lock);
>>> + list_del_rcu(&ops->list);
>>> + spin_unlock(&tcp_option_list_lock);
>>> +
>>> + synchronize_net();
>>> +
>>> + static_branch_dec(&tcp_extra_options_enabled);
>>> +
>>> + module_put(ops->owner);
>>> +}
>>> +
>>> void tcp_done(struct sock *sk)
>>> {
>>> struct request_sock *req = tcp_sk(sk)->fastopen_rsk;
>>> @@ -3521,6 +3653,7 @@ void __init tcp_init(void)
>>> INIT_HLIST_HEAD(&tcp_hashinfo.bhash[i].chain);
>>> }
>>>
>>> + INIT_LIST_HEAD(&tcp_option_list);
>>>
>>> cnt = tcp_hashinfo.ehash_mask + 1;
>>> sysctl_tcp_max_orphans = cnt / 2;
>>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>>> index db9bb46b5776..89c38ef94b54 100644
>>> --- a/net/ipv4/tcp_input.c
>>> +++ b/net/ipv4/tcp_input.c
>>> @@ -3726,7 +3726,7 @@ static void tcp_parse_fastopen_option(int len, const unsigned char *cookie,
>>> void tcp_parse_options(const struct net *net,
>>> const struct sk_buff *skb,
>>> struct tcp_options_received *opt_rx, int estab,
>>> - struct tcp_fastopen_cookie *foc)
>>> + struct tcp_fastopen_cookie *foc, struct tcp_sock *tp)
>>> {
>>> const unsigned char *ptr;
>>> const struct tcphdr *th = tcp_hdr(skb);
>>> @@ -3828,6 +3828,11 @@ void tcp_parse_options(const struct net *net,
>>> ptr + 2, th->syn, foc, true);
>>> break;
>>>
>>> + default:
>>> + tcp_extra_options_parse(opcode, opsize, ptr,
>>> + skb, opt_rx, tp);
>>> + break;
>>> +
>>> }
>>> ptr += opsize-2;
>>> length -= opsize;
>>> @@ -3874,7 +3879,7 @@ static bool tcp_fast_parse_options(const struct net *net,
>>> return true;
>>> }
>>>
>>> - tcp_parse_options(net, skb, &tp->rx_opt, 1, NULL);
>>> + tcp_parse_options(net, skb, &tp->rx_opt, 1, NULL, tp);
>>> if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
>>> tp->rx_opt.rcv_tsecr -= tp->tsoffset;
>>>
>>> @@ -5550,7 +5555,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
>>> /* Get original SYNACK MSS value if user MSS sets mss_clamp */
>>> tcp_clear_options(&opt);
>>> opt.user_mss = opt.mss_clamp = 0;
>>> - tcp_parse_options(sock_net(sk), synack, &opt, 0, NULL);
>>> + tcp_parse_options(sock_net(sk), synack, &opt, 0, NULL, tp);
>>> mss = opt.mss_clamp;
>>> }
>>>
>>> @@ -5604,7 +5609,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
>>> int saved_clamp = tp->rx_opt.mss_clamp;
>>> bool fastopen_fail;
>>>
>>> - tcp_parse_options(sock_net(sk), skb, &tp->rx_opt, 0, &foc);
>>> + tcp_parse_options(sock_net(sk), skb, &tp->rx_opt, 0, &foc, tp);
>>> if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
>>> tp->rx_opt.rcv_tsecr -= tp->tsoffset;
>>>
>>> @@ -6280,7 +6285,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
>>> tmp_opt.mss_clamp = af_ops->mss_clamp;
>>> tmp_opt.user_mss = tp->rx_opt.user_mss;
>>> tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0,
>>> - want_cookie ? NULL : &foc);
>>> + want_cookie ? NULL : &foc, tp);
>>>
>>> if (want_cookie && !tmp_opt.saw_tstamp)
>>> tcp_clear_options(&tmp_opt);
>>> diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
>>> index 188a6f31356d..1c3e91899dac 100644
>>> --- a/net/ipv4/tcp_minisocks.c
>>> +++ b/net/ipv4/tcp_minisocks.c
>>> @@ -98,7 +98,7 @@ tcp_timewait_state_process(struct inet_timewait_sock *tw, struct sk_buff *skb,
>>>
>>> tmp_opt.saw_tstamp = 0;
>>> if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) {
>>> - tcp_parse_options(twsk_net(tw), skb, &tmp_opt, 0, NULL);
>>> + tcp_parse_options(twsk_net(tw), skb, &tmp_opt, 0, NULL, NULL);
>>>
>>> if (tmp_opt.saw_tstamp) {
>>> if (tmp_opt.rcv_tsecr)
>>> @@ -565,7 +565,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
>>>
>>> tmp_opt.saw_tstamp = 0;
>>> if (th->doff > (sizeof(struct tcphdr)>>2)) {
>>> - tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0, NULL);
>>> + tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0, NULL, NULL);
>>>
>>> if (tmp_opt.saw_tstamp) {
>>> tmp_opt.ts_recent = req->ts_recent;
>>> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
>>> index 964c4c6cd0a2..c4089202e686 100644
>>> --- a/net/ipv4/tcp_output.c
>>> +++ b/net/ipv4/tcp_output.c
>>> @@ -41,6 +41,7 @@
>>> #include <linux/compiler.h>
>>> #include <linux/gfp.h>
>>> #include <linux/module.h>
>>> +#include <linux/static_key.h>
>>>
>>> /* People can turn this off for buggy TCP's found in printers etc. */
>>> int sysctl_tcp_retrans_collapse __read_mostly = 1;
>>> @@ -413,23 +414,6 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)
>>> return tp->snd_una != tp->snd_up;
>>> }
>>>
>>> -#define OPTION_SACK_ADVERTISE (1 << 0)
>>> -#define OPTION_TS (1 << 1)
>>> -#define OPTION_MD5 (1 << 2)
>>> -#define OPTION_WSCALE (1 << 3)
>>> -#define OPTION_FAST_OPEN_COOKIE (1 << 8)
>>> -
>>> -struct tcp_out_options {
>>> - u16 options; /* bit field of OPTION_* */
>>> - u16 mss; /* 0 to disable */
>>> - u8 ws; /* window scale, 0 to disable */
>>> - u8 num_sack_blocks; /* number of SACK blocks to include */
>>> - u8 hash_size; /* bytes in hash_location */
>>> - __u8 *hash_location; /* temporary pointer, overloaded */
>>> - __u32 tsval, tsecr; /* need to include OPTION_TS */
>>> - struct tcp_fastopen_cookie *fastopen_cookie; /* Fast open cookie */
>>> -};
>>> -
>>> /* Write previously computed TCP options to the packet.
>>> *
>>> * Beware: Something in the Internet is very sensitive to the ordering of
>>> @@ -540,6 +524,9 @@ static void tcp_options_write(__be32 *ptr, struct sk_buff *skb, struct sock *sk,
>>> }
>>> ptr += (len + 3) >> 2;
>>> }
>>> +
>>> + if (static_branch_unlikely(&tcp_extra_options_enabled))
>>> + tcp_extra_options_write(ptr, opts, tp);
>>> }
>>>
>>> /* Compute TCP options for SYN packets. This is not the final
>>> @@ -607,6 +594,10 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,
>>> }
>>> }
>>>
>>> + if (static_branch_unlikely(&tcp_extra_options_enabled))
>>> + remaining -= tcp_extra_options_prepare(skb, TCPHDR_SYN,
>>> + remaining, opts, tp);
>>> +
>>> return MAX_TCP_OPTION_SPACE - remaining;
>>> }
>>>
>>> @@ -668,6 +659,13 @@ static unsigned int tcp_synack_options(const struct sock *sk,
>>> }
>>> }
>>>
>>> + if (static_branch_unlikely(&tcp_extra_options_enabled))
>>> + remaining -= tcp_extra_options_prepare_req(skb,
>>> + TCPHDR_SYN |
>>> + TCPHDR_ACK,
>>> + remaining, opts,
>>> + req);
>>> +
>>> return MAX_TCP_OPTION_SPACE - remaining;
>>> }
>>>
>>> @@ -701,6 +699,9 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb
>>> size += TCPOLEN_TSTAMP_ALIGNED;
>>> }
>>>
>>> + size += tcp_extra_options_prepare(skb, 0, MAX_TCP_OPTION_SPACE - size,
>>> + opts, tp);
>>> +
>>> eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack;
>>> if (unlikely(eff_sacks)) {
>>> const unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
>>> diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
>>> index 4e7817abc0b9..407480366c73 100644
>>> --- a/net/ipv6/syncookies.c
>>> +++ b/net/ipv6/syncookies.c
>>> @@ -162,7 +162,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
>>>
>>> /* check for timestamp cookie support */
>>> memset(&tcp_opt, 0, sizeof(tcp_opt));
>>> - tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL);
>>> + tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL, tp);
>>>
>>> if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
>>> tsoff = secure_tcpv6_ts_off(sock_net(sk),
>>> --
>>> 2.14.1
>>>
>>>
>>
>> --
>> Mat Martineau
>> Intel OTC
>
--
Mat Martineau
Intel OTC
^ permalink raw reply
* [PATCH] imx-base.inc: Generate a default IMAGE_BOOT_FILES
From: Otavio Salvador @ 2017-10-04 20:40 UTC (permalink / raw)
To: meta-freescale Mailing List; +Cc: Otavio Salvador
When the machine requires a boot partition, it needs to define the
IMAGE_BOOT_FILES to include the device tree files and Linux kernel
image. This is essentially a generic solution so instead of defining
it for all machines we are providing a default value for them.
To implement that, we borrowed an utility function from Raspberry Pi
BSP. It is copied as is at conf/machine/include/utilities.inc file.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
conf/machine/include/imx-base.inc | 7 +++++++
conf/machine/include/utilities.inc | 28 ++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 conf/machine/include/utilities.inc
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 06f93fcb..c96216de 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -3,6 +3,8 @@
include conf/machine/include/fsl-default-settings.inc
include conf/machine/include/fsl-default-versions.inc
+require conf/machine/include/utilities.inc
+
# Set specific make target and binary suffix
PREFERRED_PROVIDER_u-boot ??= "u-boot-fslc"
PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"
@@ -226,6 +228,11 @@ SOC_DEFAULT_IMAGE_FSTYPES_mxs = "uboot-mxsboot-sdcard sdcard.gz"
SDCARD_ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ext4"
IMAGE_FSTYPES ?= "${SOC_DEFAULT_IMAGE_FSTYPES}"
+IMAGE_BOOT_FILES ?= " \
+ ${KERNEL_IMAGETYPE} \
+ ${@make_dtb_boot_files(d)} \
+"
+
### wic default support
WKS_FILE_DEPENDS ?= " \
virtual/bootloader \
diff --git a/conf/machine/include/utilities.inc b/conf/machine/include/utilities.inc
new file mode 100644
index 00000000..bcb1c2a7
--- /dev/null
+++ b/conf/machine/include/utilities.inc
@@ -0,0 +1,28 @@
+### Machine definition file utilities
+
+def make_dtb_boot_files(d):
+ # Generate IMAGE_BOOT_FILES entries for device tree files listed in
+ # KERNEL_DEVICETREE.
+ alldtbs = d.getVar('KERNEL_DEVICETREE')
+ imgtyp = d.getVar('KERNEL_IMAGETYPE')
+
+ def transform(dtb):
+ if dtb.endswith('dtb'):
+ # eg: whatever/bcm2708-rpi-b.dtb has:
+ # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-bcm2708-rpi-b.dtb
+ # destination: bcm2708-rpi-b.dtb
+ base = os.path.basename(dtb)
+ src = '{}-{}'.format(imgtyp, base)
+ dst = base
+ return '{};{}'.format(src, dst)
+ elif dtb.endswith('dtbo'):
+ # overlay dtb:
+ # eg: overlays/hifiberry-amp.dtbo has:
+ # DEPLOYDIR file: ${KERNEL_IMAGETYPE}-hifiberry-amp.dtbo
+ # destination: overlays/hifiberry-amp.dtbo
+ base = os.path.basename(dtb)
+ src = '{}-{}'.format(imgtyp, base)
+ dst = dtb
+ return '{};{}'.format(src, dtb)
+
+ return ' '.join([transform(dtb) for dtb in alldtbs.split(' ') if dtb])
--
2.14.2
^ permalink raw reply related
* [xen-unstable test] 114003: tolerable FAIL - PUSHED
From: osstest service owner @ 2017-10-04 20:40 UTC (permalink / raw)
To: xen-devel, osstest-admin
flight 114003 xen-unstable real [real]
http://logs.test-lab.xenproject.org/osstest/logs/114003/
Failures :-/ but no regressions.
Tests which did not succeed, but are not blocking:
test-armhf-armhf-libvirt-xsm 14 saverestore-support-check fail like 113959
test-armhf-armhf-xl-rtds 16 guest-start/debian.repeat fail like 113959
test-amd64-amd64-xl-qemuu-win7-amd64 17 guest-stop fail like 113962
test-amd64-i386-xl-qemuu-win7-amd64 17 guest-stop fail like 113962
test-amd64-i386-xl-qemut-win7-amd64 17 guest-stop fail like 113962
test-armhf-armhf-libvirt 14 saverestore-support-check fail like 113962
test-amd64-amd64-xl-rtds 10 debian-install fail like 113962
test-armhf-armhf-libvirt-raw 13 saverestore-support-check fail like 113962
test-amd64-amd64-xl-qemut-ws16-amd64 10 windows-install fail never pass
test-amd64-amd64-xl-qemuu-ws16-amd64 10 windows-install fail never pass
test-amd64-i386-libvirt 13 migrate-support-check fail never pass
test-amd64-amd64-libvirt 13 migrate-support-check fail never pass
test-amd64-amd64-libvirt-xsm 13 migrate-support-check fail never pass
test-amd64-i386-libvirt-xsm 13 migrate-support-check fail never pass
test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm 11 migrate-support-check fail never pass
test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 11 migrate-support-check fail never pass
test-amd64-amd64-libvirt-vhd 12 migrate-support-check fail never pass
test-amd64-amd64-qemuu-nested-amd 17 debian-hvm-install/l1/l2 fail never pass
test-amd64-i386-xl-qemuu-ws16-amd64 13 guest-saverestore fail never pass
test-armhf-armhf-xl 13 migrate-support-check fail never pass
test-armhf-armhf-xl 14 saverestore-support-check fail never pass
test-armhf-armhf-xl-multivcpu 13 migrate-support-check fail never pass
test-armhf-armhf-xl-multivcpu 14 saverestore-support-check fail never pass
test-armhf-armhf-xl-cubietruck 13 migrate-support-check fail never pass
test-armhf-armhf-xl-cubietruck 14 saverestore-support-check fail never pass
test-armhf-armhf-xl-credit2 13 migrate-support-check fail never pass
test-armhf-armhf-xl-credit2 14 saverestore-support-check fail never pass
test-amd64-i386-xl-qemut-ws16-amd64 13 guest-saverestore fail never pass
test-amd64-i386-libvirt-qcow2 12 migrate-support-check fail never pass
test-armhf-armhf-xl-xsm 13 migrate-support-check fail never pass
test-armhf-armhf-xl-xsm 14 saverestore-support-check fail never pass
test-armhf-armhf-libvirt 13 migrate-support-check fail never pass
test-armhf-armhf-xl-arndale 13 migrate-support-check fail never pass
test-armhf-armhf-xl-arndale 14 saverestore-support-check fail never pass
test-armhf-armhf-libvirt-xsm 13 migrate-support-check fail never pass
test-armhf-armhf-xl-rtds 13 migrate-support-check fail never pass
test-armhf-armhf-xl-rtds 14 saverestore-support-check fail never pass
test-armhf-armhf-libvirt-raw 12 migrate-support-check fail never pass
test-armhf-armhf-xl-vhd 12 migrate-support-check fail never pass
test-armhf-armhf-xl-vhd 13 saverestore-support-check fail never pass
test-amd64-amd64-xl-qemuu-win10-i386 10 windows-install fail never pass
test-amd64-i386-xl-qemut-win10-i386 10 windows-install fail never pass
test-amd64-i386-xl-qemuu-win10-i386 10 windows-install fail never pass
test-amd64-amd64-xl-qemut-win10-i386 10 windows-install fail never pass
version targeted for testing:
xen dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e
baseline version:
xen 60823b39a1f3788b7ea98bdaf1eda987156f4c87
Last test of basis 113962 2017-10-03 10:20:21 Z 1 days
Testing same since 113977 2017-10-03 23:47:37 Z 0 days 2 attempts
------------------------------------------------------------
People who touched revisions under test:
Andrew Cooper <andrew.cooper3@citrix.com>
jobs:
build-amd64-xsm pass
build-armhf-xsm pass
build-i386-xsm pass
build-amd64-xtf pass
build-amd64 pass
build-armhf pass
build-i386 pass
build-amd64-libvirt pass
build-armhf-libvirt pass
build-i386-libvirt pass
build-amd64-prev pass
build-i386-prev pass
build-amd64-pvops pass
build-armhf-pvops pass
build-i386-pvops pass
build-amd64-rumprun pass
build-i386-rumprun pass
test-xtf-amd64-amd64-1 pass
test-xtf-amd64-amd64-2 pass
test-xtf-amd64-amd64-3 pass
test-xtf-amd64-amd64-4 pass
test-xtf-amd64-amd64-5 pass
test-amd64-amd64-xl pass
test-armhf-armhf-xl pass
test-amd64-i386-xl pass
test-amd64-amd64-xl-qemut-debianhvm-amd64-xsm pass
test-amd64-i386-xl-qemut-debianhvm-amd64-xsm pass
test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm pass
test-amd64-i386-libvirt-qemuu-debianhvm-amd64-xsm pass
test-amd64-amd64-xl-qemuu-debianhvm-amd64-xsm pass
test-amd64-i386-xl-qemuu-debianhvm-amd64-xsm pass
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm pass
test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm pass
test-amd64-amd64-libvirt-xsm pass
test-armhf-armhf-libvirt-xsm pass
test-amd64-i386-libvirt-xsm pass
test-amd64-amd64-xl-xsm pass
test-armhf-armhf-xl-xsm pass
test-amd64-i386-xl-xsm pass
test-amd64-amd64-qemuu-nested-amd fail
test-amd64-amd64-xl-pvh-amd pass
test-amd64-i386-qemut-rhel6hvm-amd pass
test-amd64-i386-qemuu-rhel6hvm-amd pass
test-amd64-amd64-xl-qemut-debianhvm-amd64 pass
test-amd64-i386-xl-qemut-debianhvm-amd64 pass
test-amd64-amd64-xl-qemuu-debianhvm-amd64 pass
test-amd64-i386-xl-qemuu-debianhvm-amd64 pass
test-amd64-i386-freebsd10-amd64 pass
test-amd64-amd64-xl-qemuu-ovmf-amd64 pass
test-amd64-i386-xl-qemuu-ovmf-amd64 pass
test-amd64-amd64-rumprun-amd64 pass
test-amd64-amd64-xl-qemut-win7-amd64 pass
test-amd64-i386-xl-qemut-win7-amd64 fail
test-amd64-amd64-xl-qemuu-win7-amd64 fail
test-amd64-i386-xl-qemuu-win7-amd64 fail
test-amd64-amd64-xl-qemut-ws16-amd64 fail
test-amd64-i386-xl-qemut-ws16-amd64 fail
test-amd64-amd64-xl-qemuu-ws16-amd64 fail
test-amd64-i386-xl-qemuu-ws16-amd64 fail
test-armhf-armhf-xl-arndale pass
test-amd64-amd64-xl-credit2 pass
test-armhf-armhf-xl-credit2 pass
test-armhf-armhf-xl-cubietruck pass
test-amd64-amd64-examine pass
test-armhf-armhf-examine pass
test-amd64-i386-examine pass
test-amd64-i386-freebsd10-i386 pass
test-amd64-i386-rumprun-i386 pass
test-amd64-amd64-xl-qemut-win10-i386 fail
test-amd64-i386-xl-qemut-win10-i386 fail
test-amd64-amd64-xl-qemuu-win10-i386 fail
test-amd64-i386-xl-qemuu-win10-i386 fail
test-amd64-amd64-qemuu-nested-intel pass
test-amd64-amd64-xl-pvh-intel pass
test-amd64-i386-qemut-rhel6hvm-intel pass
test-amd64-i386-qemuu-rhel6hvm-intel pass
test-amd64-amd64-libvirt pass
test-armhf-armhf-libvirt pass
test-amd64-i386-libvirt pass
test-amd64-amd64-livepatch pass
test-amd64-i386-livepatch pass
test-amd64-amd64-migrupgrade pass
test-amd64-i386-migrupgrade pass
test-amd64-amd64-xl-multivcpu pass
test-armhf-armhf-xl-multivcpu pass
test-amd64-amd64-pair pass
test-amd64-i386-pair pass
test-amd64-amd64-libvirt-pair pass
test-amd64-i386-libvirt-pair pass
test-amd64-amd64-amd64-pvgrub pass
test-amd64-amd64-i386-pvgrub pass
test-amd64-amd64-pygrub pass
test-amd64-i386-libvirt-qcow2 pass
test-amd64-amd64-xl-qcow2 pass
test-armhf-armhf-libvirt-raw pass
test-amd64-i386-xl-raw pass
test-amd64-amd64-xl-rtds fail
test-armhf-armhf-xl-rtds fail
test-amd64-amd64-libvirt-vhd pass
test-armhf-armhf-xl-vhd pass
------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images
Logs, config files, etc. are available at
http://logs.test-lab.xenproject.org/osstest/logs
Explanation of these reports, and of osstest in general, is at
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master
Test harness code can be found at
http://xenbits.xen.org/gitweb?p=osstest.git;a=summary
Pushing revision :
+ branch=xen-unstable
+ revision=dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e
+ . ./cri-lock-repos
++ . ./cri-common
+++ . ./cri-getconfig
++++ export PERLLIB=.:.
++++ PERLLIB=.:.
+++ umask 002
+++ getrepos
++++ getconfig Repos
++++ perl -e '
use Osstest;
readglobalconfig();
print $c{"Repos"} or die $!;
'
+++ local repos=/home/osstest/repos
+++ '[' -z /home/osstest/repos ']'
+++ '[' '!' -d /home/osstest/repos ']'
+++ echo /home/osstest/repos
++ repos=/home/osstest/repos
++ repos_lock=/home/osstest/repos/lock
++ '[' x '!=' x/home/osstest/repos/lock ']'
++ OSSTEST_REPOS_LOCK_LOCKED=/home/osstest/repos/lock
++ exec with-lock-ex -w /home/osstest/repos/lock ./ap-push xen-unstable dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e
+ branch=xen-unstable
+ revision=dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e
+ . ./cri-lock-repos
++ . ./cri-common
+++ . ./cri-getconfig
++++ export PERLLIB=.:.:.
++++ PERLLIB=.:.:.
+++ umask 002
+++ getrepos
++++ getconfig Repos
++++ perl -e '
use Osstest;
readglobalconfig();
print $c{"Repos"} or die $!;
'
+++ local repos=/home/osstest/repos
+++ '[' -z /home/osstest/repos ']'
+++ '[' '!' -d /home/osstest/repos ']'
+++ echo /home/osstest/repos
++ repos=/home/osstest/repos
++ repos_lock=/home/osstest/repos/lock
++ '[' x/home/osstest/repos/lock '!=' x/home/osstest/repos/lock ']'
+ . ./cri-common
++ . ./cri-getconfig
+++ export PERLLIB=.:.:.:.
+++ PERLLIB=.:.:.:.
++ umask 002
+ select_xenbranch
+ case "$branch" in
+ tree=xen
+ xenbranch=xen-unstable
+ '[' xxen = xlinux ']'
+ linuxbranch=
+ '[' x = x ']'
+ qemuubranch=qemu-upstream-unstable
+ select_prevxenbranch
++ ./cri-getprevxenbranch xen-unstable
+ prevxenbranch=xen-4.9-testing
+ '[' xdbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e = x ']'
+ : tested/2.6.39.x
+ . ./ap-common
++ : osstest@xenbits.xen.org
+++ getconfig OsstestUpstream
+++ perl -e '
use Osstest;
readglobalconfig();
print $c{"OsstestUpstream"} or die $!;
'
++ :
++ : git://xenbits.xen.org/xen.git
++ : osstest@xenbits.xen.org:/home/xen/git/xen.git
++ : git://xenbits.xen.org/qemu-xen-traditional.git
++ : git://git.kernel.org
++ : git://git.kernel.org/pub/scm/linux/kernel/git
++ : git
++ : git://xenbits.xen.org/xtf.git
++ : osstest@xenbits.xen.org:/home/xen/git/xtf.git
++ : git://xenbits.xen.org/xtf.git
++ : git://xenbits.xen.org/libvirt.git
++ : osstest@xenbits.xen.org:/home/xen/git/libvirt.git
++ : git://xenbits.xen.org/libvirt.git
++ : git://xenbits.xen.org/osstest/rumprun.git
++ : git
++ : git://xenbits.xen.org/osstest/rumprun.git
++ : osstest@xenbits.xen.org:/home/xen/git/osstest/rumprun.git
++ : git://git.seabios.org/seabios.git
++ : osstest@xenbits.xen.org:/home/xen/git/osstest/seabios.git
++ : git://xenbits.xen.org/osstest/seabios.git
++ : https://github.com/tianocore/edk2.git
++ : osstest@xenbits.xen.org:/home/xen/git/osstest/ovmf.git
++ : git://xenbits.xen.org/osstest/ovmf.git
++ : git://xenbits.xen.org/osstest/linux-firmware.git
++ : osstest@xenbits.xen.org:/home/osstest/ext/linux-firmware.git
++ : git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
++ : osstest@xenbits.xen.org:/home/xen/git/linux-pvops.git
++ : git://xenbits.xen.org/linux-pvops.git
++ : tested/linux-4.9
++ : tested/linux-arm-xen
++ '[' xgit://xenbits.xen.org/linux-pvops.git = x ']'
++ '[' x = x ']'
++ : git://xenbits.xen.org/linux-pvops.git
++ : tested/linux-arm-xen
++ : git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
++ : tested/2.6.39.x
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : daily-cron.xen-unstable
++ : http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27
++ : git://xenbits.xen.org/qemu-xen.git
++ : osstest@xenbits.xen.org:/home/xen/git/qemu-xen.git
++ : daily-cron.xen-unstable
++ : git://xenbits.xen.org/qemu-xen.git
++ : git://git.qemu.org/qemu.git
+ TREE_LINUX=osstest@xenbits.xen.org:/home/xen/git/linux-pvops.git
+ TREE_QEMU_UPSTREAM=osstest@xenbits.xen.org:/home/xen/git/qemu-xen.git
+ TREE_XEN=osstest@xenbits.xen.org:/home/xen/git/xen.git
+ TREE_LIBVIRT=osstest@xenbits.xen.org:/home/xen/git/libvirt.git
+ TREE_RUMPRUN=osstest@xenbits.xen.org:/home/xen/git/osstest/rumprun.git
+ TREE_SEABIOS=osstest@xenbits.xen.org:/home/xen/git/osstest/seabios.git
+ TREE_OVMF=osstest@xenbits.xen.org:/home/xen/git/osstest/ovmf.git
+ TREE_XTF=osstest@xenbits.xen.org:/home/xen/git/xtf.git
+ info_linux_tree xen-unstable
+ case $1 in
+ return 1
+ case "$branch" in
+ cd /home/osstest/repos/xen
+ git push osstest@xenbits.xen.org:/home/xen/git/xen.git dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e:refs/heads/master
To osstest@xenbits.xen.org:/home/xen/git/xen.git
60823b3..dbc4b6e dbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e -> master
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* Re: [PATCH 2/4] gpio: Introduce ->get_multiple callback
From: Lukas Wunner @ 2017-10-04 20:32 UTC (permalink / raw)
To: Linus Walleij; +Cc: Mathias Duckeck, Phil Elwell, linux-gpio
In-Reply-To: <46dea76d0adfe25f30b564d9dc5b3f2b4de099c9.1503319573.git.lukas@wunner.de>
Hi Linus,
one question popped up regarding this patch that I'd like to clarify
before reposting a revised series:
On Mon, Aug 21, 2017 at 03:12:00PM +0200, Lukas Wunner wrote:
> SPI-attached GPIO controllers typically read out all inputs in one go.
> If callers desire the values of multipe inputs, ideally a single readout
> should take place to return the desired values. However the current
> driver API only offers a ->get callback but no ->get_multiple (unlike
> ->set_multiple, which is present). Thus, to read multiple inputs, a
> full readout needs to be performed for every single value (barring
> driver-internal caching), which is inefficient.
[...]
> Introduce the missing callback. Add corresponding consumer functions
> such as gpiod_get_array_value(). Amend linehandle_ioctl() to take
> advantage of the newly added infrastructure.
[...]
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -365,28 +365,28 @@ static long linehandle_ioctl(struct file *filep, unsigned int cmd,
> struct linehandle_state *lh = filep->private_data;
> void __user *ip = (void __user *)arg;
> struct gpiohandle_data ghd;
> + int vals[GPIOHANDLES_MAX];
> int i;
>
> if (cmd == GPIOHANDLE_GET_LINE_VALUES_IOCTL) {
> - int val;
> + /* TODO: check if descriptors are really input */
> + int ret = gpiod_get_array_value_complex(false,
> + true,
> + lh->numdescs,
> + (const struct gpio_desc **)lh->descs,
> + vals);
I've designed the function signature of
gpiod_get_array_value_complex()
gpiod_get_raw_array_value()
gpiod_get_array_value()
gpiod_get_raw_array_value_cansleep()
gpiod_get_array_value_cansleep()
such that a "const struct gpio_desc **" argument is passed in (the point
being the const). This was done to enforce const-correctness and for
consistency with the family of functions to read a single GPIO, such as
gpiod_get_value() which take a "const struct gpio_desc *".
However after actually using the newly introduced functions in a driver,
I've discovered that the const keyword is mostly just an annoyance in this
case: When acquiring GPIOs with gpiod_get_array(), the resulting
struct gpio_desc ** is not const. Thus, a cast is necessary whenever
feeding the result of gpiod_get_array() to gpiod_get_array_value(),
which may well be the most common use case. (It's probably less common
that folks construct the array by hand.) A cast is also already necessary
for the invocation of gpiod_get_array_value_complex() quoted above.
So I'm wondering if the const keyword does more harm than good in this case.
Let me know what you think.
Thanks,
Lukas
^ permalink raw reply
* Table Tennis Enthusiasts List
From: Nicole Rice @ 2017-10-04 20:13 UTC (permalink / raw)
To: linux-kernel
Hi,
Would you be interested in acquiring an email list of " Table Tennis Enthusiasts List" from USA?
We also have data for:
1.Football Enthusiasts List 4.Student List
2.Basketball Enthusiasts List 5.Tennis Enthusisasts List
3.Health and Fitness Enthusiasts 6.Sports Enthusiasts List
Each record in the list contains Contact Name (First, Middle and Last Name), Mailing Address, List type and Opt-in email address.
All the contacts are opt-in verified, 100% permission based and can be used for unlimited multi-channel marketing.
Please let me know your thoughts towards procuring the Table Tennis Enthusiasts List.
Looking forward for your response.
Best Regards,
Nicole Rice
^ permalink raw reply
* [Buildroot] [PATCH v3] HOST_DIR/lib: symlink respectively to lib32/64
From: Arnout Vandecappelle @ 2017-10-04 20:37 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1507120908-48104-1-git-send-email-matthew.weber@rockwellcollins.com>
Hi Matt,
On 04-10-17 14:41, Matt Weber wrote:
> Discovered the issue on a RHEL7.4 machine where
> the cmake build dynamically selected HOST_DIR/lib64
> as the installation path for the lzo2 library.
>
> Fixes failures like the following:
> host-mtd
> http://autobuild.buildroot.net/results/d31/d31581d2e60f35cf70312683df99c768e2ea8516/
>
> host-squashfs
> http://autobuild.buildroot.net/results/d9c/d9c95231ac774ed71580754a15ebb3b121764310/
>
> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Two small nits...
> ---
> Changes
> [Yann
> v2 -> v3
> - Updated hostarch logic to check for 64bit in the name
> and if present create link. This supports all archs
> vs just x86.
>
> v1 -> v2
> - Correct the condition used to determine host arch.
> (Previously used the target arch check)
> ---
> Makefile | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 9b09589..601de1d 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -542,7 +542,7 @@ endif
>
> .PHONY: dirs
> dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
> - $(HOST_DIR) $(HOST_DIR)/usr $(BINARIES_DIR)
> + $(HOST_DIR) $(HOST_DIR)/usr $(HOST_DIR)/lib $(BINARIES_DIR)
>
> $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG)
> $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
> @@ -565,6 +565,13 @@ sdk: world
> $(HOST_DIR)/usr: $(HOST_DIR)
> @ln -snf . $@
>
> +$(HOST_DIR)/lib: $(HOST_DIR)
> + @mkdir -p $@
> + case $(HOSTARCH) in \
Better put @ in front here.
> + (*64) ln -s lib $(@D)/lib64;; \
Probably not really important, but what would HOSTARCH be on a MIP64 n32?
More importantly: it is possible that HOST_DIR/lib64 exists already but that
HOST_DIR ends up newer - for example because a new directory (e.g. sbin) was
created in it. Then the rule will be executed again, and a new symlink will be
created within the lib directory. So to avoid this, use ln -snf.
To be sure, could you test with BR2_HOST_DIR set to somewhere else and also
rebuilding?
Regards,
Arnout
> + (*) ln -s lib $(@D)/lib32;; \
> + esac
> +
> # Populating the staging with the base directories is handled by the skeleton package
> $(STAGING_DIR):
> @mkdir -p $(STAGING_DIR)
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply
* Re: MCP2517FD Bus-Off recovery
From: Wolfgang Grandegger @ 2017-10-04 20:36 UTC (permalink / raw)
To: Marcel.Birthelmer, linux-can
In-Reply-To: <97b73ce1-4692-6d30-52b2-787e13d71bf9@grandegger.com>
Am 04.10.2017 um 19:31 schrieb Wolfgang Grandegger:
> Hello Marcel,
>
> Am 04.10.2017 um 18:32 schrieb Marcel.Birthelmer@microchip.com:
>> Hi all,
>> I'm working on a driver for the new MCP2517FD CAN controller (http://www.microchip.com/wwwproducts/en/MCP2517FD). This is a substantially different device from the MCP2515 so it's a separate driver.
>
> Great!
>
>> My question pertains to error recovery. This device automatically recovers from Bus-Off to Error-Active after some internal delay (see fig.11-1 of the Family Reference Manual). The ISR detects this state change, but I'm not sure how to handle it in regards to can_restart. Should I just update call netif_carrier_on and netif_wake_queue from the ISR to put the device back into normal mode?
>
> Have a look to the "at91_can" driver. If "restart_ms" is "0", the
> automatic recovery will be used. If not, the controller will be stopped:
That's not correct. If "restart_ms" is "0" the controller will be
stopped waiting for manual restart. Otherwise automatic recovery will be
used. The "grcan" driver uses the same logic.
> http://elixir.free-electrons.com/linux/latest/source/drivers/net/can/at91_can.c#L962
>
> In case of automatic recovery, the CAN controller usually signals
> back to error passive -> warning -> active. When it's back to error
> passive, netif_wake_queue etc. should be called:
>
> http://elixir.free-electrons.com/linux/latest/source/drivers/net/can/at91_can.c#L922
>
> Can automatic recovery be switched off?
>
>>
>> Also, should the CAN state really be set to CAN_STATE_BUS_OFF while the device is in bus-off mode, since it will recover automatically and there's no explicit "restart" action?
>
> Yes, the bus-off and restart (back to error active) should be visible
> in user-space.
Wolfgang.
^ permalink raw reply
* [MPTCP] [PATCH v2] tcp: Register handlers for extra TCP options
From: Mat Martineau @ 2017-10-04 20:36 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 24927 bytes --]
Allow additional TCP options to be handled by registered hook
functions.
Registered options have a priority that determines the order in which
options are prepared and written. Lower priority numbers are handled
first.
Option parsing will call the provided 'parse' function when a TCP option
number is not recognized by the normal option parsing code.
The 'prepare' function determines the required space for registered
options and store associated data. 'write' adds the option to the TCP
header.
A static key and RCU synchronization are used to minimize the
performance impact of these extensible TCP features.
Signed-off-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
---
Changes from v1: One 'prepare' callback (no more special callback for
request_sock), and add a few missing callback sites (like ipv6).
drivers/infiniband/hw/cxgb4/cm.c | 2 +-
include/linux/tcp.h | 22 +++++++
include/net/tcp.h | 40 +++++++++++-
net/ipv4/syncookies.c | 2 +-
net/ipv4/tcp.c | 133 +++++++++++++++++++++++++++++++++++++++
net/ipv4/tcp_input.c | 16 +++--
net/ipv4/tcp_ipv4.c | 80 ++++++++++++++++++-----
net/ipv4/tcp_minisocks.c | 4 +-
net/ipv4/tcp_output.c | 43 +++++++------
net/ipv6/syncookies.c | 2 +-
net/ipv6/tcp_ipv6.c | 28 ++++++++-
11 files changed, 323 insertions(+), 49 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index daf7a56e5d7e..c3eb31611011 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -3752,7 +3752,7 @@ static void build_cpl_pass_accept_req(struct sk_buff *skb, int stid , u8 tos)
*/
memset(&tmp_opt, 0, sizeof(tmp_opt));
tcp_clear_options(&tmp_opt);
- tcp_parse_options(&init_net, skb, &tmp_opt, 0, NULL);
+ tcp_parse_options(&init_net, skb, &tmp_opt, 0, NULL, NULL);
req = __skb_push(skb, sizeof(*req));
memset(req, 0, sizeof(*req));
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 4aa40ef02d32..0347e6ce99be 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -112,6 +112,23 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
rx_opt->wscale_ok = rx_opt->snd_wscale = 0;
}
+#define OPTION_SACK_ADVERTISE (1 << 0)
+#define OPTION_TS (1 << 1)
+#define OPTION_MD5 (1 << 2)
+#define OPTION_WSCALE (1 << 3)
+#define OPTION_FAST_OPEN_COOKIE (1 << 8)
+
+struct tcp_out_options {
+ u16 options; /* bit field of OPTION_* */
+ u16 mss; /* 0 to disable */
+ u8 ws; /* window scale, 0 to disable */
+ u8 num_sack_blocks; /* number of SACK blocks to include */
+ u8 hash_size; /* bytes in hash_location */
+ __u8 *hash_location; /* temporary pointer, overloaded */
+ __u32 tsval, tsecr; /* need to include OPTION_TS */
+ struct tcp_fastopen_cookie *fastopen_cookie; /* Fast open cookie */
+};
+
/* This is the max number of SACKS that we'll generate and process. It's safe
* to increase this, although since:
* size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
@@ -389,6 +406,11 @@ static inline struct tcp_sock *tcp_sk(const struct sock *sk)
return (struct tcp_sock *)sk;
}
+static inline struct sock *tcp_to_sk(const struct tcp_sock *tp)
+{
+ return (struct sock *)tp;
+}
+
struct tcp_timewait_sock {
struct inet_timewait_sock tw_sk;
#define tw_rcv_nxt tw_sk.__tw_common.skc_tw_rcv_nxt
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 3bc910a9bfc6..04f3dcecf592 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -433,7 +433,8 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
int flags, int *addr_len);
void tcp_parse_options(const struct net *net, const struct sk_buff *skb,
struct tcp_options_received *opt_rx,
- int estab, struct tcp_fastopen_cookie *foc);
+ int estab, struct tcp_fastopen_cookie *foc,
+ struct tcp_sock *tp);
const u8 *tcp_parse_md5sig_option(const struct tcphdr *th);
/*
@@ -2109,4 +2110,41 @@ static inline bool tcp_bpf_ca_needs_ecn(struct sock *sk)
{
return (tcp_call_bpf(sk, BPF_SOCK_OPS_NEEDS_ECN) == 1);
}
+
+extern struct static_key_false tcp_extra_options_enabled;
+
+struct tcp_extra_option_ops {
+ struct list_head list;
+ unsigned char option_kind;
+ unsigned char priority;
+ void (*parse)(int opsize, const unsigned char *opptr,
+ const struct sk_buff *skb,
+ struct tcp_options_received *opt_rx,
+ struct sock *sk);
+ /* Return the number of bytes consumed */
+ unsigned int (*prepare)(struct sk_buff *skb, u8 flags,
+ unsigned int remaining,
+ struct tcp_out_options *opts,
+ const struct sock *sk);
+ void (*write)(__be32 *ptr, struct tcp_out_options *opts,
+ const struct sock *sk);
+ struct module *owner;
+};
+
+void tcp_extra_options_parse(int opcode, int opsize, const unsigned char *opptr,
+ const struct sk_buff *skb,
+ struct tcp_options_received *opt_rx,
+ struct sock *sk);
+
+unsigned int tcp_extra_options_prepare(struct sk_buff *skb, u8 flags,
+ unsigned int remaining,
+ struct tcp_out_options *opts,
+ const struct sock *sk);
+
+void tcp_extra_options_write(__be32 *ptr, struct tcp_out_options *opts,
+ const struct sock *sk);
+
+int tcp_register_extra_option(struct tcp_extra_option_ops *ops);
+void tcp_unregister_extra_option(struct tcp_extra_option_ops *ops);
+
#endif /* _TCP_H */
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index b1bb1b3a1082..6c8d750a2243 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -313,7 +313,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb)
/* check for timestamp cookie support */
memset(&tcp_opt, 0, sizeof(tcp_opt));
- tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL);
+ tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL, tp);
if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
tsoff = secure_tcp_ts_off(sock_net(sk),
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5091402720ab..8136857b992b 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -270,6 +270,7 @@
#include <linux/time.h>
#include <linux/slab.h>
#include <linux/errqueue.h>
+#include <linux/static_key.h>
#include <net/icmp.h>
#include <net/inet_common.h>
@@ -306,6 +307,13 @@ EXPORT_SYMBOL(tcp_memory_allocated);
struct percpu_counter tcp_sockets_allocated;
EXPORT_SYMBOL(tcp_sockets_allocated);
+/*
+ * Optional TCP option handlers
+ */
+static DEFINE_SPINLOCK(tcp_option_list_lock);
+static LIST_HEAD(tcp_option_list);
+DEFINE_STATIC_KEY_FALSE(tcp_extra_options_enabled);
+
/*
* TCP splice context
*/
@@ -3375,6 +3383,130 @@ EXPORT_SYMBOL(tcp_md5_hash_key);
#endif
+/* Linear search, few entries are expected. The RCU read lock must
+ * be held before calling.
+ */
+static struct tcp_extra_option_ops *tcp_extra_options_find_kind(unsigned char kind)
+{
+ struct tcp_extra_option_ops *entry;
+
+ list_for_each_entry_rcu(entry, &tcp_option_list, list) {
+ if (entry->option_kind == kind)
+ return entry;
+ }
+
+ return NULL;
+}
+
+void tcp_extra_options_parse(int opcode, int opsize, const unsigned char *opptr,
+ const struct sk_buff *skb,
+ struct tcp_options_received *opt_rx,
+ struct sock *sk)
+{
+ struct tcp_extra_option_ops *entry;
+
+ rcu_read_lock();
+ entry = tcp_extra_options_find_kind(opcode);
+ if (entry && entry->parse)
+ entry->parse(opsize, opptr, skb, opt_rx, sk);
+ rcu_read_unlock();
+}
+EXPORT_SYMBOL_GPL(tcp_extra_options_parse);
+
+/* The RCU read lock must be held before calling, and should span both
+ * the call to this function and tcp_extra_options_write to ensure that
+ * tcp_option_list does not change between the two calls. To preserve
+ * expected option alignment, always returns a multiple of 4 bytes.
+ */
+unsigned int tcp_extra_options_prepare(struct sk_buff *skb, u8 flags,
+ unsigned int remaining,
+ struct tcp_out_options *opts,
+ const struct sock *sk)
+{
+ struct tcp_extra_option_ops *entry;
+ unsigned int used = 0;
+
+ list_for_each_entry_rcu(entry, &tcp_option_list, list) {
+ if (unlikely(!entry->prepare))
+ continue;
+
+ used += entry->prepare(skb, flags, remaining - used, opts, sk);
+ }
+
+ return roundup(used, 4);
+}
+EXPORT_SYMBOL_GPL(tcp_extra_options_prepare);
+
+/* The RCU read lock must be held before calling, and should span both
+ * the call to tcp_extra_options_write and this function to ensure that
+ * tcp_option_list does not change between the two calls.
+ */
+void tcp_extra_options_write(__be32 *ptr, struct tcp_out_options *opts,
+ const struct sock *sk)
+{
+ struct tcp_extra_option_ops *entry;
+
+ list_for_each_entry_rcu(entry, &tcp_option_list, list) {
+ if (unlikely(!entry->write))
+ continue;
+
+ entry->write(ptr, opts, sk);
+ }
+}
+EXPORT_SYMBOL_GPL(tcp_extra_options_write);
+
+int tcp_register_extra_option(struct tcp_extra_option_ops *ops)
+{
+ struct tcp_extra_option_ops *entry;
+ struct list_head* add_before = &tcp_option_list;
+ int ret = 0;
+
+ if (!ops->option_kind)
+ return -EINVAL;
+
+ if (!try_module_get(ops->owner))
+ return -ENOENT;
+
+ spin_lock(&tcp_option_list_lock);
+
+ list_for_each_entry_rcu(entry, &tcp_option_list, list) {
+ if (entry->option_kind == ops->option_kind) {
+ pr_notice("Option kind %u already registered\n",
+ ops->option_kind);
+ spin_unlock(&tcp_option_list_lock);
+ module_put(ops->owner);
+ return -EEXIST;
+ }
+
+ if (entry->priority <= ops->priority)
+ add_before = &entry->list;
+ }
+
+ list_add_tail_rcu(&ops->list, add_before);
+ pr_debug("Option kind %u registered\n", ops->option_kind);
+
+ spin_unlock(&tcp_option_list_lock);
+
+ static_branch_inc(&tcp_extra_options_enabled);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(tcp_register_extra_option);
+
+void tcp_unregister_extra_option(struct tcp_extra_option_ops *ops)
+{
+ spin_lock(&tcp_option_list_lock);
+ list_del_rcu(&ops->list);
+ spin_unlock(&tcp_option_list_lock);
+
+ synchronize_net();
+
+ static_branch_dec(&tcp_extra_options_enabled);
+
+ module_put(ops->owner);
+}
+EXPORT_SYMBOL_GPL(tcp_unregister_extra_option);
+
void tcp_done(struct sock *sk)
{
struct request_sock *req = tcp_sk(sk)->fastopen_rsk;
@@ -3521,6 +3653,7 @@ void __init tcp_init(void)
INIT_HLIST_HEAD(&tcp_hashinfo.bhash[i].chain);
}
+ INIT_LIST_HEAD(&tcp_option_list);
cnt = tcp_hashinfo.ehash_mask + 1;
sysctl_tcp_max_orphans = cnt / 2;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c5d7656beeee..faf3c8d34cec 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3728,7 +3728,7 @@ static void tcp_parse_fastopen_option(int len, const unsigned char *cookie,
void tcp_parse_options(const struct net *net,
const struct sk_buff *skb,
struct tcp_options_received *opt_rx, int estab,
- struct tcp_fastopen_cookie *foc)
+ struct tcp_fastopen_cookie *foc, struct tcp_sock *tp)
{
const unsigned char *ptr;
const struct tcphdr *th = tcp_hdr(skb);
@@ -3830,6 +3830,12 @@ void tcp_parse_options(const struct net *net,
ptr + 2, th->syn, foc, true);
break;
+ default:
+ tcp_extra_options_parse(opcode, opsize, ptr,
+ skb, opt_rx,
+ tcp_to_sk(tp));
+ break;
+
}
ptr += opsize-2;
length -= opsize;
@@ -3876,7 +3882,7 @@ static bool tcp_fast_parse_options(const struct net *net,
return true;
}
- tcp_parse_options(net, skb, &tp->rx_opt, 1, NULL);
+ tcp_parse_options(net, skb, &tp->rx_opt, 1, NULL, tp);
if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
tp->rx_opt.rcv_tsecr -= tp->tsoffset;
@@ -5569,7 +5575,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
/* Get original SYNACK MSS value if user MSS sets mss_clamp */
tcp_clear_options(&opt);
opt.user_mss = opt.mss_clamp = 0;
- tcp_parse_options(sock_net(sk), synack, &opt, 0, NULL);
+ tcp_parse_options(sock_net(sk), synack, &opt, 0, NULL, tp);
mss = opt.mss_clamp;
}
@@ -5623,7 +5629,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
int saved_clamp = tp->rx_opt.mss_clamp;
bool fastopen_fail;
- tcp_parse_options(sock_net(sk), skb, &tp->rx_opt, 0, &foc);
+ tcp_parse_options(sock_net(sk), skb, &tp->rx_opt, 0, &foc, tp);
if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr)
tp->rx_opt.rcv_tsecr -= tp->tsoffset;
@@ -6299,7 +6305,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
tmp_opt.mss_clamp = af_ops->mss_clamp;
tmp_opt.user_mss = tp->rx_opt.user_mss;
tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0,
- want_cookie ? NULL : &foc);
+ want_cookie ? NULL : &foc, tp);
if (want_cookie && !tmp_opt.saw_tstamp)
tcp_clear_options(&tmp_opt);
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index d9416b5162bc..537734e70317 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -598,9 +598,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
const struct tcphdr *th = tcp_hdr(skb);
struct {
struct tcphdr th;
-#ifdef CONFIG_TCP_MD5SIG
- __be32 opt[(TCPOLEN_MD5SIG_ALIGNED >> 2)];
-#endif
+ __be32 opt[(MAX_TCP_OPTION_SPACE >> 2)];
} rep;
struct ip_reply_arg arg;
#ifdef CONFIG_TCP_MD5SIG
@@ -611,6 +609,7 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
struct sock *sk1 = NULL;
#endif
struct net *net;
+ int offset = 0;
/* Never send a reset in response to a reset. */
if (th->rst)
@@ -676,17 +675,44 @@ static void tcp_v4_send_reset(const struct sock *sk, struct sk_buff *skb)
goto out;
}
+#endif
+
+ if (static_branch_unlikely(&tcp_extra_options_enabled)) {
+ unsigned int remaining;
+ unsigned int used;
+ struct tcp_out_options opts;
+
+ remaining = sizeof(rep.opt);
+#ifdef CONFIG_TCP_MD5SIG
+ if (key)
+ remaining -= TCPOLEN_MD5SIG_ALIGNED;
+#endif
+
+ memset(&opts, 0, sizeof(opts));
+
+ rcu_read_lock();
+ used = tcp_extra_options_prepare(NULL, TCPHDR_RST, remaining,
+ &opts, sk);
+
+ tcp_extra_options_write(&rep.opt[0], &opts, sk);
+ rcu_read_unlock();
+
+ arg.iov[0].iov_len += used;
+ offset += used / 4;
+ rep.th.doff = arg.iov[0].iov_len / 4;
+ }
+#ifdef CONFIG_TCP_MD5SIG
if (key) {
- rep.opt[0] = htonl((TCPOPT_NOP << 24) |
- (TCPOPT_NOP << 16) |
- (TCPOPT_MD5SIG << 8) |
- TCPOLEN_MD5SIG);
+ rep.opt[offset++] = htonl((TCPOPT_NOP << 24) |
+ (TCPOPT_NOP << 16) |
+ (TCPOPT_MD5SIG << 8) |
+ TCPOLEN_MD5SIG);
/* Update length and the length the header thinks exists */
arg.iov[0].iov_len += TCPOLEN_MD5SIG_ALIGNED;
rep.th.doff = arg.iov[0].iov_len / 4;
- tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[1],
+ tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[offset],
key, ip_hdr(skb)->saddr,
ip_hdr(skb)->daddr, &rep.th);
}
@@ -738,14 +764,11 @@ static void tcp_v4_send_ack(const struct sock *sk,
const struct tcphdr *th = tcp_hdr(skb);
struct {
struct tcphdr th;
- __be32 opt[(TCPOLEN_TSTAMP_ALIGNED >> 2)
-#ifdef CONFIG_TCP_MD5SIG
- + (TCPOLEN_MD5SIG_ALIGNED >> 2)
-#endif
- ];
+ __be32 opt[(MAX_TCP_OPTION_SPACE >> 2)];
} rep;
struct net *net = sock_net(sk);
struct ip_reply_arg arg;
+ int offset = 0;
memset(&rep.th, 0, sizeof(struct tcphdr));
memset(&arg, 0, sizeof(arg));
@@ -759,33 +782,56 @@ static void tcp_v4_send_ack(const struct sock *sk,
rep.opt[1] = htonl(tsval);
rep.opt[2] = htonl(tsecr);
arg.iov[0].iov_len += TCPOLEN_TSTAMP_ALIGNED;
+ offset += 3;
}
/* Swap the send and the receive. */
rep.th.dest = th->source;
rep.th.source = th->dest;
- rep.th.doff = arg.iov[0].iov_len / 4;
rep.th.seq = htonl(seq);
rep.th.ack_seq = htonl(ack);
rep.th.ack = 1;
rep.th.window = htons(win);
+ if (static_branch_unlikely(&tcp_extra_options_enabled)) {
+ unsigned int remaining;
+ unsigned int used;
+ struct tcp_out_options opts;
+
+ remaining = sizeof(rep.th) + sizeof(rep.opt) - arg.iov[0].iov_len;
#ifdef CONFIG_TCP_MD5SIG
- if (key) {
- int offset = (tsecr) ? 3 : 0;
+ if (key)
+ remaining -= TCPOLEN_MD5SIG_ALIGNED;
+#endif
+ memset(&opts, 0, sizeof(opts));
+ rcu_read_lock();
+ used = tcp_extra_options_prepare(NULL, TCPHDR_ACK, remaining,
+ &opts, sk);
+
+ tcp_extra_options_write(&rep.opt[offset], &opts, sk);
+ rcu_read_unlock();
+
+ arg.iov[0].iov_len += used;
+ offset += used / 4;
+ }
+
+ rep.th.doff = arg.iov[0].iov_len / 4;
+
+#ifdef CONFIG_TCP_MD5SIG
+ if (key) {
rep.opt[offset++] = htonl((TCPOPT_NOP << 24) |
(TCPOPT_NOP << 16) |
(TCPOPT_MD5SIG << 8) |
TCPOLEN_MD5SIG);
arg.iov[0].iov_len += TCPOLEN_MD5SIG_ALIGNED;
- rep.th.doff = arg.iov[0].iov_len/4;
tcp_v4_md5_hash_hdr((__u8 *) &rep.opt[offset],
key, ip_hdr(skb)->saddr,
ip_hdr(skb)->daddr, &rep.th);
}
#endif
+
arg.flags = reply_flags;
arg.csum = csum_tcpudp_nofold(ip_hdr(skb)->daddr,
ip_hdr(skb)->saddr, /* XXX */
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 188a6f31356d..1c3e91899dac 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -98,7 +98,7 @@ tcp_timewait_state_process(struct inet_timewait_sock *tw, struct sk_buff *skb,
tmp_opt.saw_tstamp = 0;
if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) {
- tcp_parse_options(twsk_net(tw), skb, &tmp_opt, 0, NULL);
+ tcp_parse_options(twsk_net(tw), skb, &tmp_opt, 0, NULL, NULL);
if (tmp_opt.saw_tstamp) {
if (tmp_opt.rcv_tsecr)
@@ -565,7 +565,7 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
tmp_opt.saw_tstamp = 0;
if (th->doff > (sizeof(struct tcphdr)>>2)) {
- tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0, NULL);
+ tcp_parse_options(sock_net(sk), skb, &tmp_opt, 0, NULL, NULL);
if (tmp_opt.saw_tstamp) {
tmp_opt.ts_recent = req->ts_recent;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 0bc9e46a5369..61eba3d0ae17 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -41,6 +41,7 @@
#include <linux/compiler.h>
#include <linux/gfp.h>
#include <linux/module.h>
+#include <linux/static_key.h>
/* People can turn this off for buggy TCP's found in printers etc. */
int sysctl_tcp_retrans_collapse __read_mostly = 1;
@@ -413,23 +414,6 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)
return tp->snd_una != tp->snd_up;
}
-#define OPTION_SACK_ADVERTISE (1 << 0)
-#define OPTION_TS (1 << 1)
-#define OPTION_MD5 (1 << 2)
-#define OPTION_WSCALE (1 << 3)
-#define OPTION_FAST_OPEN_COOKIE (1 << 8)
-
-struct tcp_out_options {
- u16 options; /* bit field of OPTION_* */
- u16 mss; /* 0 to disable */
- u8 ws; /* window scale, 0 to disable */
- u8 num_sack_blocks; /* number of SACK blocks to include */
- u8 hash_size; /* bytes in hash_location */
- __u8 *hash_location; /* temporary pointer, overloaded */
- __u32 tsval, tsecr; /* need to include OPTION_TS */
- struct tcp_fastopen_cookie *fastopen_cookie; /* Fast open cookie */
-};
-
/* Write previously computed TCP options to the packet.
*
* Beware: Something in the Internet is very sensitive to the ordering of
@@ -536,6 +520,9 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
}
ptr += (len + 3) >> 2;
}
+
+ if (static_branch_unlikely(&tcp_extra_options_enabled))
+ tcp_extra_options_write(ptr, opts, tcp_to_sk(tp));
}
/* Compute TCP options for SYN packets. This is not the final
@@ -603,6 +590,11 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,
}
}
+ if (static_branch_unlikely(&tcp_extra_options_enabled))
+ remaining -= tcp_extra_options_prepare(skb, TCPHDR_SYN,
+ remaining, opts,
+ tcp_to_sk(tp));
+
return MAX_TCP_OPTION_SPACE - remaining;
}
@@ -663,6 +655,12 @@ static unsigned int tcp_synack_options(struct request_sock *req,
}
}
+ if (static_branch_unlikely(&tcp_extra_options_enabled))
+ remaining -= tcp_extra_options_prepare(skb,
+ TCPHDR_SYN | TCPHDR_ACK,
+ remaining, opts,
+ req_to_sk(req));
+
return MAX_TCP_OPTION_SPACE - remaining;
}
@@ -696,6 +694,11 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb
size += TCPOLEN_TSTAMP_ALIGNED;
}
+ if (static_branch_unlikely(&tcp_extra_options_enabled))
+ size += tcp_extra_options_prepare(skb, 0,
+ MAX_TCP_OPTION_SPACE - size,
+ opts, tcp_to_sk(tp));
+
eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack;
if (unlikely(eff_sacks)) {
const unsigned int remaining = MAX_TCP_OPTION_SPACE - size;
@@ -1016,6 +1019,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
tcb = TCP_SKB_CB(skb);
memset(&opts, 0, sizeof(opts));
+ rcu_read_lock();
if (unlikely(tcb->tcp_flags & TCPHDR_SYN))
tcp_options_size = tcp_syn_options(sk, skb, &opts, &md5);
else
@@ -1092,6 +1096,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
md5, sk, skb);
}
#endif
+ rcu_read_unlock();
icsk->icsk_af_ops->send_check(sk, skb);
@@ -3156,8 +3161,8 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
#endif
skb->skb_mstamp = tcp_clock_us();
-#ifdef CONFIG_TCP_MD5SIG
rcu_read_lock();
+#ifdef CONFIG_TCP_MD5SIG
md5 = tcp_rsk(req)->af_specific->req_md5_lookup(sk, req_to_sk(req));
#endif
skb_set_hash(skb, tcp_rsk(req)->txhash, PKT_HASH_TYPE_L4);
@@ -3196,8 +3201,8 @@ struct sk_buff *tcp_make_synack(const struct sock *sk, struct dst_entry *dst,
if (md5)
tcp_rsk(req)->af_specific->calc_md5_hash(opts.hash_location,
md5, req_to_sk(req), skb);
- rcu_read_unlock();
#endif
+ rcu_read_unlock();
/* Do not fool tcpdump (if any), clean our debris */
skb->tstamp = 0;
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c
index 4e7817abc0b9..407480366c73 100644
--- a/net/ipv6/syncookies.c
+++ b/net/ipv6/syncookies.c
@@ -162,7 +162,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
/* check for timestamp cookie support */
memset(&tcp_opt, 0, sizeof(tcp_opt));
- tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL);
+ tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL, tp);
if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
tsoff = secure_tcpv6_ts_off(sock_net(sk),
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 64d94afa427f..4a3fba1ef3a2 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -784,9 +784,10 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
struct flowi6 fl6;
struct net *net = sk ? sock_net(sk) : dev_net(skb_dst(skb)->dev);
struct sock *ctl_sk = net->ipv6.tcp_sk;
- unsigned int tot_len = sizeof(struct tcphdr);
+ unsigned int tot_len = 0;
struct dst_entry *dst;
__be32 *topt;
+ struct tcp_out_options extraopts;
if (tsecr)
tot_len += TCPOLEN_TSTAMP_ALIGNED;
@@ -795,10 +796,28 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
tot_len += TCPOLEN_MD5SIG_ALIGNED;
#endif
+ rcu_read_lock();
+ if (static_branch_unlikely(&tcp_extra_options_enabled)) {
+ unsigned int remaining = MAX_TCP_OPTION_SPACE - tot_len;
+ u8 extraflags = rst ? TCPHDR_RST : 0;
+
+ if (!rst || !th->ack)
+ extraflags |= TCPHDR_ACK;
+
+ memset(&extraopts, 0, sizeof(extraopts));
+
+ tot_len += tcp_extra_options_prepare(skb, extraflags, remaining,
+ &extraopts, sk);
+ }
+
+ tot_len += sizeof(struct tcphdr);
+
buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len,
GFP_ATOMIC);
- if (!buff)
+ if (!buff) {
+ rcu_read_unlock();
return;
+ }
skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len);
@@ -835,6 +854,11 @@ static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32
}
#endif
+ if (static_branch_unlikely(&tcp_extra_options_enabled))
+ tcp_extra_options_write(topt, &extraopts, sk);
+
+ rcu_read_unlock();
+
memset(&fl6, 0, sizeof(fl6));
fl6.daddr = ipv6_hdr(skb)->saddr;
fl6.saddr = ipv6_hdr(skb)->daddr;
--
2.14.2
^ permalink raw reply related
* [PATCH 2/2] Staging: rtl8723bs: Externs should be avoided in .C file
From: Srinivasan Shanmugam @ 2017-10-04 20:34 UTC (permalink / raw)
To: gregkh, devel, linux-kernel; +Cc: Srinivasan Shanmugam
Removed all the unnecessary extern from rtl8723bs
Signed-off-by: Srinivasan Shanmugam <srinivasan.rns@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_recv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index c0b501e..6b5e48c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1226,7 +1226,8 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union recv_frame *precv_frame);
-static sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_frame)
+static int validate_recv_mgnt_frame(struct adapter *padapter,
+ union recv_frame *precv_frame)
{
/* struct mlme_priv *pmlmepriv = &adapter->mlmepriv; */
--
1.9.1
^ permalink raw reply related
* Re: [PATCH 2/2] selinux: fix build warning
From: Paul Moore @ 2017-10-04 20:34 UTC (permalink / raw)
To: Stephen Smalley
Cc: Corentin Labbe, Eric Paris, James Morris, serge,
linux-security-module, linux-kernel, selinux
In-Reply-To: <1507148872.1491.11.camel@tycho.nsa.gov>
On Wed, Oct 4, 2017 at 4:27 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Wed, 2017-10-04 at 20:32 +0200, Corentin Labbe wrote:
>> This patch make selinux_task_prlimit() static since it is not used
>> anywhere else.
>> This fix the following build warning:
>> security/selinux/hooks.c:3981:5: warning: no previous prototype for
>> 'selinux_task_prlimit' [-Wmissing-prototypes]
>>
>> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Merged, thanks again.
--
paul moore
www.paul-moore.com
^ permalink raw reply
* [PATCH 2/2] selinux: fix build warning
From: Paul Moore @ 2017-10-04 20:34 UTC (permalink / raw)
To: linux-security-module
In-Reply-To: <1507148872.1491.11.camel@tycho.nsa.gov>
On Wed, Oct 4, 2017 at 4:27 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Wed, 2017-10-04 at 20:32 +0200, Corentin Labbe wrote:
>> This patch make selinux_task_prlimit() static since it is not used
>> anywhere else.
>> This fix the following build warning:
>> security/selinux/hooks.c:3981:5: warning: no previous prototype for
>> 'selinux_task_prlimit' [-Wmissing-prototypes]
>>
>> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Merged, thanks again.
--
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 1/2] selinux: fix build warning by removing the unused sid variable
From: Paul Moore @ 2017-10-04 20:33 UTC (permalink / raw)
To: Stephen Smalley
Cc: Corentin Labbe, Eric Paris, James Morris, serge,
linux-security-module, linux-kernel, selinux
In-Reply-To: <1507148778.1491.10.camel@tycho.nsa.gov>
On Wed, Oct 4, 2017 at 4:26 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Wed, 2017-10-04 at 20:32 +0200, Corentin Labbe wrote:
>> This patch remove the unused variable sid
>> This fix the following build warning:
>> security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not
>> used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Looks good to me too, merged into selinux/next. Thanks.
--
paul moore
www.paul-moore.com
^ permalink raw reply
* [PATCH 1/2] selinux: fix build warning by removing the unused sid variable
From: Paul Moore @ 2017-10-04 20:33 UTC (permalink / raw)
To: linux-security-module
In-Reply-To: <1507148778.1491.10.camel@tycho.nsa.gov>
On Wed, Oct 4, 2017 at 4:26 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> On Wed, 2017-10-04 at 20:32 +0200, Corentin Labbe wrote:
>> This patch remove the unused variable sid
>> This fix the following build warning:
>> security/selinux/hooks.c:2921:6: warning: variable 'sid' set but not
>> used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Looks good to me too, merged into selinux/next. Thanks.
--
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH 1/2] Staging: rtl8723bs: Externs should be avoided in .C file
From: Srinivasan Shanmugam @ 2017-10-04 20:33 UTC (permalink / raw)
To: gregkh, devel, linux-kernel; +Cc: Srinivasan Shanmugam
Removed all unnecessary externs warnings in rtl8723bs
Signed-off-by: Srinivasan Shanmugam <srinivasan.rns@gmail.com>
---
drivers/staging/rtl8723bs/core/rtw_efuse.c | 7 +------
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 1 -
drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 --
drivers/staging/rtl8723bs/core/rtw_recv.c | 8 ++++----
drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 ---
drivers/staging/rtl8723bs/include/rtw_ioctl_set.h | 2 ++
6 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 44b92ef..0203202 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -43,12 +43,7 @@
#define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */
/* */
-bool
-Efuse_Read1ByteFromFakeContent(
- struct adapter *padapter,
- u16 Offset,
- u8 *Value);
-bool
+static bool
Efuse_Read1ByteFromFakeContent(
struct adapter *padapter,
u16 Offset,
diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index d815a69..749101ef 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -63,7 +63,6 @@ u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
return ret;
}
-u8 rtw_do_join(struct adapter *padapter);
u8 rtw_do_join(struct adapter *padapter)
{
struct list_head *plist, *phead;
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 008063a..0018763 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -18,8 +18,6 @@
#include <rtw_debug.h>
#include <linux/jiffies.h>
-extern u8 rtw_do_join(struct adapter *padapter);
-
sint _rtw_init_mlme_priv(struct adapter *padapter)
{
sint i;
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index 8817902..c0b501e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -26,7 +26,7 @@
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
u8 rtw_bridge_tunnel_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
-void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
+static void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
{
@@ -1225,8 +1225,8 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
}
union recv_frame *recvframe_chk_defrag(struct adapter *padapter, union recv_frame *precv_frame);
-sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_frame);
-sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_frame)
+
+static sint validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_frame)
{
/* struct mlme_priv *pmlmepriv = &adapter->mlmepriv; */
@@ -2597,7 +2597,7 @@ s32 rtw_recv_entry(union recv_frame *precvframe)
return ret;
}
-void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
+static void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
{
struct adapter *adapter = (struct adapter *)FunctionContext;
struct recv_priv *recvpriv = &adapter->recvpriv;
diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
index a169534..deac88e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
+++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
@@ -37,9 +37,6 @@
static unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
static unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
-extern unsigned char RTW_WPA_OUI[];
-extern unsigned char WPA_TKIP_CIPHER[4];
-
#define R2T_PHY_DELAY (0)
/* define WAIT_FOR_BCN_TO_MIN (3000) */
diff --git a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
index ebf2335..a139992 100644
--- a/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
+++ b/drivers/staging/rtl8723bs/include/rtw_ioctl_set.h
@@ -37,5 +37,7 @@
u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid);
u16 rtw_get_cur_max_rate(struct adapter *adapter);
+u8 rtw_do_join(struct adapter *padapter);
+
#endif
--
1.9.1
^ permalink raw reply related
* Re: [v10 3/6] mm, oom: cgroup-aware OOM killer
From: Johannes Weiner @ 2017-10-04 20:31 UTC (permalink / raw)
To: David Rientjes
Cc: Roman Gushchin, linux-mm, Michal Hocko, Vladimir Davydov,
Tetsuo Handa, Andrew Morton, Tejun Heo, kernel-team, cgroups,
linux-doc, linux-kernel
In-Reply-To: <alpine.DEB.2.10.1710041316120.67374@chino.kir.corp.google.com>
On Wed, Oct 04, 2017 at 01:17:14PM -0700, David Rientjes wrote:
> On Wed, 4 Oct 2017, Roman Gushchin wrote:
>
> > > > @@ -828,6 +828,12 @@ static void __oom_kill_process(struct task_struct *victim)
> > > > struct mm_struct *mm;
> > > > bool can_oom_reap = true;
> > > >
> > > > + if (is_global_init(victim) || (victim->flags & PF_KTHREAD) ||
> > > > + victim->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
> > > > + put_task_struct(victim);
> > > > + return;
> > > > + }
> > > > +
> > > > p = find_lock_task_mm(victim);
> > > > if (!p) {
> > > > put_task_struct(victim);
> > >
> > > Is this necessary? The callers of this function use oom_badness() to
> > > find a victim, and that filters init, kthread, OOM_SCORE_ADJ_MIN.
> >
> > It is. __oom_kill_process() is used to kill all processes belonging
> > to the selected memory cgroup, so we should perform these checks
> > to avoid killing unkillable processes.
> >
>
> That's only true after the next patch in the series which uses the
> oom_kill_memcg_member() callback to kill processes for oom_group, correct?
> Would it be possible to move this check to that patch so it's more
> obvious?
Yup, I realized it when reviewing the next patch. Moving this hunk to
the next patch would probably make sense. Although, us reviewers have
been made aware of this now, so I don't feel strongly about it. Won't
make much of a difference once the patches are merged.
^ permalink raw reply
* Re: [v10 3/6] mm, oom: cgroup-aware OOM killer
From: Johannes Weiner @ 2017-10-04 20:31 UTC (permalink / raw)
To: David Rientjes
Cc: Roman Gushchin, linux-mm, Michal Hocko, Vladimir Davydov,
Tetsuo Handa, Andrew Morton, Tejun Heo, kernel-team, cgroups,
linux-doc, linux-kernel
In-Reply-To: <alpine.DEB.2.10.1710041316120.67374@chino.kir.corp.google.com>
On Wed, Oct 04, 2017 at 01:17:14PM -0700, David Rientjes wrote:
> On Wed, 4 Oct 2017, Roman Gushchin wrote:
>
> > > > @@ -828,6 +828,12 @@ static void __oom_kill_process(struct task_struct *victim)
> > > > struct mm_struct *mm;
> > > > bool can_oom_reap = true;
> > > >
> > > > + if (is_global_init(victim) || (victim->flags & PF_KTHREAD) ||
> > > > + victim->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) {
> > > > + put_task_struct(victim);
> > > > + return;
> > > > + }
> > > > +
> > > > p = find_lock_task_mm(victim);
> > > > if (!p) {
> > > > put_task_struct(victim);
> > >
> > > Is this necessary? The callers of this function use oom_badness() to
> > > find a victim, and that filters init, kthread, OOM_SCORE_ADJ_MIN.
> >
> > It is. __oom_kill_process() is used to kill all processes belonging
> > to the selected memory cgroup, so we should perform these checks
> > to avoid killing unkillable processes.
> >
>
> That's only true after the next patch in the series which uses the
> oom_kill_memcg_member() callback to kill processes for oom_group, correct?
> Would it be possible to move this check to that patch so it's more
> obvious?
Yup, I realized it when reviewing the next patch. Moving this hunk to
the next patch would probably make sense. Although, us reviewers have
been made aware of this now, so I don't feel strongly about it. Won't
make much of a difference once the patches are merged.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH v2 1/2] drm/i915: Fix DP_AUX_CH_CTL_TIME_OUT naming
From: Rodrigo Vivi @ 2017-10-04 20:28 UTC (permalink / raw)
To: James Ausmus; +Cc: intel-gfx
In-Reply-To: <20171004200922.24313-1-james.ausmus@intel.com>
On Wed, Oct 04, 2017 at 08:09:21PM +0000, James Ausmus wrote:
> Rename DP_AUX_CH_CTL_TIME_OUT_1600us to DP_AUX_CH_CTL_TIME_OUT_MAX, as
> the meaning of the (3 << 26) value varies per platform, but it's always the
> maximum timeout for that platform. Pre-CNL it means 1600us, and for CNL
> it means 3200us.
Yeap...
>
> v2:
> -Split in to two patches (Rodrigo)
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: James Ausmus <james.ausmus@intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 2 +-
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 39ad9327e2a0..0324e0ca7597 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5239,7 +5239,7 @@ enum {
> #define DP_AUX_CH_CTL_TIME_OUT_400us (0 << 26)
> #define DP_AUX_CH_CTL_TIME_OUT_600us (1 << 26)
> #define DP_AUX_CH_CTL_TIME_OUT_800us (2 << 26)
> -#define DP_AUX_CH_CTL_TIME_OUT_1600us (3 << 26)
> +#define DP_AUX_CH_CTL_TIME_OUT_MAX (3 << 26) /* Varies per platform */
makes sense for me...
I was going to complain about the tab+spaces but I notice the whole block
there is already like this so nevermind ;)
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> #define DP_AUX_CH_CTL_TIME_OUT_MASK (3 << 26)
> #define DP_AUX_CH_CTL_RECEIVE_ERROR (1 << 25)
> #define DP_AUX_CH_CTL_MESSAGE_SIZE_MASK (0x1f << 20)
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 90e756c76f10..5b4c9484575b 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1044,7 +1044,7 @@ static uint32_t skl_get_aux_send_ctl(struct intel_dp *intel_dp,
> DP_AUX_CH_CTL_DONE |
> (has_aux_irq ? DP_AUX_CH_CTL_INTERRUPT : 0) |
> DP_AUX_CH_CTL_TIME_OUT_ERROR |
> - DP_AUX_CH_CTL_TIME_OUT_1600us |
> + DP_AUX_CH_CTL_TIME_OUT_MAX |
> DP_AUX_CH_CTL_RECEIVE_ERROR |
> (send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |
> DP_AUX_CH_CTL_FW_SYNC_PULSE_SKL(32) |
> --
> 2.14.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: Real status of ReiserFS4?
From: Edward Shishkin @ 2017-10-04 20:27 UTC (permalink / raw)
To: ANDY KENNEDY, 'reiserfs-devel@vger.kernel.org'
In-Reply-To: <F9C551623D2CBB4C9488801D14F864C60154C6C4FE@ex-mb1.corp.adtran.com>
On 10/04/2017 05:46 PM, ANDY KENNEDY wrote:
>> Basically, it is stable (as of the latest stuff release). However,
>> I would recommend reiser4 only for personal needs, not for production
>> (corporate use). The latter requires some work to be done in active
> Yeah, that was what I was told in the late 90's when I put an early
> rev of ReiserFS on a production server with a whopping 75GB of storage.
>
> Eventually, after about the 5 power loss on the system, it corrupted
> that partition. Reiserfs-progs was able to recover it, though. So,
> is this one of those cases where if I put it on a production system it
> will work great as long as I don't improperly drop power on it?
In the late 90's ReiserFS (v3.2) hadn't been possessing even a journal.
Now Reiser4 has an advanced transaction manager allowing to choose a
transaction model (journaling, write-anywhere, etc), which is most
suitable for your storage media and workload.
So, definitely not those cases :)
> I really like the stability of ReiserFS over everything else I've used.
>
>> collaboration with administrators of production systems. Reiser4 has a
> I own all of these systems. Most are built from scratch.
I am afraid that it can be not enough. Some production-critical issues
require substantial efforts (profiling, fixing, etc). Normally it is a
business for paid developers, while we all are volunteers whose main time
is occupied with other things.
>> number of open tickets/bugreports, but all of those problems are hard
>> reproducible. Every sophisticated file system has a list of such
>> issues, though.
> Yeah, hence the question above.
>
>> It is really hard to corrupt a reiser4 partition in a way that fsck
>> will refuse to fix it. Nevertheless, I wouldn't recommend to use too
>> large partitions. The smaller partition, the larger chances, that I'll
>> take a look at it, if any problems with fsck.
> I have a back-up copy (actually several back-up copies). And, this is
> data that doesn't change that much, so I can recover fairly easily.
>
>> Also, keep in mind that
>> intelligent compression (default mode) is not optimal for large media-
>> files (seehttps://reiser4.wiki.kernel.org/index.php/Reiser4_Howto for
>> details).
> With a 15TB drive, I'm not worried about compression. That, IMO, would
> be a performance hit anyway.
Depending on types of data and workload, compression can dramatically
speed up, or slow down things. The best case is working with sources
(compilation, etc). The worst case is removing a large media-file which
contains zeros in its head. If you are not sure about data/workload,
then better turn compression off.
Thanks,
Edward.
^ permalink raw reply
* Re: [PATCH net-next 0/3] A own subdirectory for shared TCP code
From: Andrew Lunn @ 2017-10-04 20:27 UTC (permalink / raw)
To: Richard Siegfried; +Cc: David Miller, netdev
In-Reply-To: <d7237d11-ec83-0ef6-d201-da8b99c94b88@systemli.org>
On Wed, Oct 04, 2017 at 08:54:17PM +0200, Richard Siegfried wrote:
> On 04/10/17 01:03, David Miller wrote:
> > As someone who has to do backports regularly to -stable, there is no way
> > I am applying this.
> >
> > Sorry.
> Okay, I see.
>
> Is grouping files into subdirectories something generally
> unwanted/unlikely to be applied or is this specific to TCP / networking?
>
> Because there are several other places in the source tree where I would
> like to group things.
Hi Richard
It is generally unwanted.
Have you tried back porting patches when the directory structure has
changed? Files have moved around? It makes it a lot harder to
do. Meaning patches are going to be back ported less often. Fixes
which could be security relevant might not get back ported, etc.
Kernel 4.4 is going to be supported until 2022. So moving files around
is going to make Greg Kroah-Hartman life more difficult for the next 5
years.
Andrew
^ permalink raw reply
* Re: [PATCH 2/2] selinux: fix build warning
From: Stephen Smalley @ 2017-10-04 20:27 UTC (permalink / raw)
To: Corentin Labbe, paul, eparis, james.l.morris, serge
Cc: linux-security-module, linux-kernel, selinux
In-Reply-To: <20171004183218.4786-2-clabbe.montjoie@gmail.com>
On Wed, 2017-10-04 at 20:32 +0200, Corentin Labbe wrote:
> This patch make selinux_task_prlimit() static since it is not used
> anywhere else.
> This fix the following build warning:
> security/selinux/hooks.c:3981:5: warning: no previous prototype for
> 'selinux_task_prlimit' [-Wmissing-prototypes]
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
> ---
> security/selinux/hooks.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 8507a56f85e4..b8a022f4b4a7 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3977,8 +3977,8 @@ static int selinux_task_getioprio(struct
> task_struct *p)
> PROCESS__GETSCHED, NULL);
> }
>
> -int selinux_task_prlimit(const struct cred *cred, const struct cred
> *tcred,
> - unsigned int flags)
> +static int selinux_task_prlimit(const struct cred *cred, const
> struct cred *tcred,
> + unsigned int flags)
> {
> u32 av = 0;
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.